Bug 50829 - Unable to get excel 2007 table information
Summary: Unable to get excel 2007 table information
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.7-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2011-02-25 08:43 UTC by Donato
Modified: 2011-02-25 16:45 UTC (History)
0 users

Excel 2007 workbook with a table (9.18 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2011-02-25 08:43 UTC, Donato

Note You need to log in before you can comment on or make changes to this bug.
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.