Posted 5 July 2018, 6:37 pm EST
Hi,
I have issue in exporting the excel sheet that has data from database.Only the sheet format got exported in excel we are not getting the data.
$(document).ready(function () {
var spread = new GC.Spread.Sheets.Workbook(document.getElementById(“ss”), { sheetCount: 3 });
var sheet = spread.getSheet(0);
var excelIo = new GC.Spread.Excel.IO();
showDelayDiv();
readData(sheet, ‘@Url.Action(“GetData”, “Forecast”)’, function () {
hideDelayDiv();
});
$("#saveExcel").click(function () { var fileName = $("#exportFileName").val(); var password = $("#password").val(); if (fileName.substr(-5, 5) !== '.xlsx') { fileName += '.xlsx'; } debugger; var json =spread.toJSON(); //export excelIo.save(json , function (blob) { saveAs(blob, fileName); }, function (e) { // process error console.log(e); }, { password: password } ); }); } });