function main(spreadsheetReport) {
var writeBack = spreadsheetReport.spreadsheetReportWriteBack;
writeBack.removeListener(writeBack.elem_btnSave, "click", writeBack.doSaveClick, writeBack);
writeBack.addListener(writeBack.elem_btnSave, "click",
function(e) {
//针对E4这个扩展后的单元格,如果是表单式报表(即不存在扩展的情况)
//可以直接直接var E4 = spreadsheetReport.getCell("E4");也可
var E4list = spreadsheetReport.getExpandedPositions("E4");
for (var i = 0; i < E4list.length; i++) {
var E4 = spreadsheetReport.getCell(E4list[i]);
if (!E4.innerText) {
alert("联系人不能为空!");
return;
}
}
this.doSaveClick(e);
},
writeBack);
}