Skip to content

Instantly share code, notes, and snippets.

@rschumm
Last active January 2, 2016 16:39
Show Gist options
  • Save rschumm/8331928 to your computer and use it in GitHub Desktop.
Save rschumm/8331928 to your computer and use it in GitHub Desktop.
Einfaches Auslesen eines Excel mit Apach POI
public static Katalog extractKatalog(Workbook excel) {
// System.out.println(excel.getNumberOfSheets());
Sheet sheet = excel.getSheetAt(0);
Katalog katalog = new Katalog("der erste Katalog");
for (Row zeile : sheet) {
Cell zelle = zeile.getCell(4);
String geVoString = zelle.getStringCellValue();
...
}
return katalog;
}
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment