[Phpwm] Spreadsheet/Excel/Writer.php

alan dunn alan at dunns.co.uk
Fri Nov 10 14:48:47 GMT 2006


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
>>
>
>
>



More information about the Phpwm mailing list