[Phpwm] Spreadsheet/Excel/Writer.php
alan dunn
alan at dunns.co.uk
Fri Nov 10 15:02:58 GMT 2006
Yup, we found the bug reports - but no fixes! The comments about size of
file, or server overload seem a bit out of place when the test file is
about 4k. It looks like something which could be version or installation
specific - obviously there are others running this with no problems.
We are running suse linux 10.1
regards, alan dunn
James Timbrell wrote:
> It looks like others are having the same problem:
>
> http://pear.php.net/bugs/bug.php?id=6584
>
> I'll keep looking around. I can open the file fine when I try it.
>
> Are you developing using a Linux server, or on windows with LAMP?
>
> James.
>
> On 10/11/06, alan dunn <alan at dunns.co.uk> wrote:
>>
>> yes, we tried this at first, then modified the content - still no
>> difference.
>>
>> James Timbrell wrote:
>> > Is this the example you tried?
>> >
>> >
>> > <?php
>> > require_once 'Spreadsheet/Excel/Writer.php';
>> >
>> > // Creating a workbook
>> > $workbook = new Spreadsheet_Excel_Writer();
>> >
>> > // sending HTTP headers
>> > $workbook->send('test.xls');
>> >
>> > // Creating a worksheet
>> > $worksheet =& $workbook->addWorksheet('My first worksheet');
>> >
>> > // The actual data
>> > $worksheet->write(0, 0, 'Name');
>> > $worksheet->write(0, 1, 'Age');
>> > $worksheet->write(1, 0, 'John Smith');
>> > $worksheet->write(1, 1, 30);
>> > $worksheet->write(2, 0, 'Johann Schmidt');
>> > $worksheet->write(2, 1, 31);
>> > $worksheet->write(3, 0, 'Juan Herrera');
>> > $worksheet->write(3, 1, 32);
>> >
>> >
>> >
>> > // Let's send the file
>> > $workbook->close();
>> > ?>
>> > If not, what happens when you try this?
>> >
>> >
>> > James
>> >
>> > On 10/11/06, alan dunn <alan at dunns.co.uk> wrote:
>> >>
>> >> hi James
>> >> I have:
>> >> $workbook = new Spreadsheet_Excel_Writer();
>> >>
>> >> // sending HTTP headers
>> >> $workbook->send('testfile.xls');
>> >>
>> >> // create the content
>> >>
>> >> $workbook->close();
>> >>
>> >> I copied the code right off the pear page!
>> >>
>> >> James Timbrell wrote:
>> >> > Hi Alan,
>> >> >
>> >> > How is the .xls file getting to your desktop?
>> >> >
>> >> > The way I've used Spreadsheet_Excel_Writer is that the excel file
>> gets
>> >> > generated on the server in a specified directory, and once it's
>> >> created
>> >> I
>> >> > show a hyperlink which the user can then click to download/open the
>> >> file.
>> >> >
>> >> > Just wondering what your setup is.
>> >> >
>> >> > James.
>> >> >
>> >>
>> >> _______________________________________________
>> >> Phpwm mailing list
>> >> Phpwm at mailman.lug.org.uk
>> >> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>> >>
>> >
>> >
>> >
>>
>> _______________________________________________
>> Phpwm mailing list
>> Phpwm at mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>>
>
>
>
More information about the Phpwm
mailing list