Localisation

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
Christophe
Posts: 3
Joined: Mon Dec 18, 2006 11:56 am

Localisation

Post by Christophe »

Hi there,

When using XLS in french localisation the ROUND function crashed the app

I'm using Delphi 2006 and XLS 3.0

P.S. floating point seem to do that
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

The only thing that the implementtion of the ROUND function does is to call the delphi RoundTo function. Can it's behaivor be different in french delphi?


Lars Arvidsson
Christophe
Posts: 3
Joined: Mon Dec 18, 2006 11:56 am

Post by Christophe »

In french the decimal point is a , (Comma) where as in english it'a a . (full stop), so, I think that when I run an app, the round function of XLS use a string that is changed to a french version i.e 12.45 is then changed to 12,25.
Could it be the problem with XLS?

Christophe
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

I don't think so. In Sweden, where we are located, we alos uses comma as decimal separator.


Lars Arvidsson
Christophe
Posts: 3
Joined: Mon Dec 18, 2006 11:56 am

Post by Christophe »

Hi there,

Here is the offending lines:
NameAsFormula['Ystar'] := 'NameAsFormula['Ystar'] := 'ROUND((Ltwo*(Czero+Izero+Govt+(Xone*FRinc)-Zzero)-(Ione*(Lzero-Msupp))-(Ltwo*Erate*(Xtwo+Ztwo))),0)/(Ltwo*(1-MPC+(MPC*Trate)+Zone-(Zone*Trate))+(Ione*Lone))'; // Ystar

NameAsFormula['Rstar'] := 'ROUND((Lone*(Czero+Izero+Govt+(Xone*FRinc)-Zzero))+((1-MPC+(MPC*Trate)+Zone-(Zone*Trate))*(Lzero-Msupp))-((Lone*Erate)*(Xtwo+Ztwo)),3)/(Ltwo*(1-MPC+(MPC*Trate)+Zone-(Zone*Trate))+(Ione*Lone))';

If I remove the word ROUND it works in the french and german regional settings (with no rounding, which we need), however it works ok with the word ROUND in english and chinese.

There is no translation from us, the word ROUND is untouched, it can only come from XLS. Any solution or work around would be welcome

Christophe
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Post by larsa »

Hello

The value for ListSeparator (comma) in the samples is hard coded, and is therefore not valid in any language. As french uses comma for decimal separator, the samples will not work in french.


Lars Arvidsson
Post Reply