public final class Poiji extends Object
Example:
Listemployees = Poiji.fromExcel(new File("employees.xls"), Employee.class); employees.size(); // 3 Employee firstEmployee = employees.get(0); // Employee{employeeId=123923, name='Joe', surname='Doe', age=30, single=true, birthday='4/9/1987'}
Created by hakan on 16/01/2017.
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
fromExcel(File file,
Class<T> type)
converts excel rows into a list of objects
|
static <T> void |
fromExcel(File file,
Class<T> type,
Consumer<? super T> consumer)
converts excel rows into a list of objects
|
static <T> List<T> |
fromExcel(File file,
Class<T> type,
PoijiOptions options)
converts excel rows into a list of objects
|
static <T> void |
fromExcel(File file,
Class<T> type,
PoijiOptions options,
Consumer<? super T> consumer)
converts excel rows into a list of objects
|
static <T> List<T> |
fromExcel(InputStream inputStream,
PoijiExcelType excelType,
Class<T> type)
converts excel rows into a list of objects
|
static <T> void |
fromExcel(InputStream inputStream,
PoijiExcelType excelType,
Class<T> type,
Consumer<? super T> consumer)
converts excel rows into a list of objects
|
static <T> List<T> |
fromExcel(InputStream inputStream,
PoijiExcelType excelType,
Class<T> type,
PoijiOptions options)
converts excel rows into a list of objects
|
static <T> void |
fromExcel(InputStream inputStream,
PoijiExcelType excelType,
Class<T> type,
PoijiOptions options,
Consumer<? super T> consumer)
converts excel rows into a list of objects
|
public static <T> List<T> fromExcel(File file, Class<T> type)
T - type of the root object.file - excel file ending with .xls or .xlsx.type - type of the root object.PoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class, PoijiOptions)public static <T> void fromExcel(File file, Class<T> type, Consumer<? super T> consumer)
T - type of the root object.file - excel file ending with .xls or .xlsx.type - type of the root object.consumer - output retrieves recordsPoijiException - if an internal exception occurs during the mapping
process.InvalidExcelFileExtension - if the specified excel file extension
is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class, PoijiOptions)public static <T> List<T> fromExcel(InputStream inputStream, PoijiExcelType excelType, Class<T> type)
T - type of the root object.inputStream - excel file streamexcelType - type of the excel file, xls or xlsxtype - type of the root object.PoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class, PoijiOptions)public static <T> void fromExcel(InputStream inputStream, PoijiExcelType excelType, Class<T> type, Consumer<? super T> consumer)
T - type of the root object.inputStream - excel file streamexcelType - type of the excel file, xls or xlsxtype - type of the root object.consumer - represents an operation that accepts the type argumentPoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class, PoijiOptions)public static <T> List<T> fromExcel(File file, Class<T> type, PoijiOptions options)
T - type of the root object.file - excel file ending with .xls or .xlsx.type - type of the root object.options - specifies to change the default behaviour of the poiji.PoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class)public static <T> void fromExcel(File file, Class<T> type, PoijiOptions options, Consumer<? super T> consumer)
T - type of the root object.file - excel file ending with .xls or .xlsx.type - type of the root object.options - specifies to change the default behaviour of the poiji.consumer - represents an operation that accepts the type argumentPoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class)public static <T> List<T> fromExcel(InputStream inputStream, PoijiExcelType excelType, Class<T> type, PoijiOptions options)
T - type of the root object.inputStream - excel file streamexcelType - type of the excel file, xls or xlsxtype - type of the root object.options - specifies to change the default behaviour of the poiji.PoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java language access control and the underlying field is either inaccessible or final.fromExcel(File, Class)public static <T> void fromExcel(InputStream inputStream, PoijiExcelType excelType, Class<T> type, PoijiOptions options, Consumer<? super T> consumer)
T - type of the root object.inputStream - excel file streamexcelType - type of the excel file, xls or xlsxtype - type of the root object.options - specifies to change the default behaviour of the poiji.consumer - represents an operation that accepts the type argumentPoijiException - if an internal exception occurs during the mapping process.InvalidExcelFileExtension - if the specified excel file extension is invalid.IllegalCastException - if this Field object is enforcing Java
language access control and the underlying field is either inaccessible or final.fromExcel(File, Class)Copyright © 2017–2020. All rights reserved.