Can I create an Excel sheet using the C# without having MS Office installed on the host machine?
Asked
Active
Viewed 452 times
0
-
1Possible duplicate: [How can I programatically create, read, write an excel without having office installed?](http://stackoverflow.com/questions/1369361/how-can-i-programatically-create-read-write-an-excel-without-having-office-ins) – Alexandre Jun 05 '12 at 05:36
3 Answers
0
If you are targetting Office 2007+ - you can take a look at the the Office Open XML. Your .xlsm is basically a compressed XML file and as long as you are not doing anything fancy - it should be easy to generate.
If however - you are targeting Office 2003 or earlier - the .xls is a binary format. You might need to look at abiword or star office to see if you can use any of their code to serialize you data to it.

quixver
- 564
- 1
- 4
- 11
-1
In the past I've created a simple HTML table and saved as .xls and this has opened fine in Excel.

brianestey
- 8,202
- 5
- 33
- 48
-
using the Interop requires Excel to be installed on the host machine. – Alexandre Jun 05 '12 at 05:34