good morning,
i have a problem with php pear, which generates excel sheets. this is my php code:
<?PHP
include_once "/Writer.php";
$xls =& new Spreadsheet_Excel_Writer();
$xls -> setVersion(8);
$format_titel =& $xls->addFormat();
$format_titel->setBold();
$format_titel->setAlign('left');
$format_titel->setSize('14');
$format_titel->setFgColor('grey');
$format_titel->setBorder(2);
$sheet =& $xls->addWorksheet("Tab_1");
for ($A=0; $A<=59; $A++) {
$Zeile++;
$s=0;
for ($B=0; $B<=1; $B++){
$Text_Daten_Excel = $Daten_Excel[$A][$B]; //$s++;
$sheet -> write(($A+3), ($B), "TEST TEXT", $format_titel);
}
}
$xls -> send("Sheet.xlsx");
$xls->close();
$xls->sendFile();
?>
This code works fine. A Excel sheet will generate.
But if I change the line number to more than 59
for ($A=0; $A<=59; $A++) {
the excel sheet will generate but i cant open it. I get this message:
The file is damaged and can not be opened.
$xls =& new? What PHP version are you using?setVersion(8)stands for 97-2003. Whatever software you use to open the file, it may get confused if you call the fileSheet.xlsx.$xls =& new= same Problem. if i call it Sheet.xls = same Problem. PHP Version 5.6.8