You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/07/16 22:47:26 UTC

[Bug 55273] New: Names referring to Excel tables have no associated sheet

https://issues.apache.org/bugzilla/show_bug.cgi?id=55273

            Bug ID: 55273
           Summary: Names referring to Excel tables have no associated
                    sheet
           Product: POI
           Version: 3.10-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: martin.studer@mirai-solutions.com

Created attachment 30596
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30596&action=edit
Excel file used for reproduction of issue

Names that refer to Excel tables (Excel 2007+) have no associated sheet
although an Excel table is linked to a worksheet.


See the following example:

XSSFWorkbook wbook = (XSSFWorkbook) WorkbookFactory.create(new
File("ExcelTables.xlsx")); // file attached
Name nm = wbook.getName("TableAsRangeName");
System.out.println(nm.getRefersToFormula()); // gives TableName[#All]
System.out.println(nm.getSheetName()); // gives null ...
// ... although tables are associated to a worksheet
for(XSSFTable t : wbook.getSheet("ExcelTable").getTables()) {
  System.out.println(t.getName());
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org