I have two questions about Ranges for Aspose Cells.
#1 Question /////////////////////////////////////////////////////////////////////////////////////
I created by hand an excel sheet with some ranges. When i want to get all the ranges I just use the GetNamedRanges method. Everything works fine.
But then I added some “Excel tables” in my sheet (let’s call one of them “Table1”). Those objects can be retrieved with the ListObjects method.
Here comes the problem: I also added ranges into my “Excel tables” e.g. I want to add into the excel table called “Table1” a range for one specific cell (let’s call it rangeSpecificCell). I can do it with excel but when I want to analyze my excel file through Aspose I have the following issue :
None of the method GetNamedRanges or ListObjects recognize the range that should be contained by the Excel Tables “Table1” (aka rangeSpecificCell). Do you have any tips to manage this situation ?
#2 Question /////////////////////////////////////////////////////////////////////////////////////
Is it possible to use the commentary field for a range ? (Excel 2007)
I found some posts on this forum but with no examples of use…
Thanks in advance for your answers (and sorry for my poor english !)
1) Please create a sample console application, zip it and post it here to show the issue, we will check it soon.
2) Please elaborate more and explain your requirement. You may attach sample files, screen shot. This way we can understand your needs well.
Dear Amjad Sahi,
1. Please find enclosed an Excel sheet “Demo.xlsx” and the image “question1.png” that may help you to understand the problem.
After understanding the situation with “question1.png”, the following code shows the problem
// i open my report
Workbook report = new Workbook(“C:\Users\lowia\Desktop\Demo.xlsx”);
// i want to list all the ranges
Range ranges = report.Worksheets.GetNamedRanges();
foreach (Range unRange in ranges)
// regarding Demo.xlsx, i should have “Name” and “Name2”
// but as “Name” is in an Excel table i only got “Name2” with GetNamedRanges()
// i want to list the Table
ListObjectCollection tables = report.Worksheets.ListObjects;
foreach (ListObject aTable in tables)
// it finds the right table but when you observe the content of the tables
// it says that none of the cells in the table has a range (but we know that there’s a range called “Name” in it)
Range rangeOfMyTable = aTable.DataRange;
2. In the zip file you will find a pic called “question2” that precise my request.
Thanks in advance,
Hi babar raza,
Thanks for the quick reply. I’m waiting for some informations.
We have fixed this issue. Please download Aspose.Cells for .NET v22.214.171.124
Workbook report = new Workbook(“C:\temp\Demo.xlsx”);
NameCollection names = report.Worksheets.Names;
for (int i = 0; i < names.Count; i++)
Name name = names[i];
name.Comment = "Adding comment for Range " + i;
Please try Worksheets.GetNamedRangesAndTables method.
The issues you have found earlier (filed as 27760) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.