Detecting corrupted excel file and generates error logs if the excel file is corrupted

How to detect corrupted excel file and generates error logs if the excel file is corrupted?

If we are anticipating such scenarios based on file extension we need to read the file. place the read activity in Try catch block and depending on catch exception continue with the next actions