Bug 62947 - Incorrect screening of [book index] and sheet name(s) in Ref3DPxg/Area3DPxg.toFormulaString()
Summary: Incorrect screening of [book index] and sheet name(s) in Ref3DPxg/Area3DPxg.t...
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 4.0.x-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2018-11-25 11:35 UTC by gallon.fizik@gmail.com
Modified: 2018-11-25 16:15 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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:

    public void test() {
        Ref3DPxg instance = new Ref3DPxg(
                new SheetIdentifier("book", new NameIdentifier("1screened", false)),

        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