poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Reuter <c.reu...@testingsolutions.de>
Subject How to remove XSSFTable and CTTable ?
Date Fri, 26 Feb 2016 16:31:54 GMT
Hi there,

I am working with XSSFTable and CTTable in my workbooks.
My program opens an .xlsx - template file with POI in order to delete 
and recreate some of the sheets in this file and save it as a new file.

The problem is that the deleted sheets as well as the new sheets created 
programmatically may contain tables. Unfortunately if there are tables 
defined in the deleted sheets they are not deleted when the sheet is 
I therefore get ID conflicts later if one of my newly created tables has 
the same ids as one of the tables which have been left over from the 
sheet deletions.

The only way I see to remove the existing tables is to open the zip file 
before reading it as a workbook and deleting the contents of the 
subfolder "xl\tables" which contains the table definitions.

Can somebody help me to find a better solution please?
If not: can someone provide a code snippet for the above mentioned 
low-level manipulation of the file?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message