How can I set global variable number format?

Hi,

I get global variables from an excel file for test cases. On the web page I test there are text fields which allow only numbers but doesn’t accept decimal format. Katalon write the numbers to decimal format during running, no matter what format I set in the excel.
For example, the number is:

  • in the excel: 1
  • Katalon modify for this: 1.0
  • on the web page I need this: 1

Try something like this:

Integer n = GlobalVariable.my_number as Integer
println n

Obviously, change my_number to your variable name.

hello,
also this will do it, but it's more lines :slight_smile:
String number = "1.0";
Double doubleNumber = Double.parseDouble(number);
println(doubleNumber);
def integer = doubleNumber.intValue();
println(integer);

Ok, I have found something. Maybe this mistake is not (just) in global variable. I had time now to check again everything.
In Excel file there is that format I want to use, I set the cells, and I use Excel functions too, where I need that. After I set this file in Katalon to Data Files, the format I set in Excel, disappear. So every number, date and time format changed in Katalon to decimal number, that is not ok on the web page where I want to use Katalon. Can I set anywhere the Katalon data file not to change the cell formats?