Export XML to Excel in SharePoint 2010


Description:

I have an xml file Inputs.xml which has the following values














I need to display the values in the SharePoint 2010 Visual Web Part. And there will be a button in the Visual web part "Export to Excel" by clicking on that I should be able to save the values in the excel.


Create SharePoint 2010 Visual Web Part using Visual Studio 2010:

  • Open Visual Studio 2010.

  • Go to File => New => Project.

  • Select Visual Web Part template from the installed templates.


  • Enter the Name for the project as VisualWebPart and then click on Ok.

  • Select the local site that will be used for debugging.


  • Click on Finish.

  • In the solution explorer, right click on VisualWebPart1 and then click on Delete.