excel-addins

ClickOnce Automatic Update error for VSTO- add-in for Excel

北战南征 提交于 2019-12-25 04:57:28
问题 I created a simple test program to try and understand how Click-Once deployment works and whether or not I can have the program automatically updated. It is an excel add-in with a button in the ribbon that outputs some message box. I have the deployment location set to a public location on the network and updates set to check every time the customization runs. Great - I install the add-in, open Excel, it works fine. Now I go into visual studio and update and re-publish the add-in. Now when I

Distinguish Save and Autosave events in Microsoft Excel Add in

邮差的信 提交于 2019-12-24 11:05:08
问题 I have two Microsoft Excel 2007/2010 C# Addin projects. How can I distinguish regular "Save"/"Save As" commands that are called by user and "AutoSave" event that is periodically invoked by Excel itself? I know that in Microsoft Word I can access AutoSave event via Application.WordBasic object: var oBasic = Application.WordBasic; var fIsAutoSave = oBasic.GetType().InvokeMember("IsAutosaveEvent", BindingFlags.GetProperty, null, oBasic, null); bool isAutoSave = int.Parse(fIsAutoSave.ToString())

Lengthy HTTP calls failing in TaskPane apps on Office for Mac Client

守給你的承諾、 提交于 2019-12-24 06:34:28
问题 We have built an Excel Task Pane add-in that interacts with our server to get data from an external source. For few calls the server takes more than a minute to respond. For such calls, Excel add-in (which runs in Mac Desktop Excel 2016) doesn't receive any response (either success or failure or timeout) even though the server has sent it. Note: This happens only when the add-in runs in Mac Desktop Excel. In other systems and browsers it works fine. Does the Office for Mac client have a low

Excel addin: Cell absolute position

佐手、 提交于 2019-12-24 02:41:47
问题 How can I find the absolute coordinates in pixels of a certain cell? I am developing an Office 2010 addon (the Ribbon UI) and I add a new button to a new menu in the Ribbon and when the button is pressed, I want to get the screen position of that cell. The problem is that Globals.ThisWorkbook.Application.ActiveCell . Top / Left only give the position relative to the A1 corner of the spreadsheet, while I want the position relative to 0,0 of the screen. I found this: How to get screen X and Y

Change the pivot Table filter using VBA

邮差的信 提交于 2019-12-23 08:57:45
问题 I have a pivot table which contains the "CoB Date" field as shown. I am trying to create a macro which automatically changes the date as per the user input. I've written the following macro code. But it shows the error: Unable to get PivotFields property of the PivotTable class Can any one help me with this? Note: Assume that Date Format is not an issue Code: Sub My_macro() Dim num as String num = InputBox(Prompt:="Date", Title:="ENTER DATE") Sheets("Sheet1").PivotTables("PivotTable1") _

Add-ins not loading when opening excel file programmatically

笑着哭i 提交于 2019-12-23 05:45:31
问题 I've seen some similar problems described by others before but no real solution. And I'm sure there is one. I have a .XLA-add in configured to be loaded when I open up Excel. It works fine when I open documents or Excel it self. However, when my BI-system programmatically creates and opens an Excel-file the add-in does not get loaded. The BI-system opens Excel in a new instance so it does not help to have opened Excel on beforehand (and thereby the .XLA-add in) If i Check Options-Add Ins it

Add items to the ROT( Running Objects Table)

。_饼干妹妹 提交于 2019-12-22 09:27:32
问题 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 Application and then return to the original Application, the code line works just fine. The reason I am leaving this so vague, is because this is a problem I am having across 10+ applications. The reason for me not posting code is because I do not believe

How to keep reference to add-in UDF when workbook moved to different folder than add-in?

て烟熏妆下的殇ゞ 提交于 2019-12-21 14:06:47
问题 I wrote an Excel add-in that provides UDFs (user-defined worksheet functions). All is well until one user sends his workbook using those functions to another user, or just tries to use the workbook on more than one computer, where the add-in has been installed to different paths. Even if the only difference in the paths is the drive letter, when the workbook is opened on the other computer, the old full path appears on the formulas in front of all the UDFs, and the formulas return an error.

How do I create an Excel automation add-in in C# that wraps an RTD function?

余生颓废 提交于 2019-12-21 06:05:27
问题 I have a working RtdServer-based automation add-in: How do I create a real-time Excel automation add-in in C# using RtdServer?. Creating a VBA wrapper is trivial: Function RtdWrapper(start) RtdWrapper = Excel.Application.WorksheetFunction.RTD("StackOverflow.RtdServer.ProgId", "", start) End Function This works. I have attempted to create a C# wrapper as follows: [ClassInterface(ClassInterfaceType.AutoDual)] public class RtdWrappers { private readonly Microsoft.Office.Interop.Excel.Application

Call Excel Add-In function in macro

怎甘沉沦 提交于 2019-12-21 02:51:49
问题 I am developing Add-in for Excel 2013 and I have created a function in Excel Add-In as below public string ExcelReturnString() { return "This is the string: hi"; } I have used below code to call the function, but it throws an error. Application.Run(ExcelReturnString) How can I call the Add-in function in macro? 回答1: This is about the farthest thing from straight-forward, but this is how you accomplish the task. I'm going to be as explicit as possible, because the first two or three times I