Posted 12 February 2018, 10:04 pm EST
In spread Js , I have one column for numbering and one for checkbox and other fields are like Name , Month value
While Export into Excel, I do not want to see these two columns (check box, and Numbering) , but still its visible , how can i remove these columns
I am using below code for export
let excelIo = new GC.Spread.Excel.IO();
var json = this.spread.toJSON({
includeBindingSource: true,
rowHeadersAsFrozenColumns: true,
columnHeadersAsFrozenRows: true,
ignoreFormula: false,
ignoreStyle: false
});
let sheetsNames = Object.getOwnPropertyNames(json.sheets);
sheetsNames.forEach(sheetname => {
const option = {
allowFilter: true,
allowSort: true,
allowResizeRows: true,
allowResizeColumns: true,
allowEditObjects: true
};
json.sheets[sheetname].protectionOptions = option;
json.sheets[sheetname].isProtected = false;
});
json.highlightInvalidData = false;
let currentSheet = this.spread.getActiveSheet()
let currentSheetname = currentSheet.name();
currentSheetname = currentSheetname + '.xlsx';
excelIo.save(json, function (blob: any) {
FileSaver.saveAs(blob, currentSheetname);
}, function (e: any) {
});