Skip to content

Instantly share code, notes, and snippets.

@zaki50
Created November 24, 2010 09:25
Show Gist options
  • Save zaki50/713386 to your computer and use it in GitHub Desktop.
Save zaki50/713386 to your computer and use it in GitHub Desktop.
JExcel API のサンプル
public class JExcelSample {
public void sample(File inputFile) {
final Workbook masterBook = Workbook.getWorkbook(inputFile);
try {
for (Sheet sheet : masterBook.getSheets()) {
if (sheet == null) {
assert false : "null は無いはず。";
continue;
}
// お好きなように
for (int i = 0; i < sheet.getRows(); i++) {
Cell[] columns = sheet.getRow(i);
}
}
} finally {
masterBook.close();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment