For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > July 2007 > Re: [PEAR] Re: Using Excel Spreadsheet Writer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Re: Using Excel Spreadsheet Writer
Mark Wiesemann

2007-07-17, 7:02 pm

Tom Synnott wrote:
> Mark I tried this...
>
> $xls->write("/home/19288/domains/mydomain.com/html/reports/test.xls");
>
> But I received the error call to undefined method... Am I not
> understanding this correctly?


Please send your emails also to the list, thanks.

You're mixing two things here:
write() (on a worksheet, not the workbook) writes into the spreadsheet,
it does not write a file.

What you need to do is: Pass the filename to the constructor, do the
normal operations (writing, formatting etc.) on the workbook and the
sheets, call $xls->close();, and the file will be written (and not sent
to your browser).

Regards,
Mark

--
http://www.markwiesemann.eu
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com