rainabba / jquery-table2excel

jQuery Plugin to export HTML tabled to Excel Spreadsheet Compatible Files
593 stars 666 forks source link

Add heading #56

Open angadsule opened 8 years ago

angadsule commented 8 years ago

I need to add heading to the table, as a parameter , currently achieved using fullTemplate += e.template.mid; fullTemplate += "Report Heading";

But need ths to be dynamic with html TAGS.

rainabba commented 8 years ago

Go for it! Branch, add the feature and submit a PR :)

dhorions commented 7 years ago

Looks like that can be achieved using following code ( found that here : https://stackoverflow.com/a/38484199/889755 )

.append($(table.table().header()).clone())

$('<table>')
  .append($(table.table().header()).clone())
  .append(table.$('tr').clone())
  .table2excel({
     exclude: "",
     name: "title",
     filename: "name" 
  });