It Should Only remove prefix Zeros only
Hi @Gopikrishna_S ,
Could you try this and see if it works out for you?
dt.AsEnumerable.Select(Function(s) dt.Clone.LoadDataRow({System.Text.RegularExpressions.Regex.Replace(s(0).ToString,"^0+","")},False)).CopyToDataTable()
RemovePrefixedZeros.xaml (6.2 KB)
Kind Regards,
Ashwin A.K
Actually this Numbers are in the Fourth Column of the excel, is it work fine for that
Hi @Gopikrishna_S ,
That can be adjusted accordingly, if you can share a sample spreadsheet, I can help you out.
Since I am not aware of the schema, it will be difficult for me to provide you with an accurate resolution.
Could you please do the needful?
Kind Regards,
Ashwin A.K
Could you please privde this expression for single variable I am printing this Column Values inside the for each loop If I assign it for a particular Column so that it Wont dange the whole data table… I am taking This Row as Number=CurrentRow(2).ToString using assign activity if give any expression for Number variable means I will Implement It.
Try this Regex expression
While looping through the column use this expression to get the values without ‘0’
System.Text.RegularExpressions.Regex.Replace(CurrentRow(“ColumnName”).ToString,“^0+”,“”).tostring
Regards
Gokul
we can avoid the regex when using trimstart method
yourStringVar.TrimStart({"0"c})
Hi @Gopikrishna_S ,
Is this what you meant?
System.Text.RegularExpressions.Regex.Replace(CurrentRow(3).ToString,"^0+","")
RemovePrefixedZeros_v1.xaml (8.8 KB)
Kind Regards,
Ashwin A.K