Questions tagged [excel-addins]

Excel add-ins are self-contained programs that extend or add functionality to Microsoft Office Excel.

Microsoft Office Excel add-ins are self-contained programs that extend or add functionality to Excel. By default add-ins are not enabled, and they need to be installed / activated.

Add-ins can be created in multiple ways

  • .xla: a specially saved workbook containing macros for and earlier.
  • .xlam: a specially saved workbook containing macros for current versions of excel.
  • COM: Custom Component Object Model add-ins written in VB6
  • .xll: A DLL add-in using Excel's C API
  • Managed COM addins using or

Visual Studio provides project templates you can use to create application-level add-ins for Microsoft Excel. You can use add-ins to automate Excel, extend Excel features, or customize the Excel user interface.

Links:

1283 questions
3
votes
1 answer

Programmatically enable Excel macro in C#

I have an Excel add-in, and I would like to do the following: Check if the workbook has any macro. Prompt user if he wants to enable the macro. If yes, enable the macro for user. Is there any way to enable a macro in C#?
Dhinnesh Jeevan
  • 489
  • 2
  • 7
  • 22
3
votes
0 answers

VBA Application Events in Excel AddIn

I am making an Excel 2010 AddIn and am trying to add some code to the Application Event Application_WorkbookActivate(ByVal Wb As Workbook) However, my Module inside the AddIn cannot have these events. I tried making a ClassModule with the events and…
Evan
  • 600
  • 2
  • 7
  • 34
3
votes
1 answer

Releasing Excel COM objects

I have some Excel automation code that uses Excel COM objects. From other SO posts I know that one should do the following to release objects at the earliest convenience: Excel.Range rng = GetSomeRange(); // do something with…
Pat Mustard
  • 1,852
  • 9
  • 31
  • 58
3
votes
0 answers

How to treat a user control in an Excel Task Pane like a modal dialog?

I work on an Excel add-in product that contains a task pane that has multiple User Controls on it. We have moved our login process from a modal UserForms dialog to a WebBrowser control that is displayed within the Task Pane when the user clicks our…
3
votes
1 answer

Add items to the ROT( Running Objects Table)

I know how to use *****.GetActiveObject(ProgId), however the problem is that several of the Applications I use this code line on are not added to the ROT, even if they are already open, I get an HRESULT Error. However If I click on another…
3
votes
1 answer

How to add an excel ListObject to a given worksheet in C#?

I am currently developing an excel add-in in C# with several methods (table valued functions) that will be available to excel users and programmers (VBA). How can I write a method which adds a new ListObject (excel table) to the given excel…
tuncalik
  • 1,124
  • 1
  • 14
  • 20
3
votes
1 answer

Make Visual Studio Debugger Target Correct Application

My workplace is making the jump from Office 2010 to 2013. There are a few VSTO Add-Ins that were built in-house. I am working on testing them. On my dev machine I have 2010 and 2013 installed so that I can test things, but also still support 2010…
getglad
  • 2,514
  • 3
  • 24
  • 47
3
votes
1 answer

How to intercept clicking of a built-in Office Ribbon control

I'm wondering if it's possible to detect when a user has clicked the Header/Footer button in Excel so I can show some custom header/footer related ribbon controls on my add-in's tab and hide them when the user is not in header/footer edit mode. Is…
HashTagDevDude
  • 564
  • 1
  • 4
  • 19
3
votes
2 answers

Trim all cells within a workbook(VBA)

I have attempted to add functionality to an excel add-in ave been developing which trims the leading spaces at the end of used cells, and maybe even parse the text, The reason I need to do this is simply to have it turn into a hyperlink which I have…
Studento919
  • 625
  • 2
  • 15
  • 44
3
votes
1 answer

Dynamic disable/enable custom context menu in Excel 2013

I have an Excel AddIn. I add 2 context menu items in cell's context menu. When you right click a cell, based on the formula of the cell, one context menu item will be disabled. I put code for this in sheetSelectionChangeEvent This works fine in…
toosensitive
  • 2,335
  • 7
  • 46
  • 88
3
votes
1 answer

Check if a Range has a Name using Excel.Interop in C#

I am currently working on Excel Addin Application using C# and Excel Interop. I am looping through a range of cells. I am trying to check if a cell is Named or not. But when I am trying to add a if condition there is exception thrown if the range…
ravi
  • 1,707
  • 4
  • 29
  • 44
3
votes
1 answer

How to suppress Disable add-in dialog when Excel is force close

My addin is written in c#, NetOffice, ExcelDNA using WPFframework. Some part uses winforms, too. The main UI is WPF When there is a modal dialog displayed, users force close Excel. Next time when they launch excel, Excel will say " Excel…
toosensitive
  • 2,335
  • 7
  • 46
  • 88
3
votes
2 answers

Excel add in programming

I am trying to understand the excel add in programming using C#. For such a project there is a file called ThisAddIn.cs which handles all the events like WorkBookOpen, WorkBookClose, etc. The code to handle such an event is something like this -…
ravi
  • 1,707
  • 4
  • 29
  • 44
3
votes
0 answers

Excel Application.Ready=False When Receiving Data via COM dll

I am delivering external data using the dispatch interface via a COM dll to an Excel plugin. In the VBA sink method, I check that Application.Ready = True before trying to write the data to the appropriate cell like this, If…
Dan
  • 31
  • 2
3
votes
2 answers

Excel unresponsive when InputBox open, c#

I'm building an excel add in using c#, and i want the user to select a range. I have the inputbox set up and it's receiving the range fine when entered as a text. The problem is that excel is unresponsive when the inputbox is open, the user can't go…
Peter Green
  • 99
  • 1
  • 7