I was wondering can I geterate Excel Spreadsheet with multiple workbook and if anyone can show me how? Thanks.
MODx has no add-on for that (that I know of). You could adapt an existing one or just create a CSV file and import it into Excel.
Then how would one go about to generate report in Ms EXcel or PDF? I like to generate some reports that user can download and save. I was wondering if MODx already have some pkugin or internal API to handle these basic functionality. Does anyone have some idea or snippet that can create Excel and PDF files? Thanks.
Note that, AFAIK, none of those tools will create an Excel file from scratch. They only read from and write to existing Excel files.
The trick is to have an empty Excel file (created with Excel) that already has the empty worksheets you want to write to. Using PHP, you’d copy that file and then fill it with your data.
Also, I think some of those classes assume a windows environment and VB. You probably don’t want that.
I actually wrote a really nice class to read and write Excel files a long, long time ago. It’s in C++, but could easily be converted to PHP. Unfortunately, it was several computers ago and I don’t think I could find it. :’(