//初始化spread 并加载模板文件
function initSpread(sfilename) {
spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 });
if (sfilename.length > 1) {
$.ajax({
url: sfilename,
datatype: "json",
success: function (data) {
//here to load ssjson file.
spread.suspendPaint();
spread.fromJSON(JSON.parse(data));
spread.resumePaint();
},
error: function (ex) {
alert('Exception:' + ex);
}
});
}
sheet = spread.getActiveSheet();
//成功载入模板后,执行以下语句无效了
sheet.setValue(9, 3, 'dddd');
}
|
|