84 function writeText($row, $col, $value, $wrap =
false);
194 echo pack(
"ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
199 echo pack(
"ss", 0x0A, 0x00);
210 echo pack(
"sssss", 0x203, 14, $row, $col, 0x0);
211 echo pack(
"d", $value);
223 $len = strlen($value);
224 echo pack(
"ssssss", 0x204, 8 + $len, $row, $col, 0x0, $len);
230 return $this->
writeText($row, $col, $value);
235 return $this->
writeText($row, $col, $value);
240 return $this->
writeText($row, $col, $value);
260 throw new Exception(
"Multiple worksheets are not supported with the built-in Excel writer. Install PHPExcel.");
265 throw new Exception(
"Multiple worksheets are not supported with the built-in Excel writer. Install PHPExcel.");
277 $this->content = ob_get_contents();
289 session_cache_limiter(
"private_no_expire, must-revalidate");
290 header(
"Content-Type: application/vnd.msexcel");
291 header(
"Content-Disposition: attachment;filename=$this->filename");
292 header(
"Pragma: private");
293 header(
"Content-Transfer-Encoding: binary");
294 header(
"Content-Length: ".strlen($this->content));
Generate a binary format Microsoft Excel file for download.
abort($error)
Abort processing, output the specified error string.
writeNumber($row, $col, $value)
Write a number to the cell at the specified row and column.
send()
Transmit the spreadsheet to the client.
writeCurrency($row, $col, $value)
Write a number to the cell at the specified row and column with currency formatting.
close()
Prevent further output to the spreadsheet.
writeFooterNumber($row, $col, $value)
Write number with column footer styles.
writeHeading($row, $col, $value)
Write text with column heading styles.
setWorksheetTitle($title)
Set the title of the currently active worksheet.
ExcelFile($filename)
Create a new ExcelFile object.
writeFooter($row, $col, $value)
Write text with column footer styles.
writeText($row, $col, $value, $wrap=false)
Write text to the cell at the specified row and column.
addWorksheet($title)
Adds a new worksheet to the Excel file.
writePercentage($row, $col, $value)
Write a number to the cell at the specified row and column and format as a percentage.
writeSubheading($row, $col, $value)
Write text with column sub-heading styles.
ExcelFileWriter is an abstract factory to allow different Excel libraries to be used at the programme...
static RegisterHandler($handlerClass)
trace($msg, $lvl=3, $callStack=null)
Send output to the trace log.
ajaxReturn($msg=null)
Returns a string output and exits the script cleanly.
Minimum base interface that must be provided by an ExcelFile implementation.
writeFooter($row, $col, $value)
Write text with column footer styles.
send()
Transmit the spreadsheet to the client.
addWorksheet($title)
Adds a new worksheet to the Excel file.
writeText($row, $col, $value, $wrap=false)
Write text to the cell at the specified row and column.
writeHeading($row, $col, $value)
Write text with column heading styles.
close()
Prevent further output to the spreadsheet.
setWorksheetTitle($title)
Set the title of the currently active worksheet.
writeSubheading($row, $col, $value)
Write text with column sub-heading styles.
abort($error)
Abort processing, output the specified error string.
writePercentage($row, $col, $value)
Write a number to the cell at the specified row and column and format as a percentage.
writeNumber($row, $col, $value)
Write a number to the cell at the specified row and column.
writeFooterNumber($row, $col, $value)
Write number with column footer styles.
writeCurrency($row, $col, $value)
Write a number to the cell at the specified row and column with currency formatting.