Skip to content

Commit fce1df9

Browse files
iroquetaBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:fix/excel_temp_files_support' into beta
1 parent aa5bcea commit fce1df9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

gxoffice/src/main/java/com/genexus/gxoffice/ExcelDoc.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,18 @@ public IExcelDocument getDocument() {
5656
public void checkExcelDocument() {
5757
if (document == null) {
5858
try {
59-
if (excelFileName.endsWith(".xlsx") || excelFileName.endsWith(".xlsm")
60-
|| excelFileName.endsWith(".xlsb") || excelFileName.endsWith(".xlam")
61-
|| isXlsx(excelFileName)) {
59+
if (excelFileName.endsWith(".xls") || excelFileName.endsWith(".xlm")
60+
|| excelFileName.endsWith(".xlb") || excelFileName.endsWith(".xlm")) {
61+
Class.forName("org.apache.poi.hssf.usermodel.HSSFWorkbook");
62+
document = new com.genexus.gxoffice.poi.hssf.ExcelDocument();
63+
} else {
6264
if (bufferedStreaming) {
6365
Class.forName("org.apache.poi.xssf.streaming.SXSSFWorkbook");
6466
document = new com.genexus.gxoffice.poi.sxssf.ExcelDocument();
6567
} else {
6668
Class.forName("org.apache.poi.xssf.usermodel.XSSFWorkbook");
6769
document = new com.genexus.gxoffice.poi.xssf.ExcelDocument();
6870
}
69-
} else {
70-
Class.forName("org.apache.poi.hssf.usermodel.HSSFWorkbook");
71-
document = new com.genexus.gxoffice.poi.hssf.ExcelDocument();
7271
}
7372
} catch (Throwable e) {
7473
document = new com.genexus.gxoffice.ExcelDocument();

0 commit comments

Comments
 (0)