Windows XP Pro SP1 keep giving me the "Send this error to Microsoft" dialog when I try to run this generic code. I have go to the Apache service and set the logon to allow Apache to integrate with the desktop and I have set the DCOM settings to true in the PHP.ini file. This doesn't work on Win 2K for me either.
I am running PHP ver 5.0.0 Dev.
Any ideas?
<?php
// create an object instance
$excel = new COM("Excel.Application") or die("Excel could not be
started");
// pop open the Excel application
$excel->Visible = 1;
// turn off alerts
$excel->DisplayAlerts = 0;
// add a workbook
$excel->Workbooks->Add();
// save
$excel->Workbooks[1]->SaveAs("C:\Inventory.xls");
// close the application
$excel->Quit();
$excel = null;
?>