简体   繁体   English

如何在不同的工作表中使用PHP导出到csv或xls

[英]How can i export to csv or xls using PHP , in different worksheets

How can i export data in different work sheets. 如何在不同的工作表中导出数据。

If data is more than 25000 , i want to write next 25000 in next worksheet, 如果数据大于25000,我想在下一个工作表中写入下一个25000,

in xls data can be in different tabs.. 在xls中,数据可以在不同的标签中。

How can i make that structure using PHP export to csv or xls. 我如何使用PHP导出到csv或xls来构建该结构。

Will it help to reduce load , if i write in different sheets.? 如果我用不同的纸写,会有助于减轻负担吗?

I believe the PEAR class Spreadsheet_Excel_Writer can create multiple worksheets. 我相信PEAR类Spreadsheet_Excel_Writer可以创建多个工作表。

I don't think adding worksheets will reduce load, because the filesize will still be the same. 我认为添加工作表不会减少负载,因为文件大小仍然相同。 I'd suggest you use multiple files instead, if load/filesize is a concern. 如果需要考虑加载/文件大小,建议您改用多个文件。

PHPExcel is another library, similar to the PEAR Spreadsheet_Excel_Writer class, that can write to multiple worksheets; PHPExcel是另一个库,类似于PEAR Spreadsheet_Excel_Writer类,可以写入多个工作表。 but it won't necessarily reduce load. 但这并不一定会减少负载。 If you have more than 25,000 rows (for example, in an array) then this will be using a lot of PHP's memory 如果您有超过25,000行(例如,在数组中),那么这将占用大量PHP内存

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM