This repository was archived by the owner on Apr 18, 2020. It is now read-only.
This repository was archived by the owner on Apr 18, 2020. It is now read-only.
One File, Multiple Sheets Per Table #23
Open
Description
Hi, how can I include multiple tables in one file separated by sheets?
I already tried using two TableToExcel functions with different IDs and sheet names with the same file name, but it ended up downloading two separate files instead.
Here's what I did:
let button = document.querySelector("#button-excel");
button.addEventListener("click", e => {
TableToExcel.convert(document.querySelector("#table1"), {
name: "FileName.xlsx",
sheet: {
name: "Sheet 1"
}
});
TableToExcel.convert(document.querySelector("#table2"), {
name: "FileName.xlsx",
sheet: {
name: "Sheet 2"
}
});
});
Are there any functions that can be used to make this possible?