[jboss-jira] [JBoss JIRA] (DROOLS-684) Drools Work bench not allowing in .XLSX to upload
Geoffrey De Smet (JIRA)
issues at jboss.org
Mon Aug 10 03:55:03 EDT 2015
[ https://issues.jboss.org/browse/DROOLS-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13096792#comment-13096792 ]
Geoffrey De Smet commented on DROOLS-684:
-----------------------------------------
This is fairly easy to solve. Just add this dependency in drools-decisiontables
{code}
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
{code}
And then make sure all code uses Sheet and Workbook instead the xls specific subclasses HSSFSheet and HSSFWorkbook (if it doesn't do so already).
And then do something like this:
{code}
Workbook workbook;
if (endsWithXls) {
workbook = new HSSFWorkbook(in);
} else if (endsWithXlsx) {
workbook = new XSSFWorkbook(in);
} else {
throw new IllegalArgumentException("Not valid extension (" + extension + ") for decision table import.");
}
{code}
> Drools Work bench not allowing in .XLSX to upload
> -------------------------------------------------
>
> Key: DROOLS-684
> URL: https://issues.jboss.org/browse/DROOLS-684
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.2.0.CR4
> Environment: Google Chrome Browser / JDK1.7 / Jboss7.1 / WB-6.2.0-CR4
> Reporter: Ramesh C
> Assignee: Michael Anstis
> Attachments: Sample.xlsx
>
>
> while creating a decision table in workbench, if we try to upload .XLSX,
> java script validation is failing. Alert is showing as "Upload only .xls" files.
> kindly correct the java script validation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list