tableexport-xls-bold-headers
Version:
A jQuery plugin which generates a basic .xls file with bold headers from a HTML table.
33 lines (29 loc) • 872 B
Markdown
A jQuery plugin which generates a basic .xls file with bold headers from a HTML table.
1. `npm install tableexport-xls-bold-headers` or just download `tableexport-xls-bold-headers.js` from this repository.
2. Include `tableexport-xls-bold-headers.js` in your HTML files.
Let your HTML table be like:
```HTML
<table id="myTable">
<thead>
...
</thead>
<tbody>
...
</tbody>
</table>
```
Call:
```javascript
$('#myTable').tableExport({
type: 'excel',
escape: 'false',
filename: 'myExport.xls'
});
```
to generate and download the Excel file 'myExport.xls'
Original code by Shreedhar Bhat from this [StackOverflow answer](https://stackoverflow.com/a/44255259), with some small
modifications by Carlo Pantaleo.