Class: ExportFile

ExportFile

handsontable-pro/src/plugins/exportFile/exportFile.js, line 42

Example
...
var hot = new Handsontable(document.getElementById('example'), {
  data: getData()
});
// Access to exportFile plugin instance:
var exportPlugin = hot.getPlugin('exportFile');

// Export as a string:
exportPlugin.exportAsString('csv');

// Export as a Blob object:
exportPlugin.exportAsBlob('csv');

// Export to downloadable file (MyFile.csv):
exportPlugin.downloadFile('csv', {filename: 'MyFile'});

// Export as a string (specified data range):
exportPlugin.exportAsString('csv', {
  exportHiddenRows: true,     // default false
  exportHiddenColumns: true,  // default false
  columnHeaders: true,        // default false
  rowHeaders: true,           // default false
  columnDelimiter: ';',       // default ','
  range: [1, 1, 6, 6]         // [startRow, endRow, startColumn, endColumn]
});
...

Methods

handsontable-pro/src/plugins/exportFile/exportFile.js, line 82

downloadFile(format, options)

Export table data as a downloadable file.

Parameters:
Name Type Description
format String

Export format type eq. 'csv'.

options Object

see ExportFile.DEFAULT_OPTIONS for available export options.

handsontable-pro/src/plugins/exportFile/exportFile.js, line 72

exportAsBlob(format, options)

Export table data as a blob object.

Parameters:
Name Type Description
format String

Export format type eq. 'csv'.

options Object

see ExportFile.DEFAULT_OPTIONS for available export options.

handsontable-pro/src/plugins/exportFile/exportFile.js, line 62

exportAsString(format, options)

Export table data as a string.

Parameters:
Name Type Description
format String

Export format type eq. 'csv'.

options Object

see ExportFile.DEFAULT_OPTIONS for available export options.

handsontable-pro/src/plugins/exportFile/exportFile.js, line 52

isEnabled(){Boolean}

Check if the plugin is enabled in the handsontable settings.

Returns: {Boolean}