How to set max three decimals

Hi

here in some cells the decimal values are exceeding more than 3 but i want to limit it till 3

Please help me
Thanks in advance

@jai_kumar2
Here you go…

image

Invoke Code for round 2

dt.AsEnumerable().ToList().ForEach(Sub(row) row(2)= Math.round(cdbl(row(2)),2))

when not doing a direct formating on the excel cells have a look at the following main building blocks:
grafik

@jai_kumar2
If you Read data from excel and needs 2decimals then try this

  1. Use If condition, Currentrow(“Column”).tostring.contains(“.”)
  2. Then sequence use regex
System.Text.RegularExpression.Regex.Match(Currentrow("Column").tostring,"\d+\.\d{2}").tostring.trim

image

But iam facing this error

@jai_kumar2 are you passing datatable correctlty

CDbl(r(ColName)).Tostring(“N3”)

in which i can use this

Yes i pass datatable through Arguments

@jai_kumar2 can you give me excel file