I have a range in my template that consist of un-sequenced cells. so say the Range range = A1-A3 and D1-D3 and F1-F3
When I do a GetRangeByName, it is returning a null. I assume this is becuase of the way the range is defined. is there a way to handle ranges like this?
Currently, you can only create and get those ranges which are of rectangular shape with their cells continuous and adjacent to each other. We may consider of supporting the non adjacent ranges of cells in future.
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.
Well, CreateRange() method allows the creation of Range in a sequence (Row * Column Matrix). Please see the following overloaded methods of CreateRange() which you can use to create range.
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for considering Aspose.
Please add Non-sequenced Ranges with the following codes:
Workbook workbook = new Workbook(); int index = workbook.Worksheets.Names.Add("NonSequencedRange"); Name name = workbook.Worksheets.Names[index]; name.RefersTo = "=Sheet1!$A$1:$B$3,Sheet1!$E$5:$D$6"; workbook.Save (@"F:\FileTemp\dest.xls");
Currently, we can only process Non-sequenced Ranges as a defined Name.