当前位置:网站首页>Xlswriter - Excel export
Xlswriter - Excel export
2022-07-23 15:10:00 【PHP code】
xlswriter It's a , Can be used in Excel 2007+ XLSX The data is read from the file , Insert multiple worksheets , Write text 、 Numbers 、 The formula 、 date 、 Chart 、 Pictures and hyperlinks .

Why use xlswriter
xlswriter It's a PHP C Expand , Can be used in Excel 2007+ XLSX The data is read from the file , Insert multiple worksheets , Write text 、 Numbers 、 The formula 、 date 、 Chart 、 Pictures and hyperlinks .
Please refer to the comparison chart below ; Due to memory ,PHPExcel And PHPSpreadSheet In data volume Relatively large It doesn't work properly when , Although it can pass modify memory_limit Configure to solve memory problems , But it may take longer to finish the work ;
b2f549061c7b2a5fd9b5647383415634.png
It supports the following functions :
One 、 write in
● 100% Compatible Excel XLSX file
● complete Excel Format
● merge cell
● Define worksheet name
● filter
● Chart
● Data validation and drop-down list
● Worksheet PNG/JPEG Images
● Memory optimization mode for writing large files
● Apply to Linux,FreeBSD,OpenBSD,OS X,Windows
● Compiled into 32 Bit and 64 position
● FreeBSD license
● The only dependence is zlib
Two 、 Read
● Read data completely
● The cursor reads data
● Read by data type
1.2.8 New characteristics
1、 The new date is written $config = [
'path' => './tests'
];
$fileObject = new \Vtiful\Kernel\Excel($config);
$fileObject = $fileObject->fileName('tutorial.xlsx');
$filePath = $fileObject->header(['date'])
->insertDate(1, 0, time(), 'mmm d yyyy hh:mm AM/PM')
->output();
2、 Add custom cell data type reading $config = [
'path' => './tests',
];
$fileObject = new \Vtiful\Kernel\Excel($config);
$fileObject->openFile('tutorial.xlsx')
->openSheet();
var_dump($fileObject->nextRow([
\Vtiful\Kernel\Excel::TYPE_STRING,
\Vtiful\Kernel\Excel::TYPE_TIMESTAMP,
]));
The benchmark
Test environment :Macbook Pro 13 inch
Intel Core i5
16GB 2133MHz LPDDR3 Memory
128GB SSD Storage.
export
Two memory modes , export 100W Row data , A single 27 Column , Each cell 19 Chinese characters
● Normal mode : Time consuming 29S, Memory footprint 2083MB;
● Fixed memory mode : Time consuming 52S, Memory footprint <1MB;
Read
Read 100W Row data , Each row 1 Column , The cell data is int
● Full read : Time consuming 3S, Memory footprint 558MB;
● Cursor read : Time consuming 2.8S, Memory footprint <1MB;
Warehouse address
file
End
Please don't forget the last star
more PHP knowledge , Please visit PHP Chinese net PHP course !边栏推荐
- Postgresql快照优化Globalvis新体系分析(性能大幅增强)
- 【启发式分治】启发式合并的逆思想
- The pit trodden by real people tells you to avoid the 10 mistakes often made in automated testing
- Shell script case ---3
- 颜值爆表 Redis官方可视化工具来啦,针不戳
- idea一次启动多个项目
- leetcode: 17. 电话号码的字母组合
- Simulation de modulation et de démodulation du signal CBOC basée sur MATLAB, sortie de corrélation, spectre de puissance et suivi de décalage de fréquence
- RSA加密的使用
- RTA一种广告精准投放的新玩法?
猜你喜欢

Educational Codeforces Round 132 (Rated for Div. 2) D. Rorororobot

supervisord安装使用

基于matlab的BOC调制解调的同步性能仿真,输出跟踪曲线以及不同超前滞后码距下的鉴别曲线

【OpenCV 例程200篇】225. 特征提取之傅里叶描述子

读写锁ReadWriteLock还是不够快?再试试S…

RSA加密的使用

智头条:智装论坛将于8月4日举行,2022全屋智能销售将破100亿

百度工程师眼中的云原生可观测性追踪技术

The official redis visualization tool is coming. The needle doesn't poke

Cloud native observability tracking technology in the eyes of Baidu engineers
随机推荐
338. Bit count
上小学之前要学会的本领指引
[test platform development] 21. complete sending interface request and display response header information
易基因|靶基因DNA甲基化测序(Target-BS)
day18
airserver在哪里下载?使用方法教程
day18
Linux: analysis of the basic use of vim editor
Unreal中通过FMonitoredProcess启动其他独立程序
leetcode: 17. 电话号码的字母组合
Smart headline: smart clothing forum will be held on August 4, and the whole house smart sales will exceed 10billion in 2022
Subsequence --- edit distance
真人踩过的坑,告诉你避免自动化测试常犯的10个错误
Oracle 报表常用sql
The problem of double type precision loss and its solution
152. Product maximum subarray
Simulink simulation of ESP three-phase SVPWM controller
turbo编译码误码率性能matlab仿真
OPNsense – 多功能高可靠易使用的防火墙(二)
Version correspondence between numpy and pytorch