File export requires installation of xmlbuilder2. Current version used is 3.1.1.
Code reference for downloading current file:
let wsheet = new websheet('yourID', yourElement);
let workbook = wsheet.Workbook();
workbook.DownLoadFile('filename');
Get file stream using the following method:
// Event binding
let wsheet = new websheet('yourID', yourElement);
workbook.SaveBlob(function(blod) {
// Upload Blob to server
console.log('your code')
//uploadToServer(blob);
// Simulating file download here
// Create a link element
var link = document.createElement('a');
// Set download attributes
link.href = window.URL.createObjectURL(blod);
link.download = '111.xlsx';
// Add to DOM and trigger click
document.body.appendChild(link);
link.click();
// Remove link element
document.body.removeChild(link);
});
Right-click and select the export file button, as shown:
Use Ctrl+E shortcut to export directly.