[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    [Bug 54316] New: NullPointerException when reading spreadsheet with external reference
From:       bugzilla () apache ! org
Date:       2012-12-17 9:16:37
Message-ID: bug-54316-47293 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]

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

            Bug ID: 54316
           Summary: NullPointerException when reading spreadsheet with
                    external reference
           Product: POI
           Version: 3.9-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: jan.stette@gmail.com
    Classification: Unclassified

I'm seeing a NullPointerException when trying to read an HSSF spreadsheet using
POI 3.9.0. The error happens here:

ExternSheetNameResolver.prependSheetName(FormulaRenderingWorkbook, int, String)
line: 34    
Ref3DPtg.toFormulaString(FormulaRenderingWorkbook) line: 91    
FormulaRenderer.toFormulaString(FormulaRenderingWorkbook, Ptg[]) line: 92    
HSSFFormulaParser.toFormulaString(HSSFWorkbook, Ptg[]) line: 83    
HSSFCell.getCellFormula() line: 621    

Debugging it, I see in ExternSheetNameResolver.prependSheetName() that the
sheet name coming back from the ExternalSheet object is null. (This comes from
LinkTable.getExternalBookAndSheetName(), where shIx gets the value -1).

The spreadsheet in question has a couple of external references of the form
'NNNN.xls'#$''.D1, which is where the error occurs. (I'm unfortunately not able
to attach the spreasheet as it contains confidential information)

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic