Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "class.writeexcel_workbook.inc.php";
- require_once "class.writeexcel_worksheet.inc.php";
- $fname = tempnam("/tmp", "list.xls");
- $workbook = &new writeexcel_workbook($fname);
- $worksheet1 =& $workbook->addworksheet('name');
- $heading =& $workbook->addformat(array('align' => 'center', 'bold' => 1));
- $worksheet1->set_column(0, 1, 1);
- $string = "ėčščįęščūųüó"; // special characters
- $worksheet1->write(1, 0, $string, $heading);
- $workbook->close();
- header("Content-Type: application/x-msexcel; charset='UTF-8'; name=\"list.xls\"");
- header("Content-Disposition: inline; filename=\"list.xls\"");
- $fh=fopen($fname, "rb");
- fpassthru($fh);
- unlink($fname);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement