as also mentioned, then we make use of the string length from the origin value
strOld = dtExcelValue.Rows(intRowCounter).Item("Settlement Account No.").ToString.Trim
strNew = Strings.Right(strOld ,4).PadLeft(strOld.Length,"X"c)
as also mentioned, then we make use of the string length from the origin value
strOld = dtExcelValue.Rows(intRowCounter).Item("Settlement Account No.").ToString.Trim
strNew = Strings.Right(strOld ,4).PadLeft(strOld.Length,"X"c)