如何使用PHP读取可编辑的pptx / docx / xlsx文件? [英] how can I read write edit pptx/docx/xlsx files using PHP?
问题描述
是否有可用的库扩展程序来使用PHP有效地处理pptx / docx / xlsx文件?到目前为止,我对PPTX文件更感兴趣。谢谢
Is there a library extension available for efficiently handling pptx/docx/xlsx files using PHP? As of now I am more interested in PPTX files. Thanks
推荐答案
据我所知,那些文件格式docx,xlsx,pptx只是zip文件。
属于Office Open XML(OOXML)标准。
As per what i know, those file formats docx,xlsx,pptx are just zip files. they belong to Office Open XML (OOXML) standard.
在PHP中,我们有一个用于处理此类zip文档的库:
http://php.net/manual/zh/book.zip.php
In PHP we have this library for manipulating this type of zip documents: http://php.net/manual/en/book.zip.php
您可以在此处找到有关此ooxml标准的所有文档:
http://www.ecma-international.org/publications/standards/Ecma-376.htm
You can find all documentation about this ooxml standard here: http://www.ecma-international.org/publications/standards/Ecma-376.htm
测试这些ooxml文件结构的最佳方法是将文件
扩展名更改为.zip,然后将其解压缩以找出其中的内容。
The best way to test the structure of these ooxml file is to change the file extension to .zip, and the extract it out to find out what are inside.
如果您不想建立自己的库来处理ooxml文件,则
您可以在此处参考相关问题以获取更多信息:
PHP OOXML库?
If you don't want to build your own library for processing ooxml files, you can refer to a related question here for more info: PHP OOXML Libraries?
我从相关领域读到上面提到的ted stackoverflow问题,
您可以使用phpdocx或其他一些称为PHPWord的东西。
As i read from the related stackoverflow question mentioned above, you can use the phpdocx, or somewhat other called PHPWord.
希望这可以阐明一些步骤来帮助您完成所需的工作
Hope this may clarify some steps to help get your wants done
这篇关于如何使用PHP读取可编辑的pptx / docx / xlsx文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!