RE: Excel Spreadsheet Writer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OUTSTANDING!!!

Thanks for taking the time.

 

However, I am bit confused. Are you telling me that the blank lines are what is causing my problems?

 

 

Jef 

 

________________________________

From: ScotDiddle@xxxxxxxxxxxxxxxxxx [mailto:ScotDiddle@xxxxxxxxxxxxxxxxxx] 
Sent: Tuesday, October 03, 2006 12:41 PM
To: Jef Sullivan; php-general@xxxxxxxxxxxxx
Subject: re: [PHP] Excel Spreadsheet Writer

 

Jef, 

    Hello, Knowing nothing about Excel Writer at the start, I thought I would tackle this... 

    I found all of the pieces on the net and copied to my webserver...
    
    I got the same results you did  until I got my header warnings fixed:

Warning: Cannot modify header information - headers already sent by (output started at C:\WebServ\www\trunk\include\parser.php:1762) in C:\WebServ\www\trunk\include\excelWriter.php on line 67

Warning: Cannot modify header information - headers already sent by (output started at C:\WebServ\www\trunk\include\parser.php:1762) in C:\WebServ\www\trunk\include\excelWriter.php on line 68

Warning: Cannot modify header information - headers already sent by (output started at C:\WebServ\www\trunk\include\parser.php:1762) in C:\WebServ\www\trunk\include\excelWriter.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at C:\WebServ\www\trunk\include\parser.php:1762) in C:\WebServ\www\trunk\include\excelWriter.php on line 70

Warning: Cannot modify header information - headers already sent by (output started at C:\WebServ\www\trunk\include\parser.php:1762) in C:\WebServ\www\trunk\include\excelWriter.php on line 71

    I had serveral others besides the ones listed above...  These are caused by PHP Scripts that post anything before or after the Excel (or any other ) Headers are sent... AND THIS INCLUDES BLANK LINES.
    My problems were caused by:

    1.
    2.    <?php

    ...

    9.    ?>

    Line one above can't be present.

and: 

1.   <?PHP

9.    ?>
10.
11.

Lines 10 and 11 above can't be present...

Once I fixed all of my "Cannot Modify Headers" errors, the Cut and Paste of your exact code, created an Excel Spread Sheet. 

When I ran your code, I got a Open File Dialog box, that says:  "You have chosen to open    "test.xls" which is a Microsoft Excel Spreadsheet...  What should Firefox do ?  Save or Open.-

I chose open, and there it is ! 

I got no output on my Web Browser page at all  ( View source just showe <html><head></head><body></body></html> )

Hope this Helps.

Scot L. Diddle, Richmond VA, UPS Freight, 804.231.8407 

________________________________

From: "Jef Sullivan" <jsullivan@xxxxxxxxxxxxxx>
Sent: Monday, October 02, 2006 8:44 PM
To: php-general@xxxxxxxxxxxxx
Subject: [PHP] Excel Spreadsheet Writer

Greetings all,



I am having some problems with the Excel Spreadsheet Writer and I am hoping that I can get some help from

this group. I am getting garbled text in my spreadsheet when I go to run the php file. I created a general file to 

see if I could narrow the problem down. No luck so far…



This is what I am getting in the spreadsheet…



ÐÏࡱá; 
________________________________

þÿ  
________________________________

þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ[1] 
________________________________

________________________________

 
þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ l ÉB[1]ä 
________________________________

[1] 
________________________________

My first worksheet=¼%r8X[1]"[1]1ÈÿArial1ÈÿArial1ÈÿArial1ÈÿArial1ÈÿArial1È Arialàõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À àõÿ À à À à À “[1] 
________________________________

€ÿ’â8ÿÿÿÿÿÿÿÿÿÿÿÿ€€€€€€€€€ÀÀÀ€€€™™ÿ™3fÿÿÌÌÿÿffÿ€€fÌÌÌÿ€ÿÿÿÿÿÿ€€€€€ÿÌÿÌÿÿÌÿÌÿÿ™™Ìÿÿ™ÌÌ™ÿÿÌ™3fÿ3ÌÌ™ÌÿÌÿ™ÿfff™–––3f3™f333™3™3f33™333…? 
________________________________

My first worksheet l É[1][1][1]*[1]+[1]€‚[1][1]Á 
________________________________

¡"d[1]X[1]X[1]à?à?[1] 
________________________________

[1] 
________________________________

[1] 
________________________________

Name 
________________________________

[1] 
________________________________

Age 
________________________________

[1] John Smith 
________________________________

[1]
>@ 
________________________________

[1][1]
Johann Schmidt 
________________________________

[1]
[1]?@ 
________________________________

[1] 
________________________________

Juan Herrera 
________________________________

[1]

________________________________

@@)ð?(ð?'è?&è?„[1]ƒ[1]>[1] ¶ 
________________________________

Root Entryÿÿÿÿÿÿÿÿ [1]ÀFC‑x'æÆC‑x'æÆÀ 
________________________________

Book [1]ÿÿÿÿÿÿÿÿÿÿÿÿ



This output makes me thing that the reference to the Writer.php file is not correct. I have verified that the file is located in the given path and that

All other references are correct. Here is my code for the generic test file….




require_once '../xls/Spreadsheet_Excel_Writer-0.8/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();

?>



Any suggestions on getting this resolved?

If this is the wrong list, please let me know where I can send this question.

Perhaps it is the way I installed the Writer? All I did was copy it over from another machine.







Jef Sullivan

Programmer

Progrexion

work: 801-828-1745

moble: 801-682-9727

email: jsullivan@xxxxxxxxxxxxxx



Research | Marketing | Sales Generation www.progrexion.com 



This email and its contents are confidential. If you are not 

the intended recipient, delete this email and do not use or

disclose the information within this eamil or its

attachements. Thank you.








[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux