Excel - Check if a cell is empty

Hello everyone,

Learning Plan: RPA Citizen Developer
Course: Decisions, Iterations and Scenarios in UIPath Studio X
Class: Decisions
Tool: UIPath Studio 2021.12.0-beta.7179 Community License Per-User Installation

Goal: I want to make a comparison - if the excel Transaction # cell is empty, the fields get the text of DoubleUI app , else it writes on the comments excel cell.
Problem: I’m not being able to use the “isEmpty” functionality on the IF decision;
Description: I’m not being able to use the same expression of the video of the course. When I’m doing the comparisons, I always get an error.
Usually, is this one “isEmpty is not a member of UiPath.Excel.ExcelValue”.
I’ve tried:

  • CurrentRow.ByField(“Transaction #”).isEmpty()
  • CurrentRow.ByField(“Transaction #”).isNull()
  • CurrentRow.ByField(“Transaction #”).isNullOrEmpty()
  • CurrentRow.ByField(“Transaction #”).isNull() == true;
  • CurrentRow.ByField(“Transaction #”).isNull() == 0;
  • CurrentRow.ByField(“Transaction #”).isNullOrEmpty() == true;
  • CurrentRow.ByField(“Transaction #”).isNullOrEmpty() == 0;
  • CurrentRow.ByField(“Transaction #”) is empty → This one gets another error: " System.Empty is not accessible in this context because it is Friend"

File: Easyupload.io - Upload files for free and transfer big files easily. → I have to use an external source because I’m a new member and I can’t upload files here.
File Password: “MeuCu”

I’ve been checking the following topics, but nothing is working on my side:

  • /t/what-is-the-function-for-is-null-or-not-null/77643
  • /t/how-do-i-know-if-a-cell-is-empty/6330/11
  • /t/if-excel-is-empty-robot-doesnt-read-cell/265605
  • /t/if-string-variable-is-blank-then-do-something-else-via-if-activity/123668/2

I really appreciate your time! Thanks in advance!

Hi @efergrgrgrgr ,

Thanks for very detailed question. just now i downloaded your project file and i could see that it is a studio project not Studiox. But based on your message you are saying like you are learning citizen developer.

First of all could you check whether you are using correct platform to learn your course. i think you need to switch from studio to Studiox profile for this citizen developer learning. once you create process by using the academy video you will not get any errors and confusion i guess. thanks.

if you still want to go with studio. Could you try like below and see it helps your requirement.

CurrentRow(“Transaction #”).ToString=“”

Hello Kirankumar,
you’re right! I didn’t notice that since I faced this small barrier!..lol!
I will put your suggestion into practice, for sure!
Thanks a lot!

Btw guys!
It’s solved!..
After some more tries and failures, I got the right way:

string.IsNullOrEmpty(CurrentRow.ByField(“Transaction #”)) = true

You can check it if you’re having the same problem, but this only will be available until the end of January:

I was missing the “string.IsNullOrEmpty(AndPutHereTheExcelRows)”.

Thanks once again!

Glad to hear that you are able to resolve it. All the best for your learning.

1 Like

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