You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2022/12/26 07:43:28 UTC

[Bug 66401] New: FormulaParser does not recognize sheet names containing quotes

https://bz.apache.org/bugzilla/show_bug.cgi?id=66401

            Bug ID: 66401
           Summary: FormulaParser does not recognize sheet names
                    containing quotes
           Product: POI
           Version: 5.2.2-FINAL
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: mirko.scotti@addvalue.it
  Target Milestone: ---

Created attachment 38454
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38454&action=edit
FormulaParser.java

I have an Excel file with a sheet whose name contains a quote. This name is
referenced in a formula on a cell of a different sheet. 

Example:

Sheet name -> Valle d'Aosta
Sheet reference in formula -> 'Valle d''Aosta'!A1

The FormulaParser creates a Ref3DPxg instance having:

_firstSheetName -> Valle dAosta

I have found this issue in version 5.2.3. FormulaParser eats the two
consecutive quotes at line 1185 when, once they are detected, it scrolls to the
next char without appending them to the string builder.

Adding at line 1185 of FormulaParser the following statement solved my issue.

sb.appendCodepoint(look);

See the patched FormulaParser.java. I wonder if you could insert this fix in
the next release.

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


[Bug 66401] FormulaParser does not recognize sheet names containing quotes

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66401

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
           Keywords|                            |PatchAvailable

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


Re: [Bug 66401] New: FormulaParser does not recognize sheet names containing quotes

Posted by Kamal Chandrashekar <sa...@gmail.com>.
Please whilereading place esacpe sequence and try pls.

All the best for your future endeavour 😢😢😢😊😊😘😘😘😘😘😘

On Mon, 26 Dec 2022 at 13:13, <bu...@apache.org> wrote:

> https://bz.apache.org/bugzilla/show_bug.cgi?id=66401
>
>             Bug ID: 66401
>            Summary: FormulaParser does not recognize sheet names
>                     containing quotes
>            Product: POI
>            Version: 5.2.2-FINAL
>           Hardware: PC
>             Status: NEW
>           Severity: blocker
>           Priority: P2
>          Component: SS Common
>           Assignee: dev@poi.apache.org
>           Reporter: mirko.scotti@addvalue.it
>   Target Milestone: ---
>
> Created attachment 38454
>   --> https://bz.apache.org/bugzilla/attachment.cgi?id=38454&action=edit
> FormulaParser.java
>
> I have an Excel file with a sheet whose name contains a quote. This name is
> referenced in a formula on a cell of a different sheet.
>
> Example:
>
> Sheet name -> Valle d'Aosta
> Sheet reference in formula -> 'Valle d''Aosta'!A1
>
> The FormulaParser creates a Ref3DPxg instance having:
>
> _firstSheetName -> Valle dAosta
>
> I have found this issue in version 5.2.3. FormulaParser eats the two
> consecutive quotes at line 1185 when, once they are detected, it scrolls
> to the
> next char without appending them to the string builder.
>
> Adding at line 1185 of FormulaParser the following statement solved my
> issue.
>
> sb.appendCodepoint(look);
>
> See the patched FormulaParser.java. I wonder if you could insert this fix
> in
> the next release.
>
> --
> 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
>
>

[Bug 66401] FormulaParser does not recognize sheet names containing quotes

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66401

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Applied the suggested change via r1906217

Thanks for the investigation and suggestion!

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