Re: Structures_DataGrid_Renderer_XLS: I just get empty files

From: Date: Mon, 26 Feb 2007 19:57:16 +0000
Subject: Re: Structures_DataGrid_Renderer_XLS: I just get empty files
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26680@lists.php.net to get a copy of this message
Markus Ernst wrote: > I use Structures_DataGrid for exporting database records to Excel. > Anyway, all I get is an empty file which neither Excel nor OpenOffice > can read, while the same works without problems with the CSV renderer. > Here is my code with some test data: Your code nearly works for me, if I remove the linebreak here: > header('Content-Disposition: attachment; > filename="'.$filename.'.'.$suffix.'"'); Maybe that was only a screwup of your newsreader. Open Office happily opens the resulting file. So probably the culprit is not your code. Perhaps you one of your PEAR packages is too old? Here I have: Structures_DataGrid 0.8.1 beta Structures_DataGrid_DataSource_Array 0.1.2 beta Structures_DataGrid_Renderer_XLS 0.1.1 beta Regards... Michael

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