如果希望用戶點擊按鈕隱藏excel的行號列標
編寫後臺代碼如下:
PageOfficeCtrl1.AddCustomToolButton("隱藏excel的行號列標", "HideHeadings()", 0);
在前臺html中添加javascript函數
function HideHeadings(){
document.getElementByIdx_x("PageOfficeCtrl1").Document.Application.ActiveWindow.DisplayHeadings = false; //隱藏行號列標
}
如果希望文檔打開後就立即隱藏excel的行號列標
編寫後臺代碼如下:
PageOfficeCtrl1.JsFunction_AfterDocumentOpened = "HideHeadings()";
在前臺html中添加javascript函數
function HideHeadings(){
document.getElementByIdx_x("PageOfficeCtrl1").Document.Application.ActiveWindow.DisplayHeadings = false; //隱藏行號列標}