感谢您的解答!
在您提供的代码中:
sheet.addSpan(0,0,3,1,GC.Spread.Sheets.SheetArea.colHeader);
sheet.setValue(0,0,"NO",GC.Spread.Sheets.SheetArea.colHeader);
数字参数都代表什么属性?能给详细解答一下吗?
还有,我想绑定数据的话,怎样找到对应的列呢?
我之前是这样用的:
spread1 = GC.Spread.Sheets.findControl("ss1");
sheet1 = spread1.getActiveSheet();
sheet1.suspendPaint();
sheet1.reset();
var cData = [];
cData.push({ ORDERNO: '000001', Jiseki: "", HykaA: "1", HykaB: "1" });
cData.push({ ORDERNO: '000002', Jiseki: "1", HykaA: "", HykaB: "1" });
cData.push({ ORDERNO: '000003', Jiseki: "1", HykaA: "1", HykaB: "" });
sheet1.setDataSource(cData);
var colInfos = [
{ name: "ORDERNO", displayName: "ORDER NO", size: 150, formatter: "@" },
{ name: "Jiseki", displayName: "製品輸入実績", size: 100, cellType: cellTypeCheck },
{ name: "HykaA", displayName: "その他A", size: 70, cellType: cellTypeCheck },
{ name: "HykaB", displayName: "その他B", size: 70, cellType: cellTypeCheck }
];
sheet1.bindColumns(colInfos);
sheet1.getRange(-1, 1, -1, 3, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
sheet1.resumePaint(); |