QFC output another format

From: Date: Wed, 26 May 2004 16:36:45 +0000
Subject: QFC output another format
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12743@lists.php.net to get a copy of this message
Hi! I have a problem with QFC. I would like to generate an Excel File and output it when a button is clicked. The problem seems to be that my index.php outputs a header already so that the Excel header comes too late. Is there any way to get out of this? But maybe I am wrong with my observation so: here my custom-Action: class Classname extends HTML_QuickForm_Action_Submit { function perform(&$page, $actionName) { require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $workbook->send('test.xls'); $worksheet =& $workbook->addWorksheet('Test'); $worksheet->write(0,0,'bla'); $workbook->close(); } } If the target of the page is set to "_blank" a new page opens and then a downloadbox opens asking whether I want to open or save the excel file. When I open I get the same box again, saying open again results in the file being opened in (Real-)Excel. When I say save - a new window opens and I can save the file without a second box. When I do not use "_blank" as target but the original frame then I get the same and an additional Javascript error ... which might come from the template even there is no evidence of that ... regards Daniel

« previous php.pear.general (#12743) next »