Bug in webix.toExcel if used within Webix Jet framework

Hi,

Kind of killed a few hours to find out the following:

I’m using the latest Webix Pro 3.0.1

If I try to use webix.toExcel method for datatable or datatree withing one of the Webix Jet views then I get this message in the Console TypeError: jszip is not a constructor and export fails.

Same exact code works in the samples and pages that are not using Webix Jet. Seem that there is some problem with loading external JS files while using the Webix Jet. So what is the trick to fix that?

For now I use .exportToExcel() but it has less options and annoying flickering while exporting.

Easiest way to recreate is take webix-app-start zip file and replace views/data.js

with this one:

define([
“models/records”
],function(records){

var ui = 
{
		//container:"dataDiv",

		padding: 20,
		rows: [
			{
				id: "table",
				view:"treetable",
				columns:[
				{ id:"id",	header:"", css:{"text-align":"right"},  	width:50},
				{ id:"value",	header:"Film title",	width:250,
					template:"{common.treetable()} #value#", exportAsTree:true },
				{ id:"chapter",	header:"Mode",	width:200}
			],
				autowidth:true,
				height: 450,
				data: [
				{ "id":"1", "value":"The Shawshank Redemption", "open":true, "data":[
					{ "id":"1.1", "value":"Part 1", "chapter":"alpha"},
					{ "id":"1.2", "value":"Part 2", "chapter":"beta", "open":true, "data":[
						{ "id":"1.2.1", "value":"Part 1", "chapter":"beta-twin"},
						{ "id":"1.2.2", "value":"Part 1", "chapter":"beta-twin"}
					]},
					{ "id":"1.3", "value":"Part 3", "chapter":"gamma" }
				]},
				{ "id":"2", "value":"The Godfather", "data":[
					{ "id":"2.1", "value":"Part 1", "chapter":"alpha" },
					{ "id":"2.2", "value":"Part 2", "chapter":"beta" }
				]}
			]
			},
			{
				view: "form",
				css: "toolbar",
				paddingY: 5,
				paddingX: 10,
				cols:[
					{
						view: "label", label: "Export"
					},
					{
						view: "button", label: "All Fields", width: 95, click:function(){
							webix.toExcel($$("table"));
						}
					},
					{
						view: "button", label: "'Rank' and 'Title'", width: 140, click:function(){
							webix.toExcel($$("table"), {
								filename: "table",
								name: "Films",
								columns:{
									"value":{header: "Rank", width: 50},
									"chapter":{header: "Title", width: 200}
								}
							});
						}
					}
				]

			}
		]
	}

return {
	$ui: ui,
	$oninit:function(view){
		
	}
};

});

Just tried with 3.0.4 - still no luck. Any comment on this issue?

Fixed. Details sent by PM.

Great! I can confirm that it is fixed - thank you