monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
953 stars 344 forks source link

Workbook undefined symbol #89

Closed mahmoodn closed 7 years ago

mahmoodn commented 7 years ago

I wrote a simple test program exactly following the readme. However, the error is that Workbook is undefined.

import com.monitorjbl.xlsx.StreamingReader;
import java.io.*;
public class ExcelTest2 {
  public static void main(String[] args) {
    InputStream is = new FileInputStream(new File("example2.xlsx"));
    Workbook workbook = StreamingReader.builder()
        .rowCacheSize(100)    // number of rows to keep in memory (defaults to 10)
        .bufferSize(4096)     // buffer size to use when reading InputStream to file (defaults to 1024)
        .open(is);
  }

}

I have included the jar file in the project (netbeans project). I don't use maven.

monitorjbl commented 7 years ago

You have to import the POI classes. I don't use Netbeans, but Intellij and Maven will hint that you need to import a class.