title: Importing a package with an interface and a class
body: <p>I am trying to create a Java package to interface with Excel, so I am using the org.apache.poi libraries. I've found the documentation on the <a href="http://poi.apache.org/spreadsheet/quick-guide.html#ReadWriteWorkbook" rel="nofollow noreferrer">POI site</a> that shows the following:</p>
  
  <p><strong>Reading and Rewriting Workbooks</strong></p>
  
  <pre><code>(truncated)
  Workbook wb = WorkbookFactory.create(inp);
  Sheet sheet = wb.getSheetAt(0);
  </code></pre>
  
  <p>When I attempt to create a Workbook object, I get errors that it doesn't know the type. The documentation above doesn't show the import statements, but if I'm reading <a href="https://poi.apache.org/apidocs/index.html" rel="nofollow noreferrer">these POI docs</a> correctly, I should be able to import <code>org.apache.poi.ss.usermodel.Workbook</code>, (and it's distinctly possible that I'm wrong because I'm very new to Java) but trying all of the following import statements all result in errors for the Workbook type. </p>
  
  <pre><code>import org.apache.poi.*;
  import org.apache.poi.ss.*;
  import org.apache.poi.ss.usermodel.*;
  </code></pre>
  
  <p>I should note that I'm using Eclipse Neon for this, and the editor is not complaining that it can't find the packages, so I'm not sure where the issue lies.</p>
  
  <pre><code>Workbook wb = WorkbookFactory.create(inp);
  </code></pre>
  
  <p>The actual error I'm getting in the editor is that <code>"Workbook cannot be resolved to a type"</code>, and the same error for WorkbookFactory.</p>
  
  <p>So the TL;DR is that the POI docs show that Workbook is an Interface in <code>org.apache.poi.ss.usermodel</code> and that WorkbookFactory is a class in the same usermodel package, but I can't figure out how to import/use them correctly.</p>
  
  <p>EDIT: 
  The build time error I receive is </p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
      Workbook cannot be resolved to a type
      WorkbookFactory cannot be resolved
      at spreadsheet.conversion.ConvertXLSXtoCSV.main(ConvertXLSXtoCSV.java:31)
  </code></pre>
  
  <p>The message I posted before was the editor popup... I was able to take a screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/shy0C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/shy0C.png" alt="enter image description here"></a></p>
  
  <p>EDIT: Posting the full code, because, why not. (The multiple import statements
  were just trying things out, mostly in desperation.)</p>
  
  <pre><code>package spreadsheet.conversion; 
  import java.text.ParseException;
  import org.apache.poi.*;
  import org.apache.poi.ss.*;
  import org.apache.poi.ss.usermodel.*;
  import java.io.FileInputStream;
  import java.io.InputStream;
  public class ConvertXLSXtoCSV {
  
      private static String inputfilename = "";
      private static String outputfilename = "";
      private static int debug = 0;
  
  
      private static void test(String arg) {
          System.out.println(arg);
      }
  
  
      public static void main(String[] args) throws ParseException, Exception {
          if (args.length != 1) {
              throw new Exception("Requires 1 parameter. Usage: ConvertXLSXtoCSV &lt;filename&gt;");
          }
          inputfilename = args[0];
  
          if(debug==1) {
              test(inputfilename);
          }
          InputStream inp = new FileInputStream(inputfilename);
  
          Workbook wb = WorkbookFactory.create(inp);
  
  
      }
  </code></pre>
  
  <p>Any help is appreciated.</p>