views:

133

answers:

1

I'm trying to use POI to read an Excel file. It will be a large file ( > 50k rows) so I'm using the eventusermodel rather than the simpler usermodel which reads the entire file into memory. My code looks like:

    File file = new File("C:\\bigfile.xls");
    InputStream input = new FileInputStream(file);
    EventRecordFactory factory = new EventRecordFactory(new ERFListener() {
        @Override
        public boolean processRecord(Record rec)
        {
            return true;
        }
    }, RecordFactory.getAllKnownRecordSIDs());
    factory.processRecords(input);

But I get the exception

org.apache.poi.hssf.record.RecordFormatException: The content of an excel record cannot exceed 8224 bytes

This exception was supposedly fixed in 3.5, however, I'm using 3.6 and I also tried the latest trunk pull from POI and still the same issue.

I've tried shrinking the file to just have a few rows but the same error. Has anyone dealt with this before?

thanks, Jeff

A: 

Do you have any large comments in the excel file. If so could you try after removing the comments.

Vinodh Ramasubramanian
I removed everything except two rows "a b c" and "d e f" but still getting the error.
Jeff Storey