var serializationOption = {
ignoreFormula: true,
ignoreStyle: false,
rowHeadersAsFrozenColumns: true,
columnHeadersAsFrozenRows: true
};
//ToJson
var spread1 = GC.Spread.Sheets.findControl(document.getElementById('ss'));
var jsonStr = JSON.stringify(spread1.toJSON(serializationOption));
var excelIo = new GC.Spread.Excel.IO();
excelIo.save(jsonStr, function (blob) {
// saveAs(blob, fileName);
funDownload(blob,"test.xlsx")
}, function (e) {
console.log(e);
}, {password: ''});
var funDownload = function (content, filename) {
var eleLink = document.createElement('a');
eleLink.download = filename;
eleLink.style.display = 'none';
// 字符内容转变成blob地址
var blob = new Blob([content]);
eleLink.href = URL.createObjectURL(blob);
// 触发点击
document.body.appendChild(eleLink);
eleLink.click();
// 然后移除
document.body.removeChild(eleLink);
}; 按照示例写的代码 能实现数据导出 但是没有帮我合并单元格 |