tags:

views:

38

answers:

3

I have a program that currently outputs Excel via SpreadsheetML files. I build these using streams. This is very space inefficient for Excel; the files can be 5 to 6 times as large as other Excel binary formats.

I would like to output a binary excel format such as .xls or .xlsx, but I don't want to have the installation of the program depend on Office. Some users might have it installed, some might not. How can I handle this gracefully? Is it possible to not have an assembly as a dependency but based on the user enabling binary output still use the assembly?

+1  A: 

Hi,

If your base programming platform is Java you can use POI. If it's .NET you can use NPOI (a port of POI, actively under development).

Most of the features are supported by these libraries. You need not install Office, just include the corresponding libraries in your program.

rAm.

rAm
A: 

I have used a component to do exactly this before - Syncfusion XlsIO:

http://www.syncfusion.com/products/reporting-edition/xlsio

Very nice it is too.

chibacity
A: 

Do you have a specific requirement for a binary file vs. some other format that Excel will read nicely? Will the old trick of outputting an HTML table with .xls extension work for your application? Excel will render formatting properly and I think you can even embed formulas in the table cells and they will be rendered in Excel too...

Aerik
The question ask specifically about using a binary format to get a more compact file size. Whilst HTML representation may be more compact than the office Xml format, it is still text and will also have big floppy tags.
chibacity