poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Ratib <kra...@open-craft.com>
Subject Google Spreadsheets-exported XLS file generates org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance
Date Tue, 07 Apr 2009 18:34:02 GMT
Using POI-3.5-beta5, I encounter the following exception when trying
to open an XLS file exported by Google Spreadsheets:

org.apache.poi.hssf.record.RecordFormatException: Unable to construct
record instance

It's worth noting that OOo (2.4) and Microsoft Excel (2003) both open
the file, but some information is lost. I guess I just wish POI would
not bail out so soon.

You can try with the following code on this sheet for example:
https://spreadsheets.google.com/ccc?key=ph2LMSwBYdBh9UPblr0CvPw&hl=en
=================================
import org.apache.poi.ss.usermodel.*;
import java.io.*;

public class TestPOI {
	public static void main(String[] args) {
		try {
			InputStream inp = new FileInputStream(args[0]);
			Workbook wb = WorkbookFactory.create(inp);
		}
		catch (Exception e) {
			System.err.println(e.toString());
		}
	}
}
=================================

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message