Export HTML Table To Excel(XLS) With Bold Headers

Export HTML Table To Excel(XLS) With Bold Headers
File Size: 4.35 KB
Views Total: 10862
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

Just another jQuery based Table To Excel converter which exports your html table to an XLS file with bold column headers.

How to use it:

1. Your html table must have <thead> and <tbody> tags as these:

<table class="table">
      <th>Header content 1</th>
      <th>Header content 2</th>
      <td>Body content 1</td>
      <td>Body content 2</td>
      <td>Body content 3</td>
      <td>Body content 4</td>
      <td>Body content 5</td>
      <td>Body content 6</td>
      <td>Footer content 1</td>
      <td>Footer content 2</td>

2. Load the JavaScript file tableexport-xls-bold-headers.js after the latest jQuery library.

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 
<script src="tableexport-xls-bold-headers.js"></script>

3. Call the plugin to download the generated XLS file.

  filename: 'example.xls'

4. Sometimes you might need to set the columns to ignore.

  filename: 'example.xls',
  ignoreColumn: [0, 1]

5. Decide whether to ignore escape and html content.

  escape: 'true',
  htmlContent: 'false'

This awesome jQuery plugin is developed by carlopantaleo. For more Advanced Usages, please check the demo page or visit the official website.