views:

142

answers:

2

Hello:) Did anybody export tables from HTML Document to Excel with saving all css styles? My app can generate html 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!

A: 

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.

Kangkan
A: 

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...

dmak9