public function Excel_XML::generateXML in Ubercart CSV 7.2
Same name and namespace in other branches
- 6.2 inc/excel-export.inc \Excel_XML::generateXML()
Generate the excel file
Parameters
string $filename Name of excel file to generate (...xls):
File
- inc/
excel-export.inc, line 153
Class
- Excel_XML
- Generating excel documents on-the-fly from PHP5
Code
public function generateXML($filename = 'excel-export') {
// print out document to the browser
// need to use stripslashes for the damn ">"
$output = stripslashes(sprintf($this->header, $this->sEncoding));
$output .= "\n<Worksheet ss:Name=\"" . $this->sWorksheetTitle . "\">\n<Table>\n";
foreach ($this->lines as $line) {
$output .= $line;
}
$output .= "</Table>\n</Worksheet>\n";
$output .= $this->footer;
return array(
'contents' => $output,
'encoding' => $this->sEncoding,
);
}