Press "Enter" to skip to content

Exporting an HTML Table to an Excel File for jQuery plugin | tableToExcel.js

tableToExcel is a lightweight jQuery Table Export to Excel extension that creates a downloadable Excel XSL file from an HTML table you provide.

export html table to excel with formatting, export html table to xlsx using jquery, export html table to multiple excel sheets jquery, export html table to excel using jquery plugin

How to make use of it:

1. Download and put the JavaScript file jquery.tableToExcel.js after jQuery.

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" 
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" 
        crossorigin="anonymous">
</script>
<script src="jquery.tableToExcel.js"></script>

2. Just connect the performance to the goal HTML table and achieved it.

<table class="table table-bordered table-striped">
  <thead>
    <tr>
      <th>Firstname</th>
      <th>Lastname</th>
      <th>Email</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>John</td>
      <td>Doe</td>
      <td>john@example.com</td>
    </tr>
    <tr>
      <td>Mary</td>
      <td>Moe</td>
      <td>mary@example.com</td>
    </tr>
    <tr>
      <td>July</td>
      <td>Dooley</td>
      <td>july@example.com</td>
    </tr>
  </tbody>
</table>
$('table').tblToExcel();

3. Execute a performance when the conversion is complete.

$('table').tblToExcel({
  complete: function () {
    // do something
  }
});

Table To Excel (XSL) Converter, tableToExcel Plugin/Github, export html table to excel file using jquery, how to convert html table to excel, export html table to excel chrome, export html table to excel in javascript


See Demo And Download

Official Website(tanvirs2): Click Here

This superior jQuery/javascript plugin is developed by tanvirs2. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *