Re: Re: Exporting HTML to Excel
| From: | Philip Thompson | Date: | Wed, 13 Oct 2004 15:31:25 +0000 |
| Subject: | Re: Re: Exporting HTML to Excel | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-199384@lists.php.net to get a copy of this message | ||
To all who've helped.
Thanks for your input. [embarrassment] Truthfully, when I gave that example in my original email, I didn't try that specific one. But it did work for me also when I attempted that one. [/embarrassment]
The reason I was getting a blank spreadsheet was b/c I was only showing specific columns based on whether certain $_SESSION variables were set. However, the page that's supposed to export to excel, I did not include my
session_start(), so none of the variables were ever TRUE. Once I saw that and fixed it, it worked like a charm!
But I have run across a small dilemma at this point. I cannot open the excel file using IE. However, I can through Mozilla and Safari. Guess this is something else I have to look at and try to tackle!
Thanks again!
~Philip
On Oct 13, 2004, at 9:45 AM, Gryffyn, Trevor wrote:
One recommendation might be to make something in Excel, do a Save As.. To HTML and see what kind of tags it puts in the HTML. There are some in there specifically for storing formulas and such. You can probably embed that in the HTML you output via this method and do some fancy stuff with Excel. -TG-----Original Message----- From: Gryffyn, Trevor Sent: Wednesday, October 13, 2004 10:41 AM To: php-general@lists.php.net Subject: RE: [PHP] Re: Exporting HTML to Excel-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpPhilip Thompson wrote:Worked for me too.. Even though I didn't think it would :) Seemed too simple. I'm running Excel 2002. -TG------------- <?php header('Content-Type: application/ms-excel'); header('Content-Disposition: attachment; filename="project.xls"'); ?> <table>Works for me... (Excel 2000) "Something" appears in A1 "Something Else" appears in B1.<tr> <td>Something</td> </td>Something else</td> </tr></table> ------------- I just want it to have that content in the spreadsheet.