Bug 62947

Summary: Incorrect screening of [book index] and sheet name(s) in Ref3DPxg/Area3DPxg.toFormulaString()
Product: POI Reporter: gallon.fizik <gallon.fizik>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.0.x-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description gallon.fizik@gmail.com 2018-11-25 11:35:47 UTC
Currently in {Ref3DPxg | Area3DPxg}.toFormulaString() each sheet name is screened with ' ' if necessary, producing results like:
[0]'1screened'!A1, [0]notScreened:'1screened'!A1, etc.

However, Excel behaves differently and screens the entire book+sheet [range] section if any sheet name needs screening. Thus formatting this part of a reference string cannot be done recursively but shall be done in one piece.

I have already written a solution and will post a pull request soon.

For now, a simple test case:

    @Test
    public void test() {
        Ref3DPxg instance = new Ref3DPxg(
                0,
                new SheetIdentifier("book", new NameIdentifier("1screened", false)),
                "A1");

        assertEquals("'[0]1screened'", instance.toFormulaString());
    }
Comment 1 gallon.fizik@gmail.com 2018-11-25 11:55:03 UTC
pull request: https://github.com/apache/poi/pull/134
Comment 2 PJ Fanning 2018-11-25 16:15:13 UTC
Merged using https://svn.apache.org/viewvc?view=revision&revision=1847418