Hi,
I think this is the correct way to do this nowadays.
The CellRangeAddress has the advantage that it allows a more
meaningful way of addressing, e.g. it allows something like this:
sheet1.setRepeatingRows(CellRangeAddress.valueOf("1:4"));
sheet1.setRepeatingColumns(CellRangeAddress.valueOf("A:A"));
which is much more readable.
See the Javadoc of CellRangeAddress.valueOf() for the supported ways
of addressing ranges.
Dominik.
On Sat, Aug 23, 2014 at 5:12 AM, Alejandro Salas
<[email protected]> wrote:
> Hello everyone,
>
> I've been hired to update the dependencies from an old system which includes
> poi to create Excel files. I've used Poi but about 7 years ago.
>
> I'm a little confused with the change of
> workbook.setRepeatingRowsAndColumns() and the fact that now it's been split
> into two methods and CellRangeAddress.
>
> One of the calls I have encountered is the following:
> workbook.setRepeatingRowsAndColumns(0, 0, 0, 0, 1);
>
>
> Now, looking at the deprecated code that translates into:
> sheet.setRepeatingRows(new CellRangeAddress(0, 1, -1, -1));
>
> sheet.setRepeatingColumns(new CellRangeAddress(-1, -1, 0, 0));
>
> Is there a better way to do it?
> Any pointers are appreciated.
>
> Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]