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
984 stars 714 forks source link

Choose export type of each column (Excel 2007) #307

Closed 488442 closed 4 years ago

488442 commented 4 years ago

it's possible? I have differenti columns with anchor that i want transform to string

hhurz commented 4 years ago

This should be possible. There is an option htmlHyperlink which allows you to export either the content (set htmlHyperlink='content') or the href link (set htmlHyperlink='href') of <a> tags, unless another option onCellHtmlHyperlink is not defined. In this case, for each table cell containing an href link, the callback function specified by onCellHtmlHyperlink=function($cell, row, col, href, cellText) is called. Depending on what you return as a result of the function, you can decide individually for each hyperlink what you want to export.