How to find whether string contains any number in it or not


I want to find whether string contain number or not.

eg…“Batch2” just check whether this contains any number in it or not


You can use this


This would give true if the given string contains number else false



FYI, another approach


yourString.Any(Function(c) Char.IsDigit(c))


1 Like

@Yoichi and @Anil_G

also could you please let me know how to find last column of excel…
eg. A,B,C,D are the column and D will be the last column in the sheet which is having data in it.

How to identify that?


If you read the data into datatable using read range and give the first cell value only…it will read data till end…Now do dt.Columns.Count which will give you how many column are there and

uipath.excel.helpers.excelutilities.convertcolumnindextocolumnLetter(dt.Columns.Count) Will give you the excel column name


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