antsugdev83/simple-xlsx
Composer 安装命令:
composer require antsugdev83/simple-xlsx
包简介
Simple create file xlsx
README 文档
README
This project have scope simplify use plugin php spreadsheet.
This project create class for management creation file xlsx; into this class it's possible define:
- plus sheets
- header difference by number sheets
- possibility custom font color and background single colunm
- possibility custom define (if single sheet) define name single sheet
- possibility added before table, of information additional
- possibility create, after creation file xlsx, the zip
Use
Into directory example, they are found example code. In general, from user respect this sequence:
- instance class
$xlsx = new \Anton\SimpleXlsx\SimpleXlsx($header,'standard',null,1,null,$pathBase,null,null);
- instane headers and sheets
$row = $xlsx->setSpreadsheet();
This define initial base row.
- Read your data and call method for create body:
$xlsx->setBodyCell(0,0,$row,$item['name'],$color);
- Save file
$xlsx->save();
DETAILS OF ARGUMENTS FROM THE INSTANCE CLASS AND FROM THE PRINCIPAL FUNCTION INTO CLASS
INSTANCE
- header: array header file; this array it must be how example:
$headeres = [ [] ]
- title : name file
- sheets: array one-dimensional and value into this it must be string
- default row: this define where it begins table. Default is defined to 1; if greater one, table after the row defined
- extra data: this can to be string or array; if is defined and defaultRow greater one, into the file xlsx is positioned before table
- pathbase: is directory of save file
- len: if defined extradata this represents the columns length
- extracolor: array, represents the possibility change color font and background
FUNCTION
setSpreadsheet
This function create header and sheets.
The arguments are:
- background: you can to be null, if is defined represents color of background the columns from header
- color: you can to be null, if is defined represents color of font the columns from header
- name sheet: you can to be null, if is defined only sheet and represents name of sheet
setBodyCell
With this function is created column from the body.
The arguments are:
- index sheet
- index column (if zero example A0,B0,ec..)
- row
- data
- boolean value: if true define background column difference ('F2F3F4' or 'EAEDED')
- position text : left,center or rigth
- number format data: for this argument it is postponed NumberFormat
- fill: the possibility custom background color column and bold or not bold text; this is an array
save
This function create file. It's possible call this function with argument ZipArchive; if this is defined the function create zip with file xlsx.
EXAMPLE
antsugdev83/simple-xlsx 适用场景与选型建议
antsugdev83/simple-xlsx 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 antsugdev83/simple-xlsx 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 antsugdev83/simple-xlsx 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2025-02-11