strike through / line through is not working while exporting from datatable

strike through / line through is not working while exporting from datatable

navanejan27navanejan27 Posts: 1Questions: 1Answers: 0

Hi All,

I have been using DataTables 1.10.15 in my project and I have included the option to export the table in csv , Excel and pdf as well. In datatable the strike through / line through is working as expected but while exporting that datatable as pdf / excel it is coming as the normal text not as strike through / line through texts .

I have attached the sample images for your reference

**Data table with strike through / line through **

Exported pdf file without strike through / line through

Exported Excel file without strike through / line through

**Note: I have added strikeout class for that particular <td> **

Thanks in advance .

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @navanejan27 ,

    Yep, DataTables only exports the data, not any styling, see thread here discussing it.

    You can add these styles yourself, this thread here gives a good example, but be aware you'll need separate code for each of the export styles (PDF, Excel, etc.) due to the plugins being used.

    Cheers,

    Colin

This discussion has been closed.