 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
sp00n
Joined: 20 Jul 2007 Posts: 1
|
Posted: Fri Jul 20, 2007 4:26 pm Post subject: Excel Spreadsheet Writer: File Streaming? |
|
|
Hello,
I am using the PEAR Excel Spreadsheet Writer to generate a formatted excel file, which is working just fine (despite the somewhat weird merging functions, where either the cells are not properly merged (setAlign) or the height of the cell doesn't adapt to the lines present in the string (setMerge)).
Anyway, my real question is, is there some way to "stream" to file?
Currently it seems that first the file is completely generated first, and if the file is rather large (> 1 MB), it takes quite a while before the download as popup message appears.
Before I had found the Spreadsheet Writer, I was simply using the XLS headers
header("Content-type: application/vnd-ms-excel");
header("Content-Disposition: attachment; filename=export.xls");
to output a simple HTML table as an .XLS file.
The download popup would almost start immediately and then the file would be streamed to the client.
Of course, the downside of an HTML table is that actually opening the file in Excel takes forever, which is why I dropped that approach in favor of the PEAR solution.
Now, if I only could get that streaming to work... |
|
| Back to top |
|
 |
diabolik
Joined: 30 Oct 2007 Posts: 2
|
Posted: Tue Oct 30, 2007 5:24 pm Post subject: Hi |
|
|
Did you ever get a solution to this???
I have exactly the same problem (if I got it correctly) i.e. cannot manage to write the damn file to disk.
I've seen the method:
Workbook::&setTempDir
but it has no effect (I think it's only used as a temp, what a guess....).
So: what if I have to generate a number of Excel files, zip them and then send the whole stuff to a user??
 |
|
| Back to top |
|
 |
diabolik
Joined: 30 Oct 2007 Posts: 2
|
Posted: Tue Oct 30, 2007 5:43 pm Post subject: |
|
|
Oh my gosh.... thanks to codewalker....
As simple as that!!!
$w2 = new Spreadsheet_Excel_Writer('c:/temp/cazzo.xls');
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|