excel-addins

Register UDF with descriptions of arguments using excel addin

回眸只為那壹抹淺笑 提交于 2019-12-19 21:22:03
问题 I have an addin with an UDF getRegExResult . I want to add a function description and arguments descriptions to this function, so when user installs the addin, closes, opens excel few times and goes to "Insert Function" Dialog box he will be able to find the function with description of the arguments. The same is asked here. I found one answer that suits my needs. Except... I want to be able to do this through an Excel Addin. My idea is to put call into addin workbook_open event like so:

Register UDF with descriptions of arguments using excel addin

白昼怎懂夜的黑 提交于 2019-12-19 21:20:23
问题 I have an addin with an UDF getRegExResult . I want to add a function description and arguments descriptions to this function, so when user installs the addin, closes, opens excel few times and goes to "Insert Function" Dialog box he will be able to find the function with description of the arguments. The same is asked here. I found one answer that suits my needs. Except... I want to be able to do this through an Excel Addin. My idea is to put call into addin workbook_open event like so:

Add user defined function to Visual Studio Excel Add-in

六眼飞鱼酱① 提交于 2019-12-18 19:08:46
问题 In visual studio I have an Excel 2010 Add-in project. How can I have that project create the following module: I know I can save that workbook with that module then use it with my add in. It will be nice if I can have my add-in create that module... 回答1: It is possible to create the module. However for this to work the setting to "Trust access to the VB Project model" must be selected in Excel. It throws an error that access is denied if the trust setting is not selected. using Excel =

Add user defined function to Visual Studio Excel Add-in

痴心易碎 提交于 2019-12-18 19:08:14
问题 In visual studio I have an Excel 2010 Add-in project. How can I have that project create the following module: I know I can save that workbook with that module then use it with my add in. It will be nice if I can have my add-in create that module... 回答1: It is possible to create the module. However for this to work the setting to "Trust access to the VB Project model" must be selected in Excel. It throws an error that access is denied if the trust setting is not selected. using Excel =

this is error ORA-12154: TNS:could not resolve the connect identifier specified?

流过昼夜 提交于 2019-12-17 09:44:01
问题 I've this code : OracleConnection con = new OracleConnection("data source=localhost;user id=fastecit;password=fastecit"); con.Open(); string sql="Select userId from tblusers"; OracleCommand cmd = new OracleCommand(sql, con); OracleDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { messageBox.Show(dr[0].Tostring()); } Same code in both projects, in project1 "WinForm" Is Working correctly in project2 "Excel 2007 addins" Following error appears: ORA-12154: TNS:could not resolve the connect

Xl Add-In (VBA) and persistent objects

假如想象 提交于 2019-12-14 04:08:56
问题 I am writing an add-in for XL 2010 / 2013 that makes use of a database connection via an ADODB.Connection object. I tried to declare the object in various ways in order for it to remain between uses of the add-in but so far to no avail. The goal is to initialise the connection at startup and maintain this for the duration. When the add-in workbook's Open event is triggered the initialisation code runs fine, makes the connection and I have an ADODB.Connection object. When the sequence finishes

How to perform an action on clicking a custom context menu created in excel using Excel Add-In created with visual studio 2010

五迷三道 提交于 2019-12-13 16:08:31
问题 I am creating an Excel Add-In using Visual Studio 2010. My intention was to add a context menu to a cell and perform some action on the selected cell or cells. Here is the code I have got as of now Public Class CC Private Sub ThisAddIn_Startup() Handles Me.Startup AddMenu() End Sub Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown DeleteMenu() End Sub 'AddMenu add context menu to excel Sub AddMenu() On Error Resume Next Dim Bar As Microsoft.Office.Core.CommandBar Dim NewControl As

Getting the version and platform of Office application from Windows Registry

▼魔方 西西 提交于 2019-12-13 12:23:27
问题 I'm working on a Inno Setup installer for an MS Office Add-In and trying to find a way to get the version and target platform (bitness) of Excel and Outlook, preferably from the Windows Registry. Although some unofficial sources list some methods to extract version information from the Windows Registry, that information appears to be unreliable. Does anyone know if there is a reliable (and official) way to get version and platform information from the version of Office (and associated

Reloading an Excel Addin Programmatically

守給你的承諾、 提交于 2019-12-13 01:15:37
问题 I have an excel plug in that has a number of features. I have a button on the ribbon titled "configuration settings" that allows the user to select whether or not to allow some options (whether to include a right click menu, or to display some buttons on my ribbon). The only way that I know to define a right click menu or to design the ribbon is in the start up of the excel addin. I have a config file that gets checked on load, but should the user change the configuration using my ribbon

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

若如初见. 提交于 2019-12-12 17:26:23
问题 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 worksheet, and bind the given DataTable as data source? Something like the following: using Excel = Microsoft.Office.Interop.Excel; ... [ClassInterface(ClassInterfaceType.AutoDual)] public class TableFunctions { ... public Excel.ListObject CreateListObject