Bug 50829

Summary: Unable to get excel 2007 table information
Product: POI Reporter: Donato <d_tagliabue2>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.7-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Excel 2007 workbook with a table

Description Donato 2011-02-25 08:43:34 UTC
Created attachment 26692 [details]
Excel 2007 workbook with a table

I created a new workbook with Excel 2007 and saved it as xlsx file. The sheet1 contains one table (not a pivot table, just an excel 2007 table). Unzipping the xlsx file, I saw that the table information (such as the cell range) is saved in the file xl/tables/table1.xml.

Using POI 3.7 (object XSSFWorkbook) it seems impossible to access (and change) this table. See also:

(methods such as getRelations( ), getMapInfo( ), .. do not work)
Comment 1 Nick Burch 2011-02-25 16:45:18 UTC
Tables are associated with sheets, so the trick is to get them from the relationships on a sheet, rather than a workbook. I've added a getTables() method to XSSFSheet in r1074710 which does this.