Exception: Initialisation of record 0x203 left 4 bytes remaining still to be read

Nov 1, 2012 at 8:42 AM

Hi, second line throws the expection:

FileStream fs = new FileStream(xls_file, FileMode.Open, FileAccess.Read);
HSSFWorkbook templateWorkbook = new HSSFWorkbook(fs, true);

When I re-save this file in excel it works fine. Any suggest? Tahnks

Coordinator
Nov 6, 2012 at 7:13 PM

The excel file may be broken for some reason. For example, it's generated by third-party component which has some unstandard format in record. Excel is good at error-handling so it doesn't throw an error.