How to make bot add leading 0 in data table

I have a bot that is scraping and uploading item numbers into a data table however the item numbers begin with a 0. I can’t edit the excel format in excel because the prod environment doesn’t have excel installed so I need the 0 to be added through uipath. Any advice and tips are welcomed


Just use an Assign activity with a call to String.PadLeft.


I’ve done that and it doesn’t work unfortunately. I got this from another thread and the problem is the numbers vary in length Stringvariable.padleft(12,CChar(“0”))

1 Like

Hi @mdickinson,

I tried to add a 0 before any varying value. Mostly all the Column value will be of string type while data scraping is made. So it was easy adding 0 in the beginning for varying value length. Kindly refer this xaml for reference and provide your suggestions.


Main.xaml (11.6 KB)