doushang8512 2015-01-31 12:58
浏览 109

如何使用PHP编辑现有的.xls Excel文件

I am trying to edit my existing .xls Excel file. But i can't find the proper way to edit existing .xls excel file.

I had used PHPEXCEL for reading the .xls file and then writing the .xls file. But in that I lost some excel functionality like 'macro', 'vb form' from existing .xls file.

In my case, I need to update my Excel file day by day. So currently I am using PHPEXCEL, first I need to read Excel then write it with a new record.

So I am finding the way to edit existing .xls file with my new record.

Please share your idea if you find.

  • 写回答

1条回答 默认 最新

  • dpxw7293 2015-01-31 13:08
    关注

    If you need support for macros and forms, then you're pretty limited in your choices. There's only 3 options available:

    • Ilia Alshanetsky's Excel extension now on github (requires commercial libXL component)
    • PHP's COM extension (requires a COM enabled spreadsheet program such as MS Excel or OpenOffice Calc running on the server)
    • The Open Office alternative to COM (PUNO) (requires Open/Libre Office installed on the server with Java support enabled)
    评论

报告相同问题?