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

Jun 7, 2013 at 6: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.
Coordinator
Jun 8, 2013 at 1:04 PM
Hi Koustubh,

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

Regards,
Govert