X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fexcel_report.inc;h=3786a91aaf9d92bcba4522a2096473deac9dc390;hb=366a3ecbcd7841413f980f9e1d65895b77af1b82;hp=c6f0d4436039b97519644a57e94f08c915baae3d;hpb=c57a65eca46110b7e4a865dc2b007c1fd75838c3;p=fa-stable.git diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index c6f0d443..3786a91a 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -13,6 +13,7 @@ include_once($path_to_root . "/reporting/includes/Workbook.php"); include_once($path_to_root . "/admin/db/company_db.inc"); include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); include_once($path_to_root . "/config.php"); +define('MAX_ROW_SHEET', 65530); // xls version class FrontReport extends Spreadsheet_Excel_Writer_Workbook { @@ -86,7 +87,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook $this->Spreadsheet_Excel_Writer_Workbook($this->path."/".$this->unique_name); if ($this->code != "iso-8859-1") $this->setVersion(8); // set biff version to 8 (0x0006 internal) - $this->sheet =& $this->addWorksheet($this->worksheetNameGenerator($this->title)); + $this->sheet = $this->addWorksheet($this->worksheetNameGenerator($this->title)); if ($this->code != "iso-8859-1") $this->sheet->setInputEncoding($this->code); // set sheet encoding if ($rtl) @@ -641,6 +642,17 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function NewLine($l=1, $np=0, $h=NULL) { $this->y += $l; + if ($this->y > MAX_ROW_SHEET) + { + $this->y = 0; + $this->sheet = $this->addWorksheet(); + if ($this->code != "iso-8859-1") + $this->sheet->setInputEncoding($this->code); // set sheet encoding + if ($_SESSION['language']->dir == 'rtl') + $this->sheet->setRTL(); + for ($i = 0; $i < $this->numcols; $i++) + $this->sheet->setColumn($i, $i, $this->px2units($this->cols[$i + 1] - $this->cols[$i])); + } } function NewPage()