If: Conversion from string "" to type 'Integer' is not valid

whats wrong with this condition:

CInt(row(“Vendor Invoice"+vblf+"Paid Amount”)) < CInt(row(“Total”))

i am getting this error : If: Conversion from string “” to type ‘Integer’ is not valid.

hi @sybasha

(“Vendor Invoice"+vblf+"Paid Amount”) is the column name?

Also I added the code to my Uipath and didn’t see the issue


Hi @sybasha,

why you use vblf inside row(“Vendor Invoice"+vblf+"Paid Amount”)?


hi @sybasha,

I guess Here we are trying to get a Row value with the Column Name (Vendor Invoice"+vblf+"Paid Amount)

  1. Here - Take a StringVariable Say ColumnName and
  2. assign it “Vendor Invoice"+vblf+“Paid Amount” - vblf should be a string variable here
  3. -Take a write line and print the value for ColumnName - If Correct column Name is displayed -

If vblf is type Integer - Then it should be used as vblf.tostring

CInt(row(“ColumnName”)) < CInt(row(“Total”))



vblf is for next line. in the same cell the column name is present in two lines

the vendor invoice paid amount contains null value also, thats why its giving the error:: [if: Conversion from string “” to type ‘Integer’ is not valid]

Makes sense…
But the ("") Data needs to be the column name, so if you are trying to club in two columns try adding OR condition :slight_smile:

Hope this helps :smiley:

@sybasha You can check if the row value is Empty or having only Spaces using the below condition :
String.IsNullOrEmpty(row(“ColumnName”).ToString) or String.IsNullOrWhiteSpace(row(“ColumnName”).ToString)

1 Like

@sybasha No. Only Empty Null values and Whitespaces. 0 is Still a value :sweat_smile:

1 Like

hi @sybasha

May you show the ScreenShot of Column name and the value within it you are trying to perform some operation…

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer: