public class ExcelParser<T> extends Object implements Parser<T>
| Constructor and Description |
|---|
ExcelParser(Class<T> clazz,
File file) |
ExcelParser(Class<T> clazz,
File file,
int afterLine) |
ExcelParser(Class<T> clazz,
File file,
int afterLine,
boolean lastSheet,
ImporterXLSXType importerXLSXType) |
ExcelParser(Class<T> clazz,
File file,
int afterLine,
boolean lastSheet,
ImporterXLSXType importerXLSXType,
Class<?> group) |
ExcelParser(Class<T> clazz,
InputStream inputStream,
ExcelType type) |
ExcelParser(Class<T> clazz,
InputStream inputStream,
ExcelType type,
Class<?> group) |
ExcelParser(Class<T> clazz,
InputStream inputStream,
ExcelType type,
int afterLine) |
ExcelParser(Class<T> clazz,
InputStream inputStream,
ExcelType type,
int afterLine,
boolean isLastSheet,
ImporterXLSXType importerXLSXType) |
ExcelParser(Class<T> clazz,
InputStream inputStream,
ExcelType type,
int afterLine,
boolean isLastSheet,
ImporterXLSXType importerXLSXType,
Class<?> group) |
ExcelParser(Class<T> clazz,
InputStream inputStream,
ExcelType type,
int afterLine,
Class<?> group) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getDateStringPattern() |
List<List<String>> |
getLines() |
int |
getNumberOfSheets()
Quantidade de sheets na planilha
Para csv sempre retorna 1, apenas para centralizar processamento pelo Importer idependente do arquivo
|
org.apache.poi.openxml4j.opc.OPCPackage |
getOPCPackage()
Deprecated.
|
int |
getSheetNumber() |
org.apache.poi.ss.usermodel.Workbook |
getWorkbook() |
List<List<String>> |
getXlsLines()
Deprecated.
|
List<List<String>> |
getXlsxLines()
Deprecated.
Use getLines() mais afterLine 0 nao deveria importar se e xls ou xlsx
|
List<T> |
parse()
Não lê a primeira linha
|
protected Table |
processXlsxSheet(org.apache.poi.xssf.model.StylesTable styles,
org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings,
InputStream sheetInputStream,
boolean ignoreFirstRow) |
protected Table |
processXlsxSheet(org.apache.poi.xssf.model.StylesTable styles,
org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings,
InputStream sheetInputStream,
int rowInitial) |
void |
setAfterLine(int afterLine) |
void |
setDateAsLocalDateTime(boolean dateAsLocalDateTime) |
void |
setDateStringPattern(String dateStringPattern) |
void |
setDateTimeStringPattern(String dateTimeStringPattern) |
void |
setSheetNumber(int sheetNumber) |
void |
setSheetNumberAsFirstNotHidden() |
public ExcelParser(Class<T> clazz, File file) throws IOException
IOExceptionpublic ExcelParser(Class<T> clazz, File file, int afterLine) throws IOException
IOExceptionpublic ExcelParser(Class<T> clazz, File file, int afterLine, boolean lastSheet, ImporterXLSXType importerXLSXType) throws IOException
IOExceptionpublic ExcelParser(Class<T> clazz, File file, int afterLine, boolean lastSheet, ImporterXLSXType importerXLSXType, Class<?> group) throws IOException
IOExceptionpublic ExcelParser(Class<T> clazz, InputStream inputStream, ExcelType type)
public ExcelParser(Class<T> clazz, InputStream inputStream, ExcelType type, Class<?> group)
public ExcelParser(Class<T> clazz, InputStream inputStream, ExcelType type, int afterLine)
public ExcelParser(Class<T> clazz, InputStream inputStream, ExcelType type, int afterLine, Class<?> group)
public ExcelParser(Class<T> clazz, InputStream inputStream, ExcelType type, int afterLine, boolean isLastSheet, ImporterXLSXType importerXLSXType)
public ExcelParser(Class<T> clazz, InputStream inputStream, ExcelType type, int afterLine, boolean isLastSheet, ImporterXLSXType importerXLSXType, Class<?> group)
public String getDateStringPattern()
public void setDateStringPattern(String dateStringPattern)
setDateStringPattern in interface Parser<T>public void setDateTimeStringPattern(String dateTimeStringPattern)
setDateTimeStringPattern in interface Parser<T>public void setAfterLine(int afterLine)
public void setSheetNumber(int sheetNumber)
public int getSheetNumber()
public void setSheetNumberAsFirstNotHidden()
public int getNumberOfSheets()
ParsergetNumberOfSheets in interface Parser<T>@Deprecated public List<List<String>> getXlsLines() throws org.apache.poi.openxml4j.exceptions.InvalidFormatException, IOException
org.apache.poi.openxml4j.exceptions.InvalidFormatExceptionIOExceptionpublic org.apache.poi.ss.usermodel.Workbook getWorkbook()
@Deprecated public org.apache.poi.openxml4j.opc.OPCPackage getOPCPackage()
@Deprecated public List<List<String>> getXlsxLines() throws Exception
Exceptionprotected Table processXlsxSheet(org.apache.poi.xssf.model.StylesTable styles, org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings, InputStream sheetInputStream, boolean ignoreFirstRow) throws Exception
Exceptionprotected Table processXlsxSheet(org.apache.poi.xssf.model.StylesTable styles, org.apache.poi.xssf.eventusermodel.ReadOnlySharedStringsTable strings, InputStream sheetInputStream, int rowInitial) throws Exception
Exceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void setDateAsLocalDateTime(boolean dateAsLocalDateTime)
setDateAsLocalDateTime in interface Parser<T>Copyright © 2017 TecSinapse. All rights reserved.