xll

Setting Excel Number Format via xlcFormatNumber in an xll

I'm trying to set the number format of a cell but the call to xlcFormatNumber fails leaving the cell number format as "General". I can successfully set the value of the cell using xlSet. XLOPER xRet; XLOPER xRef; //try to set the format of cell A1 xRef.xltype = xltypeSRef; xRef.val.sref.count = 1; xRef.val.sref.ref.rwFirst = 0; xRef.v...

Calling an XLL from (unmanaged) C++

Hi, I have an XLL Excel addin and now another team wants to use the same functionality in their project (unmanaged C++). Is there a way to interface with this XLL directly from C++? ...

Returning Japanese characters via char* in an Excel XLOPER

I am retrieving Japanese characters from a data source and I want to return this data to Excel in an XLOPER. I am using a Japanese version of Excel 2003 (hence XLOPERs and not XLOPER12s). wchar_t* pszW = OLE2W(bstrResult); //I have the data I am trying to copy in a CComBSTR ULONG ulSize = ::WideCharToMultiByte( CP_THREAD_ACP, 0, pszW,...

Creating an excel worksheet function (UDF) at runtime in C#

Hey all Is it possible to create worksheet functions dynamically in C#, that is, without using the method attribute approach? Or is this something that's only supported using an XLL? What I'm looking at achieving is to retrieve a functions list (along with parameters) from a source and register these functions. These functions will jus...

Converting XLL addin functionality to a native VB module : Problem refreshing formulae

Hey all I have a .xll plugin that registered a few functions which we use in our excel sheets in a number of places. The performance was very poor, and we didn't have the original code, so we replicated the functionality by writing the functions in VB in a module. The functions work as expected and performance is much better. The probl...

Calling Specific Win32 API from Delphi - Why do Exceptions Fly Without an "asm pop..."?

I'm using Delphi to make an XLL add-in for Excel, which involves making a lot of calls to the Excel4v function of xlcall32.dll. However, as I'm guessing very few Delphi experts here have worked with that specific API, I'm hoping that the problem might have been observed in other APIs too. In C, specifically in the xlcall.h file that co...

Can I run Excel from a .cmd script with all macros enabled?

How can I run excel from command line / cmd script such that it doesn't prompt if I want to enable macros in the spreadsheet I am running it with? ...

XLL plugin's DDEConnect() fails when connecting to Excel?

I have a problem with connecting to Excel, there's a plugin that reads from db and tries to fill excel sheet with data across DDE, and it seems to be failing sometimes on DDEConnect function with error number 16390 - DMLERR_INVALIDPARAMETER Invalid parameter to DDEML function call. What is more interesting it is failing more often when...

Calling an XLL in C#

I have a XLL Addin (Test.xll). I wish to use this in my C# (VS2008/.Net 3.5) application. If anybody can guide me how to use this in my C# application. If anybody could please guide me how to use this XLL in the C# application, it will be great. Any help is appreciated. Regards, Tushar ...

Excel4 API call with Office 2010 64-bit

Hello, I try to convert an existing 32-bit XLL to a 64-bit version in order to run under Excel 2010 64-bit. But when I try to run it under Excel it crashes Excel. It crashes when I do a Excel4(xlfRegister, result, 7, x0, x1, x2, x3, x4, x5, x6); with XLOPER parameter (not XLOPER12). Do you know if I can still use Excel4 in 64-bit ? If i...

[Excel] How can you retrieve a signature of function usable in Excel in VBA or a DLL ?

Hello, When you type a function and press CTRL + SHIFT + A, you get a completion in Excel for the rest of the arguments. For example, try to type, =SUM(, then press CTRL + SHIFT + A, and you will get the following: =sum(number1,number2,...) My question is: how do you retrieve this signature from either VBA or a XLL, such as you can i...

XLL doesn't properly load

I've got a XLL Addin and I'm trying to run it under Excel 2007 XP without VBA installed. My addin is well registered (OPEN key as /R "C:\Program Files (x86)\MyAddin\myAddin.xll" in HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Options). When debuging, I see that DLLMain is called... but not xlAutoOpen (neither others xlSomething...

Can't load xll programmatically

I'm trying to automating some tests for an Excel add-in, which is in xll form. I have some problem in loading the xll. I'm writing it in C# and my code looks like this: using Microsoft.Office.Interop.Excel; Application xlApp; Workbook xlWorkBook; Worksheet xlWorkSheet; // create application, open workbook, etc ... // now try to regi...

Using Excel C API (XLLs)

I have been exploring Excel C API and am now good at getting multi-cell input, doing computations and outputing the result in a single cell. Now I want to output the result in multiple cells, for example: 1) Get a column range as input 2) Sort the numbers (in the cells) 3) Write the sorted numbers in a new column or the same column (in-...