Forum Discussion

juliocesar_nec's avatar
juliocesar_nec
New Contributor
8 years ago
Solved

Conversion of values

Hello people!

Sorry for the weak English, because I'm using google translator.

Well, I have an issue that is hard to solve.

In my tests, I have a variable that needs to be in the xxxx, xx format. But I can not do it, it is formatted like this:

 

vVlrTotal: = (StrToCurr (vVlricial) + (vVlrUtiliz));

 

When I perform this procedure, the variables are given the value:

vVrinmental = 6032,25

vVlrUtiliz = 100,00

However the value of vVlrTotal is unconfigured, thus:

R $ 6.132,25

 

How can I address this issue? Someone help me? I need it to stay:

6132.25

  • Yes that is a known issue in automation for Excel

    Opening a 2013 file in 2016, even you if don't change anything, will cause Excel to bring up a box stating that the you have to accept that the file will be saved in the new 2016 format.

     

    My recommendation is to save the files as 2016 files once before you start the COM automation with Excel from inside of TestComplete

    Cheers

    -Lino

1 Reply

  • Hi,

     

    Does it work if you omit conversion to currency and change

    StrToCurr (vVlricial) + (vVlrUtiliz)

    to just

    vVlricial + vVlrUtiliz

    ?

     

    Obtained result can be additionally formatted using aqString.Format() if needed.