Ranorex opening excel .csv and changing date format from UK format to US format

Ask general questions here.
_test_king
Posts: 1
Joined: Fri Aug 03, 2018 9:40 am

Ranorex opening excel .csv and changing date format from UK format to US format

Post by _test_king » Fri Aug 03, 2018 10:00 am

I have an excel .csv file in UK date/time format, but when Ranorex opens the .csv file it is switching the UK format (DD/MM/YYYY) to US format (MM/DD/YYYY). Why would Ranorex be doing this and how can I prevent it from doing it? My data/time formatting in Excel is definitely set as UK format.

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

Re: Ranorex opening excel .csv and changing date format from UK format to US format

Post by Support Team » Mon Aug 06, 2018 3:07 pm

Hi all,

The customer contacted us directly.
The problem was the default value of the property "NumberFormat". Simply set this property like in the following example.

Code: Select all

range.EntireColumn.NumberFormat = "DD/MM/YYYY";
I hope that helps.

Sincerely,
Matthias
Support Team
.
Image