Convert HTML to Excel document using iText C# [closed]

余生长醉 提交于 2019-12-24 13:58:02

问题


Is there is a way to convert HTML file to Excel using iText 7? If the iText doesn't support, what is the the best way to convert HTML file to Excel? Thanks

sample HTML code as below:

<h1>Test</h1>
<p>Hello World</p>

回答1:


As far as I know iText makes PDF files. You won't be able to produce Excel files with this. (The two kinds of files have very little in common.)

The best way to convert HTML to Excel can depend on a number of factors: you tagged this question with C#. Are you running on a server or are you trying to automate an instance of Excel? What framework are you using? Do you have access to a filesystem? .Net Core?

You can look at the Microsoft OpenXML library for one option to create Excel files, but in my experience it can be brittle and require a lot of troubleshooting to get started. But it doesn't need Excel installed or licensed.



来源:https://stackoverflow.com/questions/54602414/convert-html-to-excel-document-using-itext-c-sharp

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