Convert text to number and keep the leading zero

I want to convert text to number and keep the leading zero as below.
ip.xlsx (9.2 KB)

image

Any Idea please.

You can’t keep leading zeroes in an integer variable. Probably the best solution here is to keep that value in two separate variables - one string, one int. Then use them each in the appropriate places.

@postwick I want remove flag green (ignore error).

image

Any guide please.

It’s probably telling you that you have numbers stored as text. That means the cells are formatted as text, not numbers. That’s why there are leading 0s. If you format the cells as numbers, you’ll lose the leading 0s. Integers don’t keep leading 0s.

@fairymemay - I think there is an error message popup into excel spread sheet. Since, you need to convert “text to Number”. you can use this syntax inside uipath “(Convert.toint64(Variable)).tostring”. then your output value is "66272129606880 "

Happy Learning :slightly_smiling_face:

@saijagadesh06 @postwick Now I understand concept from you.
But I want to solve error in excel. (If I work manual —> I solve by click yellow icon and choose ignore error)
File Excel : ip.xlsx (9.2 KB)

How to ignore error for all column by use UiPath.

Guide me please.

image

Is the error causing you some problem? Why do you need to click Ignore Error?

Anyway, you can just turn off that error in Excel settings.