Bugfix: Fix Excel5 Writer so that it only writes column dimensions for columns that are actually used rather than the full range (A to IV)

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@67582 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2011-01-30 23:22:12 +00:00
parent 956cc7a2cf
commit 1bf40dadf9
2 changed files with 6 additions and 1 deletions

View File

@ -256,6 +256,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
$this->_firstColumnIndex = (count($col) > 0) ? PHPExcel_Cell::columnIndexFromString(substr(min($col),1)) : 1;
$this->_lastColumnIndex = (count($col) > 0) ? PHPExcel_Cell::columnIndexFromString(substr(max($col),1)) : 1;
if ($this->_firstColumnIndex > 255) $this->_firstColumnIndex = 255;
if ($this->_lastColumnIndex > 255) $this->_lastColumnIndex = 255;
@ -289,8 +290,9 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
$this->_phpSheet->calculateColumnWidths();
// Column dimensions
$maxCol = PHPExcel_Cell::columnIndexFromString($this->_phpSheet->getHighestColumn()) -1;
$columnDimensions = $this->_phpSheet->getColumnDimensions();
for ($i = 0; $i < 256; ++$i) {
for ($i = 0; $i <= $maxCol; ++$i) {
$hidden = 0;
$level = 0;
$xfIndex = 15; // there are 15 cell style Xfs
@ -1237,6 +1239,8 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
);
}
hexdump($data);
$header = pack("vv", $record, $length);
$this->_append($header.$data);
}

View File

@ -52,6 +52,7 @@ Fixed in SVN:
- Bugfix: (MBaker) Work item 15172 - rangeToarray function modified for non-existent cells
- Bugfix: (MBaker) Work item 14980 - Images not getting copyied with the ->clone function
- Bugfix: (MBaker) Work item 11576 - AdvancedValueBinder.php: String sometimes becomes a date when it shouldn't
- Bugfix: (MBaker) Fix Excel5 Writer so that it only writes column dimensions for columns that are actually used rather than the full range (A to IV)
- General: (MBaker) Improved performance (speed), for building the Shared Strings table in the Excel2007 Writer.