Bug 44336

Summary: [PATCH] Sheet names with special characters aren't rendered properly in formulas
Product: POI Reporter: Josh Micich <josh>
Component: HSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: All   
Attachments: svn diff for several files + 5 new java files

Description Josh Micich 2008-01-31 22:44:18 UTC
Ref3DPtg.toFormulaString() has some code to detect the presense of a space 
char.  Area3DPtg doesn't even have that.

Some sample junit code to show the error:

Ref3DPtg target = new Ref3DPtg("A1", (short)0);
Workbook book = Workbook.createWorkbook();
book.setSheetName(0, "profit+loss");
assertEquals("'profit+loss'!A1", target.toFormulaString(book));
Comment 1 Josh Micich 2008-01-31 22:51:21 UTC
Created attachment 21457 [details]
svn diff for several files + 5 new java files

Some unrelated junit tests broke while doing the work.	These were mostly
related to printRanges.  It was assumed that the correct behaviour for
rendering 3d refs for print ranges was the same as that for rendering formulas
(i.e. delimit and escape if any special characters are present).  The junits
were modified to reflect this.
Comment 2 Nick Burch 2008-02-01 05:02:32 UTC
Thanks for this, patch applied to trunk