Hi,
I'm trying an example php script that creates an Excel spreadsheet. The script fails with OleMainTreadWndName. It appears Excel is started but when trying to make visable fails. The script is below. Can you help?
Thanks
Michael
?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;
?>