Ranorex is stripping off $ and add trailing 0s upon import

Best practices, code snippets for common functionality, examples, and guidelines.
centeneUser2.0
Posts: 1
Joined: Tue Oct 23, 2018 5:34 pm

Ranorex is stripping off $ and add trailing 0s upon import

Post by centeneUser2.0 » Tue Oct 23, 2018 5:43 pm

Hi, I'm new to Ranorex. I'm trying to do a simple validation against a datasource where $5,900 and $0.00 appear on the UI; however, upon loading it into Ranorex, the Ranorex datasource is now displaying 5,900 and 0.0000 respectively.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex is stripping off $ and add trailing 0s upon import

Post by Support Team » Tue Oct 23, 2018 9:48 pm

Hi CenteneUser2.0,

Based on the described issue, I suspect you are using Excel as your data source. Excel often automatically formats your data so it is easier to read, however, the actual value is different. In Excel, set the cell's format to "Text" or "General" to see the actual value.

I hope this helps!

Cheers,
Ned
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex is stripping off $ and add trailing 0s upon import

Post by krstcs » Wed Oct 24, 2018 3:24 pm

I would highly recommend that you stop using Excel. Use CSV text files instead. They do not have this issue, and as long as you enclose the string in quotes like ("$45,000") (otherwise the comma would be a problem) you will be fine.
Shortcuts usually aren't...