We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Named Range Comments

Excel lets you add a comment to Named Ranges.

We were hoping to use this field as a place to store some meta data for the named range.

I don’t see a property in Aspose.Cells that corresponds to this. Am I missing something?

Thanks

Mitch

Hi,


Well, you may try to use Name.Comment attribute to get/set the comments for the named ranges (Name objects). See the sample code below for your reference:
e.g
Sample code:

Workbook workbook = new Workbook();
int index = workbook.Worksheets.Names.Add(“range1”);
Name range = workbook.Worksheets.Names[index];
range.RefersTo = “=Sheet1!A10:A400,Sheet1!H10:J400”;
range.Comment = “Adding comment for the Range”;
}
workbook.Save(“C:\temp\name.xlsx”);


Hope, this helps a bit.

Thank you.