Reading blank excel with header

Hi @amit_anand15 / Team,

I am using Excel Loop activity to fetch data in excel file. But if empty excel with only headers is passed, it gives error “ Cannot implicitly convert type ‘string’ to ‘object[,]’”.

Could you please assist if there is way to check initially if the excel is blank or not ?
Is there any way I can get count of data even before going inside loop ?

Thanks In advance.

Hi,

Either you can use try catch activity to catch this exception
or
use Import Data Table Activity first to import data in Datatable. Use Count Row column interaction to get number of row in the data table. If the excel is blank row count will be 0

Regards,
Amit