i am using using OfficeOpenXml; for reading excel file and its working fine with other reading file but for one perticular file i got above mention error.
public ReadExcelFile(Stream stream, string worksheet, List<ExcelColumnMapping> columnMapping, ITypeConvert typeConvert = null, int headerSize = 1)
{
_stream = stream;
_excelPackage = new ExcelPackage(stream);
_worksheet = _excelPackage.Workbook.Worksheets[worksheet];
_headerSize = headerSize;
_rowCount = headerSize + 1;
var mapping = ColumnMappingRowNumber(columnMapping);
_resultColumnNumbersAndTypes = mapping.Select(x => Tuple.Create(x.Item2, x.Item3, x.Item4)).ToList();
_converter = typeConvert ?? new ExcelTypeConvert();
ReadLineValues();
}
User contributions licensed under CC BY-SA 3.0