News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Dotvoid.com:
Generating Excel files with PHP
July 10, 2007 @ 07:46:47

Danne Lundqvist has posted about the process he went through when developing a solution to create Excel files in PHP:

I'm on this project at work where we need to create an excel file and send it via email or ftp to a recipient. The normal answer to this is to create a comma separated file and name it .xls and excel will work it out. However, that only works if you open it directly through an http request and are able to set the http headers correctly.

To get around these limitations, he found two solutions (thanks Google!) in PEAR's Spreadsheet_Excel_Writer and an MS-Excel Stream Handler class. He includes code that gives an example of another solution, one that packs data into a binary string and returns it as a part of the Excel document.

2 comments voice your opinion now!
excel file pear spreadsheet msexcel stream handler excel file pear spreadsheet msexcel stream handler


blog comments powered by Disqus

Similar Posts

Community News: Latest PEAR Releases for 09.11.2006

Benjamin Eberlei's Blog: Trying a Two Step PEAR/PHAR approach to develop and deploy

Developer.com: Creating Complex, Secure Web Forms with PHP and HTML_QuickForm2

Paul Reinheimer's Blog: Storing Sessions in Memcache (how everything behaves)

Greg Beaver's Blog: Working towards Pyrus and PEAR2, check it out or miss out


Community Events





Don't see your event here?
Let us know!


install voicesoftheelephpant version security podcast introduction opinion application tool package language interview series framework symfony community composer laravel release library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework