ExcelReference should expose property that checks if it is a union range

Jun 7, 2013 at 5:36 AM
Currently the only way to determine if an ExcelReference is composed of multiple disjoint ranges is to check the InnerReferences property which always allocates a new List.

I propose exposing a IsUnionRange property that would be implemented like this:

public bool IsUnionRange { get { return rectangles.Count > 1; } }

I have a case with a very large number of calls to a custom function which needs to do some processing on an input ExcelReference and I would like to avoid unnecessary allocations in the common case where the reference is not a union range.
Jun 8, 2013 at 12:04 PM
Hi Koustubh,

This sounds reasonable - I'll have a closer look.