Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to export Xml data into excel file?
Anyone have suggestion or link please let me know

What I have tried:

how to take xml file data into Excel sheet on button click
Posted
Updated 7-Mar-17 2:25am
Comments
[no name] 15-Mar-17 4:00am    
Here is a straightforward method by using http://spreadsheet.codeplex.com/

Workbook workbook = new Workbook();
workbook.LoadFromFile(@"..\..\test.xml");
workbook.SaveToFile("result.xlsx");

 
Share this answer
 
There are lots of examples online if you google for them. I suggest doing that, then taking one that looks close to what you want and changing the code to work in your environment. Then if you get stuck on something specific come back, post the code of where you are stuck and be clear as to what you need help on and we'll gladly help.
 
Share this answer
 
Hey

As our friend mentioned before there are many ways to do this but as a bullet list for your information, you can consider the following list.

It can be achieved by using Microsoft.Office.Interop.Excel
Using by Dataset (Which I really don`t like)
1- If you prepfer to use an opensource component you can try
2- You can also use ADO.Net based solution which is more stable but not really fast and easy to maintain
3- If you wanna use OpenXML tyr this
4- Finally the moral of story which I like is here
Good luck,
A.H.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900