easyise/eisexlsx
Composer 安装命令:
composer require easyise/eisexlsx
包简介
XLSX file data read-write library that operates with native cell addresses like A1 or R1C1.
README 文档
README
XLSX file data read-write library that operates with native cell addresses like A1 or R1C1.
This class was designed for server-side manipulations with uploaded spreadsheets in Microsoft® Excel™ 2007-2011-2013 file format – OpenXML SpereadsheetML.
Current version of this library allows to read user-uploaded file contents and to write data to preliminary uploaded template file and send it back to the user:
- it allows to change existing cell data
- clone rows and fill-in new rows with data
- clone sheets within workbook, remove unnecessary sheets
- colorization of cells.
This library offers an easiest way to make Excel™-based EDI with PHP-based information systems, for data input and output.
Users are no longer need to convert Excel™ spreadsheets to CSV and other formats, they can simply upload data to the website using their worksheets.
You can use files received from users as your website’s output document templates with 100% match of cell formats, sheet layout, design, etc. With eiseXLSX you can stop wasting your time working on output documents layout – you can just ask your customer staff to prepare documents they’d like to see in XLSX format. Then you can put these files to the server and fill them with necessary data using PHP.
Unlike other PHP libraries for XLSX files manipulation eiseXLSX is simple, compact and laconic. You don’t need to learn XLSX file format to operate with it. Just use only cell addresses in any formats (A1 and R1C1 are supported) and data from your website database. As simple as that.
Donate on Patreon: https://www.patreon.com/easyise
Project home: http://russysdev.github.io/eiseXLSX/ On-line Reference Manual: https://russysdev.github.io/eiseXLSX/docs
PHPClasses home: https://www.phpclasses.org/package/8573-PHP-Read-and-write-Excel-spreadsheets-in-XLSX-format.html
Examples
Write:
- Obtain formatted XLSX from your customer
- Unzip it to the folder inside your project (or any other folder you like)
- Make PHP script and include similar code inside:
<?php
include_once "eiseXLSX/eiseXLSX.php";
$xlsx = new eiseXLSX("myemptyfile.xlsx");
$xlsx->data('A4', 'Hello, world!'); // either A1 or R1C1 are accepted
$xlsx->Output("mynewfile.xlsx", "F"); // save the file
?>
Read:
<?php
include_once "eiseXLSX.php";
try { //give it a try to avoid any uncaught error
// caused by broken content of uploaded file
$xlsx = new eiseXLSX($_FILES["fileXLSX"]["tmp_name"]);
} catch(eiseXLSX_Exception $e) {
die($e->getMessage());
}
echo ($myData = $xlsx->data("R15C10")); //voilat!
?>
Latest news:
- 1.6.1.0: Now there's the unlockSheets() method that removes necessity to enter password to modify any data/run macro by withdrawing of sheetProtection tag from all or some specified sheets.
Example:
$xlsx->unlockSheets(); // unlocks all sheets
or
$xlsx->unlockSheets(1); // unlocks sheet with sheetId=1
or
$xlsx->unlockSheets([1, 2, 4]); // unlocks sheet with sheetId's 1, 2 and 4.
- 1.6.0.4: I've added an ability to keep formulas in cells when data is set. Function data() is updated with parameter $flags, put there ['keep_formula'=>True] and formula will be kept for given cell.
Example:
$xlsx->data('R1C1', 42, 'n', ['keep_formula' => True]);
- WARNING: eiseXLSX::Output() function behaviour is changed. See more at https://russysdev.github.io/eiseXLSX/docs#eisexlsx-output.
- method eiseXLSX::getDataValidationList($cellAddress) - returns data validation list as associative array.
- static method eiseXLSX::checkAddressInRange() - checks whether cell address belong to given range or not.
- method eiseXSLX::getDataByRange() - returns associative array of data in specified cell range.
©2013-2026 Ilya S. Eliseev
Licensed under MIT license
easyise/eisexlsx 适用场景与选型建议
easyise/eisexlsx 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.16k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2018 年 09 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「excel」 「xlsx」 「OpenXML」 「spreadsheets」 「SpreadSheetML」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 easyise/eisexlsx 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 easyise/eisexlsx 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 easyise/eisexlsx 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This Symfony bundle integrates PhpSpreadsheet into Symfony using Twig.
PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
Yii2 export extension
PHP Excel Library
PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
统计信息
- 总下载量: 1.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2018-09-20