hhurz / tableExport.jquery.plugin

jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF
MIT License
990 stars 716 forks source link

Export to excel with css doesn't work properly #334

Closed leGnacq closed 3 years ago

leGnacq commented 3 years ago

Bootstrap table 1.18.2

I want to export my html table to excel, xls or xlsx but when i do that, not all css is keeped. I have all font-family and font-weight. I have background for header but not on row.

And only when i export in xls, in xlsx i havo no css.

Some css for classes is keeped and some for inline is not, why ?

Can someone help me ? Thank you.

leGnacq commented 3 years ago

I found the solution, so i post it. The css can come from class or inline css but my error was the format of colors. It was in hex but on 8 characters for the transparency and excel don't know this format. So i put it on 6 characters and now it workd.