Since COM is a Microsoft invention, it won't surprise you to hear that PHP's COM extension is only available for the Windows version of PHP. If you're using *NIX - well, you're outta luck. Shut down your browser and read a book instead. If you're still interested, though, pop open your favourite editor and create a PHP script containing the following lines of code (this example assumes that you have a properly-installed copy of Microsoft Excel on your system): Now, when you run this script through your Web browser, the following things should happen very fast: 1. Microsoft Excel will start up automatically. 2. A new workbook will be added. 3. The workbook will be automatically saved as "C:\Inventory.xls" 4. Microsoft Excel will automatically shut itself down. Wondering how this happened? Keep reading!
blog comments powered by Disqus |