TableExport
  • TableExport
  • Docs
    • Migrating from 3.x to 4.x?
    • Migrating from 4.x to 5.x?
    • v3 docs
    • v4 docs
    • v5 docs
  • Getting Started
    • Install manually using script tags
    • Install with Bower
    • Install with npm
    • CDN
  • Dependencies
    • Required
    • Optional
    • Add-Ons
    • Older Browsers
  • Usage
    • JavaScript
      • Properties
      • Methods
      • Settings
    • CSS
    • Browser Support
  • Examples
    • Customizing Properties
    • Customizing Settings
    • Miscellaneous
    • Skeletons
  • License
  • Going Forward
  • Credits
Powered by GitBook
On this page
  • Changelog
  • Major Features
  • Properties
  • Methods
  • Settings
  • Miscellaneous

Was this helpful?

  1. Docs

Migrating from 4.x to 5.x?

PreviousMigrating from 3.x to 4.x?Nextv3 docs

Last updated 5 years ago

Was this helpful?

Changelog

Major Features

  1. Cell merge support, using rowspan and colspan html attributes on table. , , , ,

Properties

  1. xlsx has replaced xls as the default spreadsheet format.

// (String[]), filetype(s) for the export, (default: ['xlsx', 'csv', 'txt'])
formats: ['xlsx', 'csv', 'txt'],
  1. Two(2) new export formats have been added: xlsm and xlsb.

  2. Both csv and xls formats now have a the enforceStrictRFC4180 property set to false.

Methods

  1. getFileSize utility method to quickly of a file export.

  2. getBinaryData renamed to a more semantically correct getRawData

Settings

  1. can now accept either a selector (e.g. '.tableexport-ignore') or selector[] (e.g. ['.tableexport-ignore', '#ignore']).

/**
 * CSS selector or selector[] to exclude/remove cells from the exported file(s).
 * @type {selector|selector[]}
 * @memberof TableExport.prototype
 */
ignoreCSS: ".tableexport-ignore";
/**
 * CSS selector or selector[] to replace cells with an empty string in the exported file(s).
 * @type {selector|selector[]}
 * @memberof TableExport.prototype
 */
emptyCSS: ".tableexport-empty";
/**
 * Class applied to each table caption.
 * @memberof TableExport.prototype
 */
defaultCaptionClass: "tableexport-caption";
/**
 * Attribute applied to each export button element used to reference a Storage key.
 * @memberof TableExport.prototype
 */
storageKey: "tableexport-id";
/**
 * Namespace (i.e. prefix) applied to each table UUID and Storage key.
 * @memberof TableExport.prototype
 */
defaultNamespace: "tableexport-";

Miscellaneous

can now accept either a selector (e.g. '.tableexport-empty') or selector[] (e.g. ['.tableexport-empty', '#empty']).

defaultCaptionClass class is now configurable rather than statically set to the .tableexport-caption class.

storageKey attribute is now configurable rather than statically set to the tableexport-id attribute.

defaultNamespace string is now configurable rather than statically set to the te- string.

types renamed to typeConfig.

xlsx, xls, csv, and txt prototype properties moved to nested under the formatConfig namespace.

Improved error logging to the console, including more verbose error descriptions.

Serialized export data is now stored in Session Storage rather than Local Storage to prevent undesirable persistence.

Implement caching by maintaining unique reference to tables by id. The tableKey attribute is now used to uniquely identify table elements and hold either the table's id or a UUID generated from the defaultNamespace and a unique internal counter. ,

v5.0.0-rc.10
v5.0.0-rc.10
v5.0.0-rc.10
v5.0.0-rc.1
v5.0.0-rc.1
v5.0.0-rc.4
v5.0.0-rc.10
v5.0.0-rc.10
v5.0.0-rc.11
v5.0.0-rc.1
v5.0.0-rc.3
v5.0.0-rc.6
v5.0.0-rc.8
v5.0.0-rc.9
v5.0.0-rc.2
v5.0.0-rc.4
v5.0.0-rc.4
calculate the filesize
v5.0.0-rc.1
v5.0.0-rc.7
v5.0.0-rc.7
ignoreCSS
emptyCSS