If I try to open a corrupt file, it goes into infinite loop, and then OutOfMemoryException. The only way is to kill the process.
```
FileStream stream = File.Open("c:\\temp\\corrupt.xls", FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
```
2nd line will go into infinite loop.
corrupt.xls is attached.
Appreciated any help. Please let me know if need more information. Thanks.
Comments: ** Comment from web user: Eyedia **
```
FileStream stream = File.Open("c:\\temp\\corrupt.xls", FileMode.Open, FileAccess.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
```
2nd line will go into infinite loop.
corrupt.xls is attached.
Appreciated any help. Please let me know if need more information. Thanks.
Comments: ** Comment from web user: Eyedia **
Just for the record, if anyone bumps into, the attached class was used to instantiate the reader with timeout...
```
ExcelDataReaderInstantiator excelDataReaderInstantiator = new ExcelDataReaderInstantiator(fileName);
if (excelDataReaderInstantiator.ExcelReader != null)
{
//do your stuff
}
```