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 2018/02/02 12:36:59 UTC

[Bug 62073] New: FormulaParser does not work internationally

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

            Bug ID: 62073
           Summary: FormulaParser does not work internationally
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: drjovanovic@gmail.com
  Target Milestone: ---

Imagine following scenario :
User of my spreadsheet-editing app enters a formula =6,6*A1 under his/her (for
example) German culture. User obviously wants to multiply A1 value by 6.6 . But
, inside FormulaParser comma sign has a fixed meaning described as 
 * <function> ::= <functionName> ([expression [, expression]*])
, so it can not recognise the string 6,6 as number. 

Did I miss something ? Is there a way to get over this problem using
FormulaParser ? Or should I somehow pre-process this string before I pass it to
FormulaParser ? If so, I also need to know what is general purpose of comma
sign in those formulae.

I may also try to alter FormulaParser class in a way that - for some locales -
it interprets comma as decimal separator, and uses some other character (; for
example) for expression separator.

-- 
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 62073] FormulaParser does not work internationally

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

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED
                 OS|                            |All

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Excel formulas are always stored in US format. (To check, type a German formula
into a spreadsheet, save as .xlsx, unzip the .xlsx and look at the formula
stored in the sheet1.xml file)

Because Excel files always use US format for storage internally, and that's
what you'll get back from POI if you read a german-set formula, POI also uses
US format for all evaluations

-- 
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 62073] FormulaParser does not work internationally

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

--- Comment #2 from Dragan Jovanović <dr...@gmail.com> ---
Ok. 
I have copied a few POI classes to my project, and made some changes in them,
so now my project is able to parse and render formula strings in format
different than US one. These are differences between formats which I
implemented :
//                      US      EU
//decimal separator       .       ,
//argument separator      ,       ;
//array item separators   , ;     . ;

So if some-when you want to integrate that functionality into POI, write me an
email.

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