SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | require_once "class.writeexcel_workbook.inc.php"; | |
| 3 | require_once "class.writeexcel_worksheet.inc.php"; | |
| 4 | ||
| 5 | $fname = tempnam("/tmp", "list.xls");
| |
| 6 | $workbook = &new writeexcel_workbook($fname); | |
| 7 | $worksheet1 =& $workbook->addworksheet('name');
| |
| 8 | $heading =& $workbook->addformat(array('align' => 'center', 'bold' => 1));
| |
| 9 | $worksheet1->set_column(0, 1, 1); | |
| 10 | ||
| 11 | - | $string = "ėčščįęščūų"; // special characters |
| 11 | + | $string = "ėčščįęščūųüó"; // special characters |
| 12 | ||
| 13 | $worksheet1->write(1, 0, $string, $heading); | |
| 14 | ||
| 15 | $workbook->close(); | |
| 16 | ||
| 17 | header("Content-Type: application/x-msexcel; charset='UTF-8'; name=\"list.xls\"");
| |
| 18 | header("Content-Disposition: inline; filename=\"list.xls\"");
| |
| 19 | $fh=fopen($fname, "rb"); | |
| 20 | fpassthru($fh); | |
| 21 | unlink($fname); | |
| 22 | ?> |