c# - Remove excel document action pane -
we can attach document action pane excel file using developer-> expansion pack-> microsoft action pane -> attach.
once excel saved , opening again have stored excel document.
i have excel file (refer image) , wish remove(detach) document action pane using inter op programming in c#. possible so?
code snippet :
application xlapp = null; try { xlapp = new microsoft.office.interop.excel.applicationclass(); string versionno = xlapp.version; xlapp.visible = true; microsoft.office.core.msoautomationsecurity mso = xlapp.automationsecurity; xlapp.automationsecurity = microsoft.office.core.msoautomationsecurity.msoautomationsecurityforcedisable; workbook newwb = xlapp.workbooks.open(filename, type.missing, type.missing, type.missing, type.missing, type.missing, type.missing, type.missing, type.missing,type.missing, type.missing, type.missing, type.missing, type.missing, type.missing); // here want code detach document action pane. }
try this:
microsoft.office.interop.excel.application.displaydocumentactiontaskpane = false;
Comments
Post a Comment