开发者

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

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜