News Feed
Sections




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

InformBank.com:
How to create Microsoft Office documents on the fly using PHP
August 07, 2006 @ 11:57:37

In this new tutorial from InformBank posted today, they show how to use PHP (and a few handy tricks) to create Microsoft Office documents on the fly.

Sometimes you have to generate some MS Office document for the users of your website using dynamic data. For example, few days ago, I had to generate some Excel reports using data from some tables in MySQL. I knew about the COM but it has a lot of disadvantages, including Windows-only platform and not very high speed. CSV is much easier and faster but you can't format the cells to make them better-looking. The method I've never thought about before was using HTML.

So here came the inspiration and after some research and experiments I wrote this tutorial for all of you who are looking how to create Office documents on the fly using PHP. Of course, I included the COM methods and some methods to create other MS Office documents like DOC and PPT, to make this tutorial as full and as useful as possible.

The tutorial starts with the creation of documents (Word, Excel, Powerpoint) with the COM functionality (the standby method PHP has had for a while). Of course, it also requires the script to be running on Windows to work. So, what's the other option? As he goes on to explain, it's something as simple as HTML.

He includes two examples of alternate mathods, showing hhow to use HTML or a CSV file to create a custom Excel document. He also throws in some code to help you stream out the resulting document as a zip file to the browser.

0 comments voice your opinion now!
microsoft document onthefly com extension html csv file microsoft document onthefly com extension html csv file


blog comments powered by Disqus

Similar Posts

Christopher Jones' Blog: Oracle Announces New Connection Pooling Feature

Marcelo Araujo's Blog: my first extension - filter_ptBR

Zend Developer Zone: PHP Abstract Podcast Episode 27: Introducing PECL Picks

NETTUTS.com: CodeIgniter from Scratch: File Uploading and Image Manipulation

PHPit.net: Create your own HTML widgets with PHP


Community Events

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


framework series api laravel5 extension release list example introduction interview opinion library language php7 voicesoftheelephpant laravel unittest podcast version community

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