Hi,
i did following steps:
1.create a new excel
2.create a small table with sample data 2 columns 2 rows
3.format this area as Table via the excel format as in home ribbon of excel
4.create a range on the full table
This will lead to following ‘Refer to’: =Table1[#All] in ‘Name Manager’.
I can get the Named Range by code but when i try to get the value
by ‘Name.GetRanges()’ the result is null.
How can i get the values of this range ?
I add an excel example.
We use Aspose cells version 7.5.3.0
Kind regars,
Guido
Hi Guido,
Thanks for your posting and using Aspose.Cells.
Currently, you cannot retrieve ranges that refers to table objects. We have logged a New Feature request in our database for this issue. We will look into it and implement this feature if possible. Once, it will be implemented or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-42434.
Hi,
I think you may try the following sample code to get the details for all types of named ranges if it fits your needs:
e.g
Sample code:
Workbook workbook = new Workbook(“e:\test2\TableAll.xlsx”);
Range[] test = workbook.Worksheets.GetNamedRangesAndTables();
for(int i= 0; i<test.Length; i++)
{
Console.WriteLine("Name: " + test[i].Name + " Refer to: " + test[i].RefersTo);
}
Thank you.