开发者

Create HTML table and open it in Excel with saving style

Did anybody export tables from HTML Document to Excel with saving all css styles? My app can generate h开发者_StackOverflow中文版tml code for table but i need to export зrecisely same table to Excel. I use OpenXML.

May be it is necessary to use urn:schemas-microsoft-com:office:excel and urn:schemas-microsoft-com:office:spreadsheet namespaces?

Thanks all for answers!


One easy way out is while writing, you can just set the HTML Content type to MS-Excel. This will cause the page content to be written to an Excel file and the user will be prompted to download the excel file.

What technology are you using on the server side? You can do a javascript to write, but it is not recommended, as it violates security on the client side.


We have ASP.NET app to create reports in browser. And it is necessary to export reports to Excel. I've developed my own litle framework to create reports for Excel. But there is one reports that my framework can't to generate correctly. But i can to create this report in html table. Therefore i think to generate html code and export it to Excel. But main trouble is to save all styles...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜