Uipath Invoke Code 判断某单元格为空

Dim xlPackage As ExcelPackage = New ExcelPackage(New IO.FileInfo("C:\Users\jtang20\Desktop\test.xlsx"))Dim sheet As ExcelWorksheet = xlPackage.Workbook.Worksheets("Sheet1")

If sheet.cells("H9").value Is Nothing Then

    console.WriteLine("False 1")

Else

    console.WriteLine("True")

End If

xlPackage.Dispose()

 

开始是想写 If sheet.cells("H9").value.tostring = "" , 但是会报错,所以要写  If sheet.cells("H9").value Is Nothing

 

Uipath Invoke Code 判断某单元格为空_第1张图片

 

你可能感兴趣的:(Uipath,&,Vb.Net)