Import xml file using map to excel with ExcelPackage

Jan 26, 2010 at 12:06 PM
Edited Jan 28, 2010 at 10:37 AM

I need to import an xml file file into excel template file using existing map.

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

How to do it in C#?

  Dim xmlSchema As String = "c:\Map.xsd"' Import the XML Schema to the workbook


oMap = oXL.ActiveWorkbook.XmlMaps.Add(xmlSchema)


oWb.XmlImportXml(xmlStr, oMap)

' oWb.XmlImport(xmlPath, oMap)