Free Support Forum - aspose.com

Considering VBA Functions As Name Ranges

Hey,

I am facing and issue while getting the Range names from the Excel Workbook.
I am attaching the sample exe with code and the excel file “CustomFunctions.xlsm” in it self.

The file is not having any Range Names but still it is considering 6 Range Names that are the actual functions of VB Module of that File.
Named Range LIst.zip (4.9 MB)

@harshCIPL22,

Thanks for the template file and sample code.

After an initial test, I am able to reproduce the issue as you mentioned by using your sample code with template file. I found Aspose.Cells takes vba functions as name ranges. I have logged a ticket with an id “CELLSNET-47148” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@harshCIPL22

We evaluated your issue further. For all custom functions used in formula, they have to be parsed as Name objects. In fact it is just the behavior of MS Excel, but MS Excel will not show those Name objects in Name manager. For us we cannot remove them from the Name collection either. You may check the property Name.RefersTo, if it is empty then the Name object should not be a named range.

Hope, this helps a bit.

OK thanks for it.
I’ll use it as you suggest it.

@harshCIPL22,

You are welcome.