Reply to problem with excel

Your name:

Reply:


Posted by Sonnich on 03/16/07 13:52

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\wwwroot
\JOTIntranet\Modules\changebrowser\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.application") or die("unable to instantiate
MSExcel");

//Ignore Alerts
$excel->DisplayAlerts = 0;
//Make Excel Visible
$excel->Visible = 1;
//Create a new workbook
$WB = $excel->Workbooks->Add;

$OutputFilename=dirname(__FILE__)."\\test_excel2.xls"

$excel->ActiveWorkbook->SaveAs("test_excel2.xls");

//Clean up and close, quit, release
$WB->Close();
//unset($WS);
unset($wB);
$excel->Workbooks->Close();
$excel->Quit();
unset($excel);
?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация