PageOffice中如何隱藏excel的行號列標?


如果希望用戶點擊按鈕隱藏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; //隱藏行號列標}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章