php execl dde

<?
$excel =new COM("Excel.Application")or die("Unable to instanciate Excel");
print "Loaded excel,version {$excel->Version}n";
$excel->Visible =0;
$book=$excel->Workbooks->open("c://dde.xls");
$sheet=$book->Worksheets("Sheet1");
$a=$excel->DDEInitiate("Excel","c://dde.xls");
$c =$excel->DDEExecute($a,"A1:D1");
(http://www.GetJetso.com - 著數網) $Range=$sheet->Range("A1:D1");
$cell=$Range->Cells(1,4);
echo $cell->value;
$excel->DDETerminate($a);
$excel->Workbooks->Close();
unset($excel);
unset($a);
?>

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *