v3 docs

Build Statusarrow-up-right

The simple, easy-to-implement plugin to export HTML tables to xlsx, xls, csv, and txt files.

Notice: As of May 2017, v3.3arrow-up-right has be superceded by v4arrow-up-right.

Deprecation notice:

Below are the docs for v3.3.13.

Check out v5 for the latest release.

Live Demo

A live, interactive demo can be found on the TableExportarrow-up-right webpage.

Getting Started

Download and Setup

To use this plugin, include the jQueryarrow-up-right library, FileSaver.jsarrow-up-right script, and TableExport.jsarrow-up-right plugin before the closing <body> tag of your HTML document:

<script src="jquery.js"></script>
<script src="FileSaver.js"></script>
...
<script src="tableexport.js"></script>

Install with Bower

Install with npm

Dependencies

Required:

* jQuery dependency requirement is removed as of v4arrow-up-right

Optional / Theming:

Add-Ons:

In order to provide Office Open XML SpreadsheetML Format ( .xlsx ) support, you must include the following third-party script to your project before FileSaver.jsarrow-up-right and TableExport.jsarrow-up-right.

Older Browsers:

To support older browsers ( Chrome < 20, Firefox < 13, Opera < 12.10, IE < 10, Safari < 6 ) include the Blob.jsarrow-up-right polyfill before the FileSaver.jsarrow-up-right script.

Until Safariarrow-up-right provides native support for either the HTML5 download attributearrow-up-right or service workersarrow-up-right, limited xlx and xlsx support is provided by including the Blob.jsarrow-up-right polyfill, albeit the filename will always be labeled Unknown.

Usage

CSS

By default, TableExport.jsarrow-up-right utilizes the Bootstraparrow-up-right CSS framework to deliver enhanced table and button styling. For non-Bootstrap projects, initialize with the bootstrap property set to false.

When used along with Bootstrap, there are four custom classes .xlsx, .xls, .csv, .txt providing button styling for each of the exportable filetypes.

JavaScript

To use the export plugin, just call:

Additional properties can be passed in to customize the look and feel of your tables, buttons, and exported data.

Notice that by default, TableExport will create export buttons for three different filetypes xls, csv, txt. You can choose which buttons to generate by setting the formats property to the filetypes of your choice.

Note: to use the xlsx filetype, you must include the third-party scripts listed in the Dependencies section.

TableExport supports additional methods (update, reset and remove) to control it after creation.

Properties

A table of available properties and their usage can be found herearrow-up-right

Methods

A table of available methods and their usage can be found herearrow-up-right

Settings

Each button is assigned a default class and default content based on its respective filetype and corresponding css styles.

Below are additional defaults to support the functionality of the plugin that.

Browser Support

Chrome

Firefox

IE

Opera

Safari *

Android

-

-

iOS

-

-

-

Mac OSX

-

Windows

*only partial support for xls and xlsx: requires third-party dependency (Blob.jsarrow-up-right)

Live Demo

A live, interactive demo can be found on the TableExportarrow-up-right webpage.

Examples:

Customizing Properties

Customizing Settings

Miscellaneous

Skeletons

License

TableExport.jsarrow-up-right is licensed under the terms of the Apache-2.0arrow-up-right License

:star: Credits

Special thanks the the following contributors:

Last updated