我这面确实是这个问题 我发下我的创建 打开以及保存方法您帮忙看下是有问题吗
// 创建
var spread = new GC.Spread.Sheets.Workbook(document.getElementById('wb'));
// 打开
var openOptions = {
openMode: GC.Spread.Sheets.OpenMode.incremental,
includeStyles: true,
includeFormulas: true,
progress: (args) => {
}
};
// response 从后台请求的sjs文件
let blob = new Blob([response], {type: 'application/zip'});
//打开
spread.open(blob,function,function,openOptions);
//保存
let options = {
includeBindingSource: false,
includeStyles: true,
includeFormulas: true,
saveAsView: true,
includeAutoMergedCells: true,
includeCalcModelCache: true,
includeUnusedNames: true,
includeEmptyRegionCells: true
};
spread.save(function (blob) {
formData.append("templateSJS", blob, {type: 'application/zip'})
$.ajax({
url: url,
type: 'post',
cache: false,
dataType: 'json',
data: formData,
processData: false,
contentType: false,
success: function (res) {
}
});
}, function (e) {
console.log(e)
}, options);
|