ClosedXML可以为Excel编写HTML表吗 [英] Can closedXML write out an HTML table for Excel

查看:65
本文介绍了ClosedXML可以为Excel编写HTML表吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个动态HTML表并带有标签:

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

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

它也有colspans.

It also has colspans too.

closedXML可以将其原样导入工作表并将其呈现为XML吗?

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

推荐答案

否,ClosedXML无法导入HTML.

No, ClosedXML can not import HTML.

您必须自己解析HTML(使用类似 HTML Agility Pack 的内容)并放置每个HTML的内容ClosedXML电子表格的相应单元格中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.

这篇关于ClosedXML可以为Excel编写HTML表吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆