-
Notifications
You must be signed in to change notification settings - Fork 109
Migration guide for V0.2.1 to V1.0.0
V0.2.1 was using protobi/js-xlsx which is a fork of SheetJS/js-xlsx with support for styles. SheetJS/js-xlsx does not support styles in the opensource version and protobi/js-xlsx is not actively maintained. So From V1.0.0 linways/table-to-excel uses guyonroche/exceljs for creating valid Excel files.
The name of the file is changed from xlsx_html_utils.min.js
to tableToExcel.js
.
Since linways/table-to-excel no logner uses protobi/js-xlsx there is no need to include either ../dist/xlsx_html.full.min.js
or ../lib/xlsx.core.min.js
. You just need to include ../dist/tableToExcel.js
instead.
Since we no longer use js-xlsx, the main method for converting a HTML table to excel is changed to TableToExcel.convert
. All the parameters are same.
To migrate from v0.2.1 to v1.0.0, just replace XLSX.utils.html.save_table_as_excel
with TableToExcel.convert
.
Example:
XLSX.utils.html.save_table_as_excel(document.getElementById("table1"), {
name: "test.xlsx"
});
to
TableToExcel.convert(document.getElementById("table1"), {
name: "test.xlsx"
});
The value for text rotation changed to
0 to 90
, -1 to -90
and vertical
Vertical alignment- center
changed to middle