You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Łukasz Jarych <ja...@gmail.com> on 2023/06/05 07:50:14 UTC

Still code for removing tables is not working for me

Hi Guys,

i tried to use this code:

OPCPackage pkg = workbook.getPackage(); for (XSSFTable table :
sheet.getTables()) { workbook.removePartRelation(table, true);
pkg.removePart(table.getPackagePart()); }
but this is not working for me.
Intellij is not seeing removePartRelation property.
I looked at StackOverflow, Code Ranch and tried chat gp but this is still
failing for me...

Please help
Luke


[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&>
06/05/23,
09:49:30 AM

Re: Still code for removing tables is not working for me

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

There is no such method in XSSFWorkbook, so IntelliJ is right to not show
it to you.

When looking for previous discussions, the following pops up quite
prominently and may exactly describe what you are looking for:
https://lists.apache.org/thread/ss51zf0omx01ylkr6sd9snk83td0nn00

D.

On Mon, Jun 5, 2023 at 9:50 AM Łukasz Jarych <ja...@gmail.com> wrote:

> Hi Guys,
>
> i tried to use this code:
>
> OPCPackage pkg = workbook.getPackage(); for (XSSFTable table :
> sheet.getTables()) { workbook.removePartRelation(table, true);
> pkg.removePart(table.getPackagePart()); }
> but this is not working for me.
> Intellij is not seeing removePartRelation property.
> I looked at StackOverflow, Code Ranch and tried chat gp but this is still
> failing for me...
>
> Please help
> Luke
>
>
> [image: Mailtrack]
> <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&
> >
> Sender
> notified by
> Mailtrack
> <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&
> >
> 06/05/23,
> 09:49:30 AM
>