I would like to export two tables to Excel as two sheets.
webix.toExcel([$$(“table1”), $$(“table2”)]);
This results in: Cannot read property ‘$exportView’ of undefined
I would like to export two tables to Excel as two sheets.
webix.toExcel([$$(“table1”), $$(“table2”)]);
This results in: Cannot read property ‘$exportView’ of undefined
Hello!
All available customizations with export to Excel are described here.
// exporting all components with custom sheet names
webix.toExcel(
[$$("table"), $$("list"), $$("chart")],
{ filename: "My data", sheets:["Big data", "Small data", "Chart data"]}
);
// exporting separate components with default sheet names
webix.toExcel(
[$$("table"), $$("list")],
{ filename: "My data" }
);
Here is an example how you can solve it: https://webix.com/snippet/fb91b9d8
This actually ended up being an issue with my webix js version. Running the latest version resolved the issue.
I clicked “Export all tabs with custom sheet names” and I see “Data 1, Data 2, Data 2” for the sheet name. As per config it should be “Big data”, “Small data”, “Chart data”.
https://snippet.webix.com/fb91b9d8
I guess I found the new snippet that works - Code Snippet
webix.toExcel(
[{id:“table”, options: {name:“Big data”}},
{id:“list”, options: {name:“Small data”}},
{id:“chart”, options: {name:“Chart data”}}],
{
filename:“My data”
}
);