pjfanning commented on code in PR #477:
URL: https://github.com/apache/poi/pull/477#discussion_r1237313858
##########
poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java:
##########
@@ -297,11 +298,15 @@ public static String
getWorkbookDirEntryName(DirectoryNode directory) {
"It must be decrypted before use by XSSF, it cannot be
used by HSSF");
}
- // check for previous version of file format
- if (directory.hasEntry(OLD_WORKBOOK_DIR_ENTRY_NAME)) {
+ // check case-sensitive for previous version of file format
+ if (directory.getEntryNames().contains(OLD_WORKBOOK_DIR_ENTRY_NAME)) {
throw new OldExcelFormatException("The supplied spreadsheet seems
to be Excel 5.0/7.0 (BIFF5) format. "
+ "POI only supports BIFF8 format (from Excel versions
97/2000/XP/2003)");
}
+ //check for non-case-senstive book (e.g. crystal) after ruling out
case-sensitive OldExcelFormatException
Review Comment:
minor type - should be `sensitive`
##########
poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java:
##########
@@ -297,11 +298,15 @@ public static String
getWorkbookDirEntryName(DirectoryNode directory) {
"It must be decrypted before use by XSSF, it cannot be
used by HSSF");
}
- // check for previous version of file format
- if (directory.hasEntry(OLD_WORKBOOK_DIR_ENTRY_NAME)) {
+ // check case-sensitive for previous version of file format
+ if (directory.getEntryNames().contains(OLD_WORKBOOK_DIR_ENTRY_NAME)) {
throw new OldExcelFormatException("The supplied spreadsheet seems
to be Excel 5.0/7.0 (BIFF5) format. "
+ "POI only supports BIFF8 format (from Excel versions
97/2000/XP/2003)");
}
+ //check for non-case-senstive book (e.g. crystal) after ruling out
case-sensitive OldExcelFormatException
Review Comment:
minor typo - should be `sensitive`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]