Hi!
I looked around here for ole automation with excel, and put this
togther, which give this error:
Parse error: parse error, unexpected T_VARIABLE in C:\Inetpub\wwwr oot
\JOTIntranet\Mo dules\changebro wser\excel2.php on line 14 (14= save
as).
I have tried a number of thigs, but cannot make this work... and not
figure out what it is
<?php
$excel = new COM("excel.appl ication") or die("unable to instantiate
MSExcel");
//Ignore Alerts
$excel->DisplayAlert s = 0;
//Make Excel Visible
$excel->Visible = 1;
//Create a new workbook
$WB = $excel->Workbooks->Add;
$OutputFilename =dirname(__FILE __)."\\test_exc el2.xls"
$excel->ActiveWorkbo ok->SaveAs("test_e xcel2.xls");
//Clean up and close, quit, release
$WB->Close();
//unset($WS);
unset($wB);
$excel->Workbooks->Close();
$excel->Quit();
unset($excel);
?>
I looked around here for ole automation with excel, and put this
togther, which give this error:
Parse error: parse error, unexpected T_VARIABLE in C:\Inetpub\wwwr oot
\JOTIntranet\Mo dules\changebro wser\excel2.php on line 14 (14= save
as).
I have tried a number of thigs, but cannot make this work... and not
figure out what it is
<?php
$excel = new COM("excel.appl ication") or die("unable to instantiate
MSExcel");
//Ignore Alerts
$excel->DisplayAlert s = 0;
//Make Excel Visible
$excel->Visible = 1;
//Create a new workbook
$WB = $excel->Workbooks->Add;
$OutputFilename =dirname(__FILE __)."\\test_exc el2.xls"
$excel->ActiveWorkbo ok->SaveAs("test_e xcel2.xls");
//Clean up and close, quit, release
$WB->Close();
//unset($WS);
unset($wB);
$excel->Workbooks->Close();
$excel->Quit();
unset($excel);
?>
Comment