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(xml开发者_C百科Str, oMap)
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!
精彩评论