简体   繁体   English

是否有用于XLSM(带有宏的Excel)解析/编辑的PHP库?

[英]Is there a PHP library for XLSM(Excel with Macro) parsing/editing?

  • I know that PHPExcel does not support XLSM files. 我知道PHPExcel不支持XLSM文件。
  • I have tried Iliaal's wrapper around Libxl, can be found here 我已经尝试过围绕Libxl的Iliaal包装器, 可以在这里找到

However both of them do not support XLSM , they do cool with XLS though. 但是它们都不支持XLSM ,但是它们确实可以和XLS一起使用。 I have searched all over the internet and didn't find a library, or a method with PHP to do so. 我已经在整个互联网上进行搜索,但是没有找到库或使用PHP进行搜索的方法。

By the way, my environment is *NIX . 顺便说一下,我的环境是* NIX

EDIT I do not need to edit macros itself. 编辑我不需要编辑宏本身。 I don't want to touch them, but I want a library/wrapper/command line executable(as last resort) to work with XLSM files(XML Sheets with Macros). 我不想碰它们,但我想使用库/包装器/命令行可执行文件(作为最后的手段)来处理XLSM文件(带有宏的XML Sheets)。

Thanks. 谢谢。

This is completely out of my knowledge as I'm only familiar with PHPExcel ... However there might be something for you in this discussion about Read/Write macro in .xlsm ? 这完全是出于我的知识,因为我只熟悉PHPExcel ...但是,在有关Read/Write macro in .xlsm讨论中,可能会为您提供一些帮助? There seems to be no library but this sure looks promising. 似乎没有图书馆,但是这看起来很有希望。

Read/Write macro in .xlsm .xlsm中的读/写宏

We've faced the exact same problem as you mentioned where we need to modify Excel workbooks but to do not want to impact the existing macros. 我们已经遇到了与您提到的完全相同的问题,我们需要修改Excel工作簿,但又不想影响现有的宏。

To do so, we've used the LibXL library and as of version 3.3.1 it supports the preservation of macros for .xls files. 为此,我们使用了LibXL库,从3.3.1版本开始,它支持保留.xls文件的宏。 It is not written in PHP, therefore we wrote a small C++ program and then we call this program from php via the exec() PHP method. 它不是用PHP编写的,因此我们编写了一个小型C ++程序,然后通过exec() PHP方法从php调用此程序。 It works very well. 效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM