-1

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.

pnuts
  • 58,317
  • 11
  • 87
  • 139
web dunia
  • 9,381
  • 18
  • 52
  • 64
  • possible duplicate of [Building Excel Files with C#](http://stackoverflow.com/questions/1704030/building-excel-files-with-c-sharp) – CoderDennis Sep 15 '15 at 04:21

2 Answers2

1

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:

Building Excel Files with C#

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

Community
  • 1
  • 1
Murph
  • 9,985
  • 2
  • 26
  • 41
0

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.

stovroz
  • 6,835
  • 2
  • 48
  • 59