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.

enter image description here

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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -