Import XML file to excel with existing map using ExcelPackage in C#

Jan 29, 2010 at 11:22 PM

How can I import xml file to existing excel template.

I have:

excel template file

xml file to be imported into excel template

 a map (xsd) .

It has to be done on server. I used excelPackage , but couldnt find any documentation for the classes.

I have code that works using Microsoft.Office.Interop.Excel.

Dim xmlSchema As String = "c:\Schema1.xsd"  
Map = XL.ActiveWorkbook.XmlMaps.Add(xmlSchema)  
Wb.XmlImportXml(xmlStr, oMap)  


How do I write it in C# ?

Thank you