TableExport
TableExport copied to clipboard
Missing parameter in the typings of the export2file method
Some parameters are missing in the .ts file.
Version: 5.2.0
File: tableexport.d.ts
/**
* Exports and downloads the file
*/
export2file: (data: string, mime: string, name: string, extension: String) => void;
It should be something like this
export2file: (data: string, mime: string, name: string, extension: String, merges: Object, rtl: Boolean, sheetname: String) => void;
File: tableexport.js
/**
* Exports and downloads the file
* @memberof TableExport.prototype
* @param data {String}
* @param mime {String} mime type
* @param name {String} filename
* @param extension {String} file extension
* @param merges {Object[]}
* @param RTL {Boolean}
*/
export2file: function(data, mime, name, extension, merges, RTL, sheetname) {
Without sheetname, you can't use export2file Method - excel will bring the warning, that the file is corrupt.
Yes, same error with xlsx
It's really a big trouble for guys who want to customize buttons but fall into this trap, along with the misleading example: https://github.com/clarketm/TableExport/blob/master/examples/exportButtons.html#L105