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

Justin Silverton\'s Blog: PHP Security Mistakes - Part 2

DevShed: Constructing Multi-Line PDF Documents with PHP 5

PHPMaster.com: Access the Windows Registry from PHP

Community News: The Obfuscator

Zend Developer Zone: Wrapping C++ Classes in a PHP Extension


Community Events

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


introduction conference api release performance series symfony2 podcast framework part2 language community application configure php7 voicesoftheelephpant interview opinion example laravel

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