Home » File Formats » Spreadsheet_Excel_Writer » Bug #9640
Date problem with big spreadsheet
Details
| Submitted | 2006-12-16 20:12 UTC |
|---|---|
| From | piotr at 1h dot pl |
| Assigned | cschmitz |
| Status | Closed |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 4.3.11 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-12-16 20:12 UTC] piotr at 1h dot pl
Description:
------------
I've got the problem with dates and strings in long spreadsheet generated from SQL database. After 300. row spreedsheet messes up in some rows. Some bugs apears in string and date fields.
Test script:
---------------
while ( $d = $db->nextrow() ){
$sheet -> writeString( $row,0,$d['dat_01'],$format1 );
$sheet -> writeString( $row,1,$d['dat_02'],$format2 );
$row ++;
}
Expected result:
----------------
298:2005-10-10 2006-12-05
299:2006-10-23 2006-12-11
300:2006-11-08 2006-11-07
301:2005-05-20 2006-11-28
302:2005-06-10 2006-11-10
Actual result:
--------------
298:2005-10-10 2006-12-05
299:2006-10-23 2006-12-11
300:2006-11-08 2006-11-07
301:2005-05-20 2006-11-28
302:2005-06-10 2006-1?1?-
similar results witch ASCI text.
[2006-12-16 21:00 UTC] piotr at 1h dot pl
A bug apears when $sheet -> setInputEncoding('utf-8') is set and the spreadsheet is viewed in OpenOffice.org 2.0. I'll try to look at MS Excel and see if it steel apears.
[2006-12-16 21:13 UTC] piotr at 1h dot pl
MS Excel doesn't open spreadsheet at all. I've noticed, that any setting any input encoding causes bugs in spreadsheet - the most simple example:
$sheet = &$xls->addWorkSheet('test');
$sheet -> setInputEncoding('ISO-8859-2');
for ($i = 0; $i<1000; $i++){
$sheet -> write($i,0,date('Y-m-d',rand( 0,time() ) ) );
$sheet -> write($i,1,date('Y-m-d',rand( 0,time() ) ) );
}