diff --git a/main/src/com/google/refine/importers/ExcelImporter.java b/main/src/com/google/refine/importers/ExcelImporter.java index 6380436cb..7ef471a48 100644 --- a/main/src/com/google/refine/importers/ExcelImporter.java +++ b/main/src/com/google/refine/importers/ExcelImporter.java @@ -115,6 +115,8 @@ public class ExcelImporter extends TabularImportingParserBase { } } catch (IOException e) { logger.error("Error generating parser UI initialization data for Excel file", e); + } catch (IllegalArgumentException e) { + logger.error("Error generating parser UI initialization data for Excel file (only Excel 97 & later supported)", e); } return options; @@ -153,6 +155,13 @@ public class ExcelImporter extends TabularImportingParserBase { e )); return; + } catch (IllegalArgumentException e) { + exceptions.add(new ImportException( + "Attempted to parse as an Excel file but failed. " + + "Only Excel 97 and later formats are supported.", + e + )); + return; } int[] sheets = JSONUtilities.getIntArray(options, "sheets"); diff --git a/main/tests/server/src/com/google/refine/tests/importers/excel95.xls b/main/tests/server/src/com/google/refine/tests/importers/excel95.xls new file mode 100644 index 000000000..4f1089357 Binary files /dev/null and b/main/tests/server/src/com/google/refine/tests/importers/excel95.xls differ