[Bug 62073] New: FormulaParser does not work internationally

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 62073] New: FormulaParser does not work internationally

Bugzilla from bugzilla@apache.org
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: [hidden email]
          Reporter: [hidden email]
  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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62073] FormulaParser does not work internationally

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

Nick Burch <[hidden email]> changed:

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

--- Comment #1 from Nick Burch <[hidden email]> ---
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 62073] FormulaParser does not work internationally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=62073

--- Comment #2 from Dragan Jovanović <[hidden email]> ---
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: [hidden email]
For additional commands, e-mail: [hidden email]