php读取word并解析图片,如何在php中读取word的table和图片

如何在php中读取word的table和图片

745f357dd10d7eefd598e7737aeaad65.png

阿神2016-11-09 16:55:02 0 2 914

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

1634.html

回答

2

0

分享

全部回复 (2)

a34c955e86943960a8b7358b0b6dc380.png

学习ing已被采纳2016-11-09 16:55:382楼

// 建立一个指向新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 需要转换输出

1634.html

回复1e6335129cc9d8fb9d4f77d912b3c3bd.png

汪汪2016-11-09 16:55:161楼

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" );

1634.html

回复

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值