General: Improved memory usage in CSV Writer
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@73146 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
adacb26028
commit
85ff71fd18
|
@ -118,12 +118,16 @@ class PHPExcel_Writer_CSV implements PHPExcel_Writer_IWriter {
|
|||
fwrite($fileHandle, "\xEF\xBB\xBF");
|
||||
}
|
||||
|
||||
// Convert sheet to array
|
||||
$cellsArray = $sheet->toArray('', $this->_preCalculateFormulas);
|
||||
// Identify the range that we need to extract from the worksheet
|
||||
$maxCol = $sheet->getHighestColumn();
|
||||
$maxRow = $sheet->getHighestRow();
|
||||
|
||||
// Write rows to file
|
||||
foreach ($cellsArray as $row) {
|
||||
$this->_writeLine($fileHandle, $row);
|
||||
for($row = 1; $row <= $maxRow; ++$row) {
|
||||
// Convert the row to an array...
|
||||
$cellsArray = $sheet->rangeToArray('A'.$row.':'.$maxCol.$row,'', $this->_preCalculateFormulas);
|
||||
// ... and write to the file
|
||||
$this->_writeLine($fileHandle, $cellsArray[0]);
|
||||
}
|
||||
|
||||
// Close file
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
Fixed in SVN:
|
||||
- General: (MBaker) Fix to build to ensure that Examples are included with the documentation
|
||||
- General: (MBaker) Reduce cell caching overhead using dirty flag to ensure that cells are only rewritten to the cache if they have actually been changed
|
||||
- General: (MBaker) Improved memory usage in CSV Writer
|
||||
- Bugfix: (MBaker) Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer
|
||||
- Bugfix: (MBaker) Work item 15518 - PCLZip library issue
|
||||
- Bugfix: (MBaker) Work item 15537 - Excel2007 Reader canRead function bug
|
||||
|
|
Loading…
Reference in New Issue