public class ExcelFileReader
extends java.lang.Object
| Constructor and Description |
|---|
ExcelFileReader(org.apache.poi.ss.usermodel.Workbook workbook,
boolean ignoreComments) |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.poi.ss.usermodel.Workbook |
getExcelWorkbook(java.io.File file) |
static boolean |
isExcelFile(java.io.File file)
Uses file extension to figure out if given file is supported Excel file.
|
static void |
main(java.lang.String[] args) |
java.util.List<java.lang.String[]> |
readLines() |
java.util.List<java.lang.String[]> |
readLines(int sheetIndex) |
java.util.List<java.lang.String[]> |
readLines(java.lang.String sheetName) |
public ExcelFileReader(org.apache.poi.ss.usermodel.Workbook workbook,
boolean ignoreComments)
public java.util.List<java.lang.String[]> readLines()
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<java.lang.String[]> readLines(int sheetIndex)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<java.lang.String[]> readLines(java.lang.String sheetName)
throws java.io.IOException
java.io.IOExceptionpublic static boolean isExcelFile(java.io.File file)
true if the file is an XSL or XLSX Excel filepublic static org.apache.poi.ss.usermodel.Workbook getExcelWorkbook(java.io.File file)
throws java.io.IOException,
java.lang.IllegalArgumentException
Workbook of an Excel filejava.io.IOException - if an I/O problem occursjava.lang.IllegalArgumentException - if the file is a format that is not supportedpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception