Hi everybody,
When i run the following script in a dos box it works fine. If i run it in
a browser window i receive a Dr Watson.
Anybody has an idea ?
My config is
Apache 1.3.20
PHP 4.0.5
Windows NT4 SP5 French
The script is inspired of the following url
http://www.phpbuilder.net/columns/alain20001003.php3
<?
$workbook = "D:\CAC40.XLS";
$sheet = "Feuil1";
#Instantiate the spreadsheet component.
$ex = new COM("Excel.application") or Die ("Did not connect");
#Open the workbook that we want to use.
$wkb = $ex->application->Workbooks->Open($workbook,3) or Die ("Did not
open");
$sheets = $wkb->Worksheets($sheet); #Select the sheet
$sheets->Calculate;
$sheets->activate; #Activate it
$cell = $sheets->Cells(2,2) ; #Select the cell (Row Column number)
$cell->activate; #Activate the cell
$oldcell=$cell->value;
print "Cac40 = {$cell->value} <BR>"; #Print the value of the
cell:10000
$cell = $sheets->Cells(1,2) ; #Select the cell (Row Column number)
$cell->activate; #Activate the cell
$oldcell=$cell->value;
print "DowJones = {$cell->value} <BR>"; #Print the value of the
cell:10000
#Close all workbooks without questioning
$ex->application->ActiveWorkbook->Close(False);
unset ($ex);
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]