views:

325

answers:

5

I have files with tons of real time data that I process with an C# application. After processing the data it is presented in Excel using a specific template.

This is solved using Interop today. I must say I don't completely gasp the whole Interop situation. Do I have to manually install the Interop functionality on each end user terminal somehow? How does it handle the mix of 2003/2007 versions?

A: 

I've always used FileHelpers. You shouldn't have to do anything with the Excel installation.

tarn
A: 

We use SyncFusion which works pretty well. Pretty easy to use too.

Svish
The only download is you have to pay, and the license isn't cheap
Ngu Soon Hui
Way to expensive to even consider for my use.
rozon
The only download? Anyways, you didn't write anything about licenses or prices. You said that you have "files with tons of real time data", so I thought it maybe was talking about a bigger, commercial project =)
Svish
"bigger, commercial project" does not mean "budget". Trust me. I had to write these stupid Excel things for a large trading floor.
TheSoftwareJedi
+3  A: 

If you know the structure of your Excel document (and presuming you don't want and kind of complex macros/ functions/ etc within the Excel document) you can generate XML using the Excel XML format. I'm not referring to OpenXML, I'm referring to the XML format used by Excel prior to 2007.

I cover how to do it here: http://www.aaron-powell.com//blog/september-2008/linq-to-xml-to-excel.aspx

The problem with Interop is that it isn't really designed to hard core document generation. If you try and do a lot of document processing you can run into locks

Slace
Great!! I love this solution!
rozon
A: 

Not sure what you are getting at, but you can read and write Excel files via ADO.NET. This is not interop, nor is it XML file processing. Example.

Cheeso
This would be my second preferred method.
rozon
A: 

If you can use Excel 2007 format use Office Open XML SDK, you can find samples there. I used for some developments and is a bit tricky at the beginning if you have to create the file from scratch, but if you have a template as in your case, then it is easier. It is fast and don't need to have excel installed in the server.

jmservera