public class JRXlsxDataSource extends AbstractPoiXlsDataSource
The default naming convention is to name report fields COLUMN_x and map each column with the field found at index x in each row (these indices start with 0). To avoid this situation, users can either specify a collection of column names or set a flag to read the column names from the first row of the XLSX file.
columnNames, dateFormat, EXCEPTION_MESSAGE_KEY_XLS_COLUMN_NAMES_MISMATCH_COLUMN_INDEXES, EXCEPTION_MESSAGE_KEY_XLS_FIELD_VALUE_NOT_RETRIEVED, EXCEPTION_MESSAGE_KEY_XLS_SHEET_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_XLS_SHEET_NOT_FOUND, numberFormat, sheetSelection, useFirstRowAsHeaderEXCEPTION_MESSAGE_KEY_CANNOT_CONVERT_FIELD_TYPE, EXCEPTION_MESSAGE_KEY_CANNOT_MODIFY_PROPERTIES_AFTER_START, EXCEPTION_MESSAGE_KEY_NODE_NOT_AVAILABLE, EXCEPTION_MESSAGE_KEY_NULL_DOCUMENT, EXCEPTION_MESSAGE_KEY_NULL_SELECT_EXPRESSION, EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME, EXCEPTION_MESSAGE_KEY_UNKNOWN_NUMBER_TYPE| Constructor and Description |
|---|
JRXlsxDataSource(File file)
Creates a data source instance from an XLSX file.
|
JRXlsxDataSource(InputStream inputStream)
Creates a data source instance from an XLSX data input stream.
|
JRXlsxDataSource(JasperReportsContext jasperReportsContext,
String location)
Creates a data source instance that reads XLSX data from a given location.
|
JRXlsxDataSource(String location) |
JRXlsxDataSource(org.apache.poi.ss.usermodel.Workbook workbook)
Creates a data source instance from a workbook.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.poi.ss.usermodel.Workbook |
loadWorkbook(InputStream inputStream) |
checkReadStarted, close, getFieldValue, moveFirst, nextgetColumnNames, getDateFormat, getNumberFormat, getSheetSelection, setColumnIndexes, setColumnNames, setColumnNames, setDateFormat, setNumberFormat, setSheetSelection, setUseFirstRowAsHeaderconvertNumber, convertStringValue, getConvertBean, getDatePattern, getFormattedDate, getFormattedNumber, getLocale, getNumberPattern, getTextAttributes, getTimeZone, setDatePattern, setLocale, setLocale, setNumberPattern, setTextAttributes, setTextAttributes, setTimeZone, setTimeZonepublic JRXlsxDataSource(org.apache.poi.ss.usermodel.Workbook workbook)
workbook - the workbookpublic JRXlsxDataSource(InputStream inputStream) throws JRException, IOException
inputStream - an input stream containing XLSX dataJRExceptionIOExceptionpublic JRXlsxDataSource(File file) throws JRException, FileNotFoundException, IOException
file - a file containing XLSX dataJRExceptionFileNotFoundExceptionIOExceptionpublic JRXlsxDataSource(JasperReportsContext jasperReportsContext, String location) throws JRException, IOException
jasperReportsContext - the JasperReportsContextlocation - a String representing XLSX data sourceIOExceptionJRExceptionpublic JRXlsxDataSource(String location) throws JRException, IOException
JRExceptionIOExceptionJRXlsxDataSource(JasperReportsContext, String)protected org.apache.poi.ss.usermodel.Workbook loadWorkbook(InputStream inputStream) throws IOException
loadWorkbook in class AbstractPoiXlsDataSourceIOExceptionCopyright © 2017. All rights reserved.