(Excel) Getting blank excel cell(date entries)

hello everyone,
i’m getting issue getting a blank value in a particular row of date.
i have tried the code below.
the sample.xls file has just random dates with a few blank
any idea how can i get specific rows with blank date.

code:
Excel.LaunchAndOpen Path: “C:\Users\omkar\Desktop\sample.xls” Visible:True Password:’’ ReadOnly:False LoadAddInsAndMacros:False Instance=> ExcelInstance
Excel.Advanced.GetFirstFreeRowOnColumn Instance: ExcelInstance Column: “A” FirstFreeRowOnColumn=> FirstFreeRowOnColumn
loop i from 2 to FirstFreeRowOnColumn-1

excel.ReadCell Instance: ExcelInstance StartColumn: “A” StartRow: i ReadAsText:False Value=> Value
if Value =""then
Console.Write Message: “blank”
else
text.ToDateTime Text: Value DateTime=> TextAsDateTime
Console.Write Message: TextAsDateTime
end
end

error:

L6:3 Incompatible types ‘DateTimeVariant’ and ‘Text Value’
L9:0 Provided text value cannot be converted into a valid DateTime

I copied your code and there were a few typos, with the quotes you’ve used I guess.
Try the following code instead:

Folder.GetSpecialFolder SpecialFolder:Folder.SpecialFolder.DesktopDirectory SpecialFolderPath=> Desktop
Excel.LaunchAndOpen Path: Desktop+'\sample' Visible:True Password:'' ReadOnly:False LoadAddInsAndMacros:False Instance=> ExcelInstance
Excel.Advanced.GetFirstFreeRowOnColumn Instance: ExcelInstance Column:1 FirstFreeRowOnColumn=> FirstFreeRowOnColumn
loop i from 2 to FirstFreeRowOnColumn-1
    excel.ReadCell Instance: ExcelInstance StartColumn:1 StartRow:i ReadAsText:False Value=> Value
    if Value = "" then
        Console.Write Message: 'blank'
    else
        text.ToDateTime Text: Value DateTime=> TextAsDateTime
        Console.Write Message: TextAsDateTime
    end
end

@ kzaverdinos
this code isn’t helping. getting the same error.

@omkarchavan what’s the text that you provide to the .ToDateTime action ?