Hello,<br><br>org.apache.poi.openxml4j.exceptions.InvalidFormatException is a checked exception from WorkbookFactory.create(inStream).<br><br>I don&#39;t see how we can remove it without removing use of the checked exception... which I guess would mean forking POI.<br>
<br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 23 March 2013 13:19, Cristiano Gavião <span dir="ltr">&lt;<a href="mailto:cvgaviao@gmail.com" target="_blank">cvgaviao@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    I&#39;m getting a problem with the org.apache.poi.openxml4j.exceptions
    package in my osgi things. I could not find a bundle that exports
    such package.<br>
    <br>
    Investigating a bit, the unique class that I could find using this
    api is org.drools.decisiontable.parser.xls.ExcelParser, but only
    org.apache.poi.openxml4j.exceptions.InvalidFormatException class.<br>
    <br>
    is this api really needed?<br>
    <br>
    <blockquote type="cite">    public void parseFile(InputStream
      inStream) {<br>
              try {<br>
                  Workbook workbook = WorkbookFactory.create(inStream);<br>
      <br>
                  if ( _useFirstSheet ) {<br>
                      Sheet sheet = workbook.getSheetAt( 0 );<br>
                      processSheet( sheet, _listeners.get(
      DEFAULT_RULESHEET_NAME ) );<br>
                  } else {<br>
                      for ( String sheetName : _listeners.keySet() ) {<br>
                          Sheet sheet = workbook.getSheet( sheetName );<br>
                          if (sheet == null) {<br>
                              throw new IllegalStateException(&quot;Could not
      find the sheetName (&quot; + sheetName<br>
                                                              + &quot;) in
      the workbook sheetNames.&quot;);<br>
                          }<br>
                          processSheet( sheet,<br>
                                        _listeners.get( sheetName ) );<br>
      <br>
                      }<br>
                  }<br>
              } catch ( <b>InvalidFormatException</b> e ) {<br>
                  throw new DecisionTableParseException( &quot;An error
      occurred opening the workbook. It is possible that the encoding of
      the document did not match the encoding of the reader.&quot;,<br>
                                                         e );<br>
      <br>
              } catch ( IOException e ) {<br>
                  throw new DecisionTableParseException( &quot;Failed to open
      Excel stream, &quot; + &quot;please check that the content is xls97
      format.&quot;,<br>
                                                         e );<br>
              }<br>
      <br>
          }</blockquote>
    <br>
    <br>
    all other behavior is being supported by
    org/apache/poi/poi/3.9/poi-3.9.jar<br>
    <br>
    <br>
    regards,<br>
    <br>
    Cristiano<br>
  </div>

<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br></blockquote></div><br>