function main(spreadsheetReport, isAjaxRefreshCallback) {
if (!spreadsheetReport._newBtn) { // 不要重复添加按钮
var input = document.createElement("button");
//input.className = "button-buttonbar button-bgicon-save";
input.innerText = "新按钮";
input.title = "新添加的按钮";
input.accessKey = "N";
input.style.width = "50px";
input.style.height = "25px";
input.style.verticalAlign = 'top';
input.style.marginLeft = "12px";
//spreadsheetReport.elem_tdSheets
var target = spreadsheetReport.elem_btnPrint.parentNode.nextSibling;
var newBtn = target.parentNode.insertBefore(input, target);
//var newBtn = spreadsheetReport.elem_btnPrint.parentNode.parentNode.appendChild(input);
spreadsheetReport.addListener(newBtn, "click", doNewButtonClick, spreadsheetReport);
spreadsheetReport._newBtn = newBtn;
}
}
// 新添加按钮Click事件处理函数
function doNewButtonClick(e) {
alert("TODO:Click事件处理函数。");
//如果要调用电子表格的相关方法,可参考如下:
//this.doPrint(true, false);//打印
//清单报表导出有如下方法
//this.doExportMenuCloseUp("CSV");//导出CSV,只支持清单报表
//this.doExportMenuCloseUp("LIST_EXCEL");//导出Excel
//分组报表导出有如下方法
//this.doExportMenuCloseUp("HTML");//导出HTML
//this.doExportMenuCloseUp("PDF");//导出PDF
//this.doExportMenuCloseUp("WORD");//导出Word
//this.doExportMenuCloseUp("EXCEL2007");//导出Excel
}