开发者

Reading and writing an Excel sheet with form elements using PHP on Linux

One of our clients is trying to find a way to automate filling out a form that is supplied by one of their vendors. It is an Excel spreadsheet that contains dropdowns and checkboxes. Catch is that they must submit the form on a daily/weekly basis using this exact spreadsheet "form" and they are trying to remove the human processing from the loop.

I have tried using PHPExcel to read the files, but I cannot for the life of me figure out how to set the value of the dropdowns -or- to check one开发者_如何学编程 of the checkboxes.

As a secondary note, if I were simply to load and then rewrite the file as a new file, the dropdowns and checkboxes simply disappear from the file.

Thanks, Dan


Assuming the form doesn't change, you could always bind the values to a separate data source, then change that.


PHPExcel does not handle form element... I'm not aware of any PHP Excel library that does. You may be able to do this using COM with Excel (if you're on a Windows server), and I have been told that this might be possible under Linux using Wine or CORBA with Open/LibreOffice. Using ODBC to access the Excel workbook may be another option.

Alternatively, if you're on Linux, you might be able to use Ilia Alshanetsky's PHP Excel extension, which is a wrapper for the commercial LibXL library

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜