C# .NET - How we create xml file through Excel file!

Asked By myzonal.com myzonal.com on 24-Sep-12 01:24 AM
How we create xml file through Excel file!
White Ashlin replied to myzonal.com myzonal.com on 24-Sep-12 02:10 AM
See this code:
            Workbook workbook = new Workbook();
            workbook.LoadFromFile(@"..\..\test.xls");
            workbook.SaveAsXml("sample.xml");
but you need to use an MS Excel component to realize it:http://www.e-iceblue.com/Introduce/excel-for-net-introduce.html
Jitendra Faye replied to myzonal.com myzonal.com on 25-Sep-12 12:25 AM
For this follow these steps-

1. First read that excel file and store in one dataset object.

2. After storing data to DataSet object you can use WriteXml() method of dataset object to create XML file.

Try this and let me know.