How to convert xml to excel file programmatically

后端 未结 8 676
旧时难觅i
旧时难觅i 2020-12-06 15:20

I have a xml document holding a small data for my project where I want to convert my xml to an excel file (microsoft office excel 2003 and over)

How can I do this pr

相关标签:
8条回答
  • 2020-12-06 15:49

    If you have control over the XML generated, just generate an XML Spreadsheet file (the XML file standard for Excel 2002 and 2003).

    These open natively in Excel, without having to change the extension. (To open by default in Excel, the file extension XML should be set to open with "XML Editor", which is an Office app that routes the XML file to Excel, Word, PowerPoint, InfoPath, or your external XML editor as needed. This is the default mapping when Office is installed, but it may be out of whack for some users, particularly devs who edit XML files in a text editor.)

    Or, use the NPOI library to generate a native (97/2000 BIFF/XLS) Excel file rather than XML.

    0 讨论(0)
  • 2020-12-06 15:49

    Can't you simply open it in Excel? I thought Excel recognized the suffix XML?

    0 讨论(0)
提交回复
热议问题