I'd like to make server-side excel compatible spreadsheets that maybe use OpenXML or a structured data format.
I've used Office Interop before to generate Excel spreadsheets, but those apps run on a PC that has office installed.
For this web project I'm building, the server doesn't have Office installed (and they don't want to buy it).
What's the best library for me to use that allows me to generate Office compatible spreadsheets from a windows server 2k8 using IIS7?
Some additional requirements:
- Ideally, free
- Allows for simple cell formulas that can be inserted at runtime
Take a look at the Simple OOXML open source library.
Checkout my post Reading Excel Files as a Server Process for a list of some paid ones.
The one I opted for named FlexCel was very easy to use, allowed formulae to be used at run-time, was fully managed and low cost/royalty free.
I've used SmartXLS to create (and process) Excel sheets on the server.
We have found SpreadsheetLight to be both excellent and open source.
A very simple solution is:
You can build the content of the spreadsheet as a html table. Return the table to the browser with the appropriate headers set.
You can even add excel formulas and do simple formatting.
You can simply save your data into a comma separated values (CSV) file with .xls extension.
Example:
column1,column2,column3
value11,value12,value13
value21,value22,value23
value31,value32,value33
value41,value42,value43
value51,value52,value53