Remove leading zero


How to remove the leading zeros in particular column in datatable

Help with solution

You can use Macro for this

1 Like

Any other way using datatable process

When u read it using Read Range
Then directly write it in that sheet only it might write without leading zero
try it once if still not then i will give u another way
Or Loop it in for each and then Assign that column using Row(0)=Cint(Row(0).ToString)
Then write range


It dint work

Try this it worked at my end
Row(0) is for Column 1st
u can either use Column name like Row(“Name”)

1 Like

The problem is that you store integer as a string, so if variable contains value of one cell, you can use CInt(variable).

1 Like

Will this applicable if the value is in decimal

Then use Cdbl(Row(0).Tostring)
Instead of Cint(Row(0).Tostring)


Try this Cdbl(Row(0).Tostring.Trim)

What output u are getting
Can u share your file?

1 Like

Thank you it worked


Happy Automation!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.