poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alec Swan <alecs...@gmail.com>
Subject Problems with accessing named ranges
Date Tue, 27 Sep 2011 15:50:41 GMT

I have a named range defined as
OFFSET(Sheet1!$B:$B,1,,COUNT(Sheet1!$B:$B),). I followed the
documentation and accessed the range as follows:

    Name aNamedCell = targetWb.getName("DynamicChartData");
    AreaReference aref = new AreaReference(aNamedCell.getRefersToFormula());

However, the last line throws "IllegalArgumentException: References
passed to the AreaReference must be contiguous, use
generateContiguous(ref) if you have non-contiguous references", but
the range is contiguous!

Moreover, calling
throws "java.lang.IllegalArgumentException: Invalid Formula cell
reference: 'OFFSET(Sheet1!$B'"

What I am trying to do is define a named range on the first two
columns of the first sheet and then programmatically add data to the
first sheet and not break the range.




To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message