[英]exporting to word file( *.doc ) in php
i have one php page which prints some information. 我有一个php页面,其中打印了一些信息。 Information is a table with some values dynamicaylly printed in table cells.Now instead of sending this page to browser i want the page to be exported to a word file.How can i do it?
信息是一个表格,表格中的单元格动态地打印了一些值。现在我不希望将此页面发送到浏览器,而是希望将该页面导出到Word文件中,而不是将其发送给浏览器。
In short i have a page A.php
. 简而言之,我有一个页面
A.php
。 A.php contains a link to B.php
. A.php包含一个指向
B.php
的链接。 When the link on A.php
is clicked i want the file to be exported to ms word file (*.doc).
当单击
A.php
上的链接时,我希望将文件导出到ms word文件(*.doc).
The browser should display the box which says save as or open. 浏览器应显示“另存为”或“打开”框。
I used to to above thing is jsp by changing some headers. 我以前通过更改一些标头来实现的是jsp。 But how can i achieve the above thing in php?
但是我如何在php中实现上述目的呢?
google "php microsoft word" 谷歌“ PHP微软Word”
second result: http://forums.devarticles.com/php-development-48/can-php-write-or-read-microsoft-word-files-12011.html 第二个结果: http : //forums.devarticles.com/php-development-48/can-php-write-or-read-microsoft-word-files-12011.html
second post: 第二篇文章:
A library to do this specifically, PHPWord. 一个专门用于执行此操作的库,PHPWord。
Give this a shot. 试一下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.