0

How can I import xml file to existing excel template. I have a map (xsd).

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

More specific question: how do I write in C# the following code from VB.NET

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

1 Answer 1

1

There is extensive documentation and tutorials and everything on the Codeplex site for ExcelPackage:

http://excelpackage.codeplex.com/

As for your question:

  • if you have a XSD file, you can easily deserialize your XML file into an object graph
  • parse the objects as needed and insert the relevant information into a new Excel sheet based on your template

Your question is way too broad and not specific enough to be able to help with it - you'll need to make your question more specific and provide more information!

Sign up to request clarification or add additional context in comments.

1 Comment

more specific question: how do I write in C# the following code from vb: Dim xmlSchema As String = "c:\Schema1.xsd" Map = XL.ActiveWorkbook.XmlMaps.Add(xmlSchema) Wb.XmlImportXml(xmlStr, oMap)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.