Re: How to copy an HSSFSheet into another HSSFSheet which belongs to a different HSSFWorkbook.

Dan S <[email protected]> Mon, 12 May 2025 18:32:17 -0400
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <CANeOZMRxwbhVkbnk0-=7KoN-TmeM_KKw2bGEZZ2oyFBa+Zs6=Q@mail.gmail.com>
--0000000000002ab9f60634f7e442
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

PJ,
Thank you! That is very helpful and aligns very well with the XSSFSheet
copyRows method in regards to use of CellCopyPolicy and CellCopyContext.

On Mon, May 12, 2025 at 5:49=E2=80=AFPM PJ Fanning <[email protected]> w=
rote:

> There is copyRowFrom in HSSFRow.
>
>
> https://poi.apache.org/apidocs/dev/org/apache/poi/hssf/usermodel/HSSFRow.=
html#copyRowFrom-org.apache.poi.ss.usermodel.Row-org.apache.poi.ss.usermode=
l.CellCopyPolicy-org.apache.poi.ss.usermodel.CellCopyContext-
>
> On Mon, 12 May 2025 at 21:54, Dan S <[email protected]> wrote:
> >
> > XSSFSheet has a copyRows method which allows for copying the contents o=
f
> > one XSSFSheet to another one. I do not see an equivalent method for an
> > HSSFSheet. I see from this post
> > <
> https://lists.apache.org/[email protected]:dfr=3D2020-1-1|dto=3D20=
25-5-12:HSSFSheet%20copy
> <https://lists.apache.org/[email protected]:dfr=3D2020-1-1%7Cdto=
=3D2025-5-12:HSSFSheet%20copy>
> >
> > a solution which allows copying for HSSFSheet and XSSFSheet. I just wan=
t
> to
> > make sure if that is a recommended way for HSSF and if not has there be=
en
> > any change to POI that provides methods for this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

--0000000000002ab9f60634f7e442--