aasaru / intermediate-drools-training

Training materials for my Udemy course "Master Drools - from Intermediate to Expert"
Other
1 stars 6 forks source link

When trying to run SpreadsheetToDrl causes Failed to open Excel stream, please check that the content is xls97 format error. #1

Open varunchopraWB opened 1 year ago

varunchopraWB commented 1 year ago

When trying to run SpreadsheetToDrl with one of the excel sheets, I get a Failed to open Excel stream, please check that the content is xls97 format error.

Is there a current work around for this?

Thank you!

varunchopraWB commented 1 year ago

For more info, placing the error log here:

Exception in thread "main" org.drools.template.parser.DecisionTableParseException: [..../intermediate-drools-training/target/classes/io/github/aasaru/drools/intermediate/section03/step2/step2.xls] Failed to open Excel stream, please check that the content is xls97 format.
    at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource(DecisionTableProviderImpl.java:49)
    at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource(DecisionTableFactory.java:35)
    at io.github.aasaru.drools.intermediate.section03.SpreadsheetToDrl.main(SpreadsheetToDrl.java:39)
Caused by: org.drools.template.parser.DecisionTableParseException: Failed to open Excel stream, please check that the content is xls97 format.
    at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:114)
    at org.drools.decisiontable.SpreadsheetCompiler.parseResource(SpreadsheetCompiler.java:133)
    at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:120)
    at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:93)
    at org.drools.decisiontable.DecisionTableProviderImpl.compileResource(DecisionTableProviderImpl.java:82)
    at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource(DecisionTableProviderImpl.java:45)
    ... 2 more
Caused by: java.io.FileNotFoundException: ..../intermediate-drools-training/target/classes/io/github/aasaru/drools/intermediate/section03/step2/step2.xls
    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:317)
    at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:112)
    ... 7 more