Bug 46725

Summary: Hyperlink to NamedRanges for HSSFWorkbook broken
Product: POI Reporter: Wayne Clingingsmith <wayne.clingingsmith>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.5-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Excel screen shots
Excel file with errors in hyperlinks to named ranges
Excel workbook with working hyperlinks to named ranges

Description Wayne Clingingsmith 2009-02-17 12:16:34 UTC
Created attachment 23269 [details]
Excel screen shots

POI 3.5beta4
Creating a hyperlink to a named range in a XSSFWorkbook works however creating a hyperlink to a named range in an HSSFWorkbook is now broken.

The named range in Excel is created and looks ok, however selecting it throws error. Looking at it using Excel/Insert/NAme/Define... it look ok and if you select OK it is now fixed and the hyperlink works.

In our product we are using POI 3.2 which uses HSSFName.setReference and now POI 3.5 is using HSSFName.setReferesToFormula



Noted a ToDo in source XSSFName.setRefersToFormula line 175

ptgs = FormulaParser.parse(formulaText, fpb, FormulaType.CELL); // TODO - use type NAMEDRANGE
Comment 1 Wayne Clingingsmith 2009-02-17 12:19:05 UTC
Created attachment 23270 [details]
Excel file with errors in hyperlinks to named ranges

Same coded used to create xls and xlsx workbooks
Comment 2 Wayne Clingingsmith 2009-02-17 12:21:27 UTC
Created attachment 23271 [details]
Excel workbook with working hyperlinks to named ranges

Same coded used to create xls and xlsx workbooks
Comment 3 Wayne Clingingsmith 2009-02-17 12:22:58 UTC
Comment on attachment 23271 [details]
Excel workbook with working hyperlinks to named ranges

Office2007 Excel workbook
Comment 4 Josh Micich 2009-02-17 15:29:32 UTC
Looks like this has been fixed since 3.5-beta4

You were right about the TODO. It's exactly this fix that addresses your bug.  The relevant changelists were svn r729028 and svn r723392 .  It doesn't look like there was a bugzilla entry for this work.