Can closedXML write out an HTML table for Excel

心不动则不痛 提交于 2021-01-28 13:54:54

问题


I have an HTML table that is dynamic and has tags:

table, th, thead, td, tbody, tr and a div at the end

It also has colspans too.

Can closedXML just import this into a worksheet as is and render it out as XML?


回答1:


No, ClosedXML can not import HTML.

You have to parse the HTML yourself (using something like HTML Agility Pack) and put the content of each cell in the HTML table in the corresponding cell of the ClosedXML spreadsheet.



来源:https://stackoverflow.com/questions/23257900/can-closedxml-write-out-an-html-table-for-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!