如果希望用户点击按钮隐藏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; //隐藏行号列标}