tags:

views:

38

answers:

2

How can i export data in different work sheets.

If data is more than 25000 , i want to write next 25000 in next worksheet,

in xls data can be in different tabs..

How can i make that structure using PHP export to csv or xls.

Will it help to reduce load , if i write in different sheets.?

+1  A: 

I believe the PEAR class Spreadsheet_Excel_Writer can create multiple worksheets.

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.

lonesomeday
A: 

PHPExcel is another library, similar to the PEAR Spreadsheet_Excel_Writer class, that can write to multiple worksheets; 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

Mark Baker
you have any suggesion to reduce the load. when working with huge data
zod
If you're reading data from a db, don't build an array... just process each record as you retrieve it and then discard it. Or build a CSV file using fputcsv, irrespective of the number of rows... creating an Excel workbook will take more PHP resource (Excel95/Excel2003 can read CSV files up to 65536 rows, Excel2007+ can read up to a million rows)
Mark Baker