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

如何在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();

阿神
阿神

闭关修行中......

모든 응답(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" );

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!