cancel
Showing results for 
Search instead for 
Did you mean: 

Using DDT and checking if cell is blank

Highlighted
Not applicable

Using DDT and checking if cell is blank

I want to be able to detect if some of the cells in my spreadsheet are blank. At the moment I get an error if it can't detect any data in the cell.



I've tried:



if DDT.CurrentDriver.Value("Date") = Null



btu this doesn't seem to pick it up correctly.



Any ideas?



Cheers.
2 REPLIES 2
Highlighted
Contributor

RE: Using DDT and checking if cell is blank

Hello Simon



Try using DDT.CurrentDriver.Value("Date") = ""




Null is Used to indicate that a variable contains no valid data. One way to think of Null is that someone has explicitly set the value to "invalid", unlike Empty where the value is "not set".This is not the same as Empty or Nothing!!


Example: x=Null 'x contains no valid data



Reference: http://www.w3schools.com/vbScript/vbscript_ref_keywords.asp


Thank you


Syed



Syed Ahmed Safvan

Highlighted
Staff

RE: Using DDT and checking if cell is blank

Hi Simon,



Try using the GetVarType method (see the "aqObject.GetVarType" help topic). Check whether it returns varEmpty.



------
Yuri
TestComplete Customer Care Engineer

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors