views:

15

answers:

1

Hi,

I'd like to offer the possibility for users of my app to export to Excel. I don't ever need to read Excel files.

The three ways I know right now is to

  1. make a CSV file, which isn't too great as I'd like to have some custom formatting in the spreadsheet
  2. make an XML file that I don't think people'd recognize as an Excel file
  3. make a template xlsx file, unzip it in the app, do a lot of search-replacing in the files and then zip it back up again

Are there other alternatives? I'm not sure how supported .xlsx files are, and that seems like very much work. Are there any frameworks out there I can lean on, that perhaps even make old-school .xls files?

Cheers

Nik

+1  A: 

Some options for you to consider:

1) You may be able to use ooxml http://en.wikipedia.org/wiki/Office_Open_XML_file_formats. You may need the "office compatibility pack" on computers with excel 2003 or lower http://go.microsoft.com/?linkid=5754865.

2) Excel 2000 uses the BIFF file format: http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBcQFjAA&url=http%3A%2F%2Fsc.openoffice.org%2Fexcelfileformat.pdf&ei=iDx0TKOhBIqmnQfckKy7CQ&usg=AFQjCNE2w4xyFSoKmvKdsa7O9TMqynYpbA (pdf). You may be able to create simple documents from the spec or based on other info on the web.

bugtussle
Thanks, I ended up going the route of option #3
niklassaers