tags:

views:

92

answers:

2

I am having my xml data in XDocument (LINQ). I want to write this data into excel data. I am using console application.

I dont want to use excel com object.

A: 

You can fairly easily create .xslx format documents without using com (or indeed without having excel anywhere near your machine).

There are links in this answer:

http://stackoverflow.com/questions/1704030/building-excel-files-with-c/1704064#1704064

And if you look in the latest CTP for V2.0 of the open XML SDK you will find a very nice tool that will help reverse engineer the file formats into code as a starting point

Murph
A: 

It may not suit your needs in this case but I have often found that writing to a .csv file (which will likely have an association with Excel if installed) makes for an easy to do alternative in many situations.