Bug 44589 - getSheetAt works not 100%, sometimes no Results get back
Summary: getSheetAt works not 100%, sometimes no Results get back
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2008-03-12 08:57 UTC by Alexander Diedler
Modified: 2013-08-05 09:07 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Diedler 2008-03-12 08:57:47 UTC
IF I have a large(?) (28 sheets) Excelsheet and want to get every Sheet looping through a Interface, not every Sheet will be identified by ID correctly.

FileInputStream in = new FileInputStream(filename);
POIFSFileSystem fs = new POIFSFileSystem(in);
HSSFWorkbook e_workbook = new HSSFWorkbook(fs);	
HSSFSheet e_sheet = e_workbook.getSheetAt(Integer.parseInt(sheet_id));
brings me sometimes an result, sometimes not but eyery sheets has exactly the same structure of cells. The readed cell has the Format "Text" in Excel an contains a String "1A1".
Comment 1 Alexander Diedler 2008-03-12 08:58:47 UTC
My Version is 3.0.2 Final of POI Classes
Comment 2 Nick Burch 2008-03-13 06:05:11 UTC
Is the problem that some sheets come out in the wrong order, or that some sheets come out twice, and others not at all?

(eg 10 -> 10, 11 -> 10, 12 -> 12, or 10 -> 10, 11 -> 12, 12 -> 11, 13 -> 13)

Also, if you load the file up in excel, and do save as, does the resulting file work properly with poi, or do you still have the same issue?
Comment 3 David Fisher 2009-02-18 12:20:29 UTC
Are some of the sheets hidden?

Are some of them chart sheets?

If so then you might try with the latest 3.5beta5. If this fails then it would help if you would attach a file, or perhaps ask a question on the user list.
Comment 4 Dominik Stadler 2013-08-05 09:07:33 UTC
no response in a long time => resolving for now, please reopen with more information ifnthis is still an issue