Read Csv with Leading Zero

How to read CSV with 000123 resut it shows 123 i want data to be seen 00123 using uipath .

Hi @Mohini_Sarode

May i know what actually you are trying to do with some eg ??

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

i wants to read csv with 00123 before number 2 zero … but it does not show zero directly shows 123 but in notepad it shows 00123 i want in csv 00123.

this how it looks but i want like this …

@Mohini_Sarode
the 0 are removed due the value is readin and recognized as a Number / Integer
You can run into a conversion flow have a look here for left padding the zeros again:

Hi @Mohini_Sarode

have you check the format for that cell within excel what is it ??

try making the column as custom format
may this helps you.

Hope this helps you.
Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

its working @Pratik_Wavhal but i want to do using uipath …

@ppr
please help how to use here

@Mohini_Sarode

Use PadLeft to add the 00

In your case - row(1).tostring.PadLeft(LengthoftotalNumber, CChar("0"))

Mark as solution if this helps

Thanks

2 Likes

Hi @Mohini_Sarode

Der is one activity called as Change Cell Type by @balupad14
Try using that if it gives you the output

image

Hope this helps you.
Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

@ksrinu070184
i m getting correct output but not seen in csv file …as shown above …

@Mohini_Sarode

To preserve 00 in CSV file also, you can prefix singlequote (’) before the value

Hope this helps

Thanks

@ksrinu070184
client dont want sensitive variable it should be clear 00123 or any other value starting with 00 i have tried all …

@ksrinu070184 even it doesn’t work in case of CSV

getZeroValData_csv.zip (16.7 KB)
Hi,
Please find the attached workflow. I have taken 000123, 00234 as strings in input file.

Please try this, if you get any issues share the sample csv input file

I m getting Output but i am not able to see in CSV file …look up image …@Venugopal24

@Mohini_Sarode
Have a look on attached conversion flow:
Number_To_String_AllCols_leadingZeros.xaml (11.0 KB)

dtData Represents the input data (after adoptions your csv data)
if the column is of int32 or double the conversion is registered
it runs the conversion leftpadding 0, length 5
dtConverted can be used e.g. write CSV

Let us know your feedback

ensure the xaml is daved into your uiPath project properly. In case of issues ensure following:
grafik

@ppr Hi Its show ssame like this i want like notepad …input 123 output 00123

can you share your xaml