Fix Excel Write Range Removing Leading zero

Hi Devs, when I write to excel range, I noticed that the leading zero’s from my data were no longer there, please how do I fix.Example 00893243 was written as 893243

HI @RPA-botDev

Have you tried enabling the preserve format in the excel application scope (If you used excel activities)

Regards
Sudharsan

Can’t find the preserve format in excel application scope, can you share with screenshot please

Aww I’m so sorry it will be in read range

Regards
Sudharsan


Here is the screnshot

1 Like

So it happens when I am writing to excel, I am reading from database not read range in excel.How do I solve it in this case

Have you tried with workbook write range?

If yes that is also having same error?

Regards
Sudharsan

Hi!

Have a view on this thread

Regards,
NaNi

Hi @RPA-botDev,

In excel, for int values, if the value is 0089201, it will ignore the preceding values and enter as 89201 only. So, try to write the value as a string into excel.
Perform this activity, which turns integer into a string.

If you’re allowed to use 3rd Party packages, then you can try Balareva.EasyDatatable.Activities that will be available in the marketplace.

And the activity which you need to use is Change Column Datatype and set the data type as String and provide the input details.
You will get the output of this activity which needs to be written in Write Range.

image

I hope you will find this useful and solves your problem.

Regards,
@90s_Developer

1 Like

You need to select the cells in which you enter data and select the format of the cells “text”, then the zeros will not disappear.

Hi team

I have one column there text and number so how t
Do

Ex: culmn

1 pmzzt11
2 0076534
How to remove the leading zeros