ExcelDNA addin issue setting cell range formula

29 views
Skip to first unread message

Osman Hawari Polo

unread,
Jul 5, 2024, 3:42:31 AMJul 5
to Excel-DNA
Hi all.
I'm trying to use ExcelDNA to create a visual addin for Excel. 
The add-in will show a interactive form when a Ribbon button is clicked and it allows the user to define a set of filters to query data.

When the user confirms the filter selection and the form is closed, the Ribbon component will retrieve the selected cell range from the excel sheet and will assign a formula with a UDF invocation with the user selection. This UDF will return dynamic array as a response to be set on the excel sheet.

The issue that is blocking me is that there are large parameters in the filter selection that is making the formula to crash when it's assigned to the cell range. I have search for the error and it can be related to the 255 length limit.

I've tried to assign the UDF call to the Formula and FormulaArray properties of the cell range with two different errors:

Setting FormulaArray: "Unable to set the FormulaArray property of the Range class"
Setting Formula: "Exception from HRESULT: 0x800A03EC"

I have also tried to make the replacement in the cell contents to skip the limit but it looks like that the maximum size of a formula parameter is 255 chars, and when this cap limit is reached, the sequent replacements are being ignored.


Can you guide me on this please?

Many thanks in advance.


Reply all
Reply to author
Forward
0 new messages