Bug 50829 - Unable to get excel 2007 table information
Summary: Unable to get excel 2007 table information
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-25 08:43 UTC by Donato
Modified: 2011-02-25 16:45 UTC (History)
0 users



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

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:
http://comments.gmane.org/gmane.comp.jakarta.poi.user/16123

(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.