Trouble opening excel workbook
| From: | Louis Young | Date: | Mon, 17 Jan 2005 12:46:14 +0000 |
| Subject: | Trouble opening excel workbook | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25355@lists.php.net to get a copy of this message | ||
Hi there
I'm having a bit of trouble opening an Excel workbook.
The following code:
// Set the workbook to use and it's sheet
$workbook=$_GLOBALS["templatedir"]."\ElectricityTransactions.XLT";
$sheet="Sheet1";
//Instantiate the spreadsheet component.
$ex = &new COM("Excel.sheet") or Die ("Did not connect");
//$ex->Application->Visible = 1; #Uncomment to make Excel visible.
//Open the workbook that we want to use.
$wkb = $ex->application->Workbooks->Open($workbook) or Die ("Did not open");
echo "Opened workbook";
exit();
produces the following output:
Did not open
Any ideas?
Cheers
Louis