How can I check if a workbook is empty?
Yah that’s possible
—Use a excel application scope and pass the file path as input
—now use a read range activity with add headers property disabled and get the output with a variable of type datatable named dt
—now use a simple IF condition like this
If it true it will go to then part which means there is record
Or it will go to else part which mime and the workbook is empty
Hope this would help you
@Palaniyappan, can i do that with “add headers” flagged?
Because what if like we have one row in excel alone and if the add headers is enabled that one row will be considered as headers and we won’t know whether the excel is empty or not
If that is not enabled then we would know that and ensure that workbook is empty is for sure
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.