我知道用 new COM("Excel.sheet") 但是,我现在脑子都乱的一塌糊涂!!我要疯了!啊/!!!!!!!
There is a demo to show how to use word in PHP. // starting word $word = new COM("word.application") or die("Unable to instanciate Word"); print "Loaded Word, version {$word->Version}\n";//bring it to front $word->Visible = 1;//open an empty document $word->Documents->Add();//do some weird stuff $word->Selection->TypeText("This is a test..."); $word->Documents[1]->SaveAs("Useless test.doc");//closing word $word->Quit();//free the object $word->Release(); $word = null;
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";//bring it to front
$word->Visible = 1;//open an empty document
$word->Documents->Add();//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");//closing word
$word->Quit();//free the object
$word->Release();
$word = null;
搜索些别人写的代码,片断也可以。在仔细的尝试。
搜到一篇:
http://www.hooday.com/manual/ref.com.php别急!
很感激大家!!!
.Open("C:\MyFolder\MyBook.xls")看msdn吧,很详细。搞清楚对象之间的关系