如何在php中读取word的table和图片
阿神
阿神 2016-11-09 16:55:02
0
2
2635

如何在php中读取word的table和图片
$word = new COM("word.application") or die("Unable to instanciate Word");
$word->Visible = 0;//打开一个文档
$word->Documents->OPen("e:/word/11.doc");
//读取word的table和图片
-------------------------------------------------------------------------------------------------- 这块代码怎么写 --------------------------------------------------------------------------------------------------
//关闭 word
$word->Quit();

阿神
阿神

闭关修行中......

membalas semua(2)
phpcn_u33
 
// 建立一个指向新COM组件的索引 
$word = new COM("word.application") or die("Can’t start Word!"); 
$word->Visible = 1; #打开一个新文档 
$word->Documents->Add(); 
#写 
$word->Selection->TypeText("This is my a test....."); 
#存 
$word->Documents[1]->SaveAs("D:/tanfanlin.doc"); //打开文档
$word->Documents->OPen("D:/tanfanlin.doc");
echo $word->ActiveDocument->content->Text;
//关闭 word
$word->Quit();?> table 需要转换输出


阿神

header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT"); 
header ("Cache-Control: no-cache, must-revalidate"); 
header ("Pragma: no-cache"); 
header('Content-type: application/rtf'); 
header('Content-Disposition: attachment;filename=paper.rtf'); 
header ("Content-Description: PHP/INTERBASE Generated Data" );

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan
Tentang kita Penafian Sitemap
Laman web PHP Cina:Latihan PHP dalam talian kebajikan awam,Bantu pelajar PHP berkembang dengan cepat!