The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Article Discussion

Too bad it cannot open an existing spreadsheet as a template first. Building a nice spreadsheet from pure code sounds rather nasty - I'd much rather just make a spreadsheet in Excel, upload it, and then get PHP to just change the relevant numbers.

Question about excel and php.
In code i see flying around usin pear with php etc.
I see that have to make a new object by creating a new worksheet of document based on: PEAR::Spreadsheet_Excel_Writer

But I prever making a template and adding data to it, overriding information when writing from pear/php/excelwriter.
But there is no such thing of using excel templates within the pear/php framework I guess. So I have to make a hard coded design template in stead of the easy way layouting a visual rich excel sheet for reports etc.

Very Nice tutorial. But in example_2.php it is said that the Spreadsheet would be generated dynamically, but I saw that the file is getting stored on the server.
Does this mean there is no such feature that the file can get generated dynamically.

be careful about the first two examples!
example 1: my browsers (ie /ff) couldnt open it as an excel file - it showed a mess
example 2: cut and pasting the text misses the crucial href link (use the download above instead)

more importantly the writeRow function is not in the current release of Spreadsheet_Excel_Writer

Warning: main(Spreadsheet/Excel/Writer.php) [function.main]: failed to open stream: No such file or directory in /usr/home/jesdesign/jdhd/Projecten/Bos Consultancy/webnet/intern/wwwroot/_exceltest.php on line 6