Summary: | java.lang.RuntimeException: WINDOW2 was not found (Empty sheet) | ||
---|---|---|---|
Product: | POI | Reporter: | Triqui <pedro.t.garcia> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.8-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Triqui
2012-10-11 11:40:30 UTC
do you know the origin of the problematic file? Can you attach it? What happens if you open and re-save it in Excel or LibreOffice ? Does POI read the re-saved file ? POI is being used in thousands installations across the world and so far no one complained on this exception. All test files that we've seen have a WINDOW2 record . Yegor The file is created from the 'export' feature of an application of one of our providers. I'm trying to find out how the files are generated but it's not easy. Also I'm trying to get an example of one of those files without any sensible data in it so I can attach it. As with every problem I found using POI re-saving the file fixes everything. This file has another problem and I've reported a bug about it and you have asked me to attach the file already (I'm doing my best to get one I can attach). The question I have is, since both Excel and LibreOffice open this file correctly, shouldn't POI try to do the same thing? I understand your statement about this being a very unique case. But just fyi, I receive excel files every day from more than 250 different sources (and growing) so the sample of files I have to handle gives me the great opportunity to hit the weirdest issues :) (This should sound as congratulatory comment, since I've only found 5 bugs with POI so far, and that means POI is working great for me). Thanks. I generally agree with you. If Excel and LibreOffice tolerate files with missing WINDOW2 then POI should do so, but I will apply this fix only when see a sample file. Yegor changing status to NEEDINFO until a test file is provided I have attached a test file in the bug 53984 (attachment 29880 [details]) The problem with that file is that it throws the exception reported in that bug first and only once you get around it the exception reported here is thrown. The fix I proposed in a comment above this has been working without issues for some time now, but if you need anything from me to fix, just let me know. This has been fixed as part of bug #53984 - we now warn + skip over these invalid bof / eof sets |