Package net.sf.jasperreports.poi.data
Class JRXlsxDataSource
- java.lang.Object
-
- net.sf.jasperreports.engine.data.JRAbstractTextDataSource
-
- net.sf.jasperreports.engine.data.AbstractXlsDataSource
-
- net.sf.jasperreports.poi.data.AbstractPoiXlsDataSource
-
- net.sf.jasperreports.poi.data.JRXlsxDataSource
-
- All Implemented Interfaces:
JRDataSource
,JRRewindableDataSource
public class JRXlsxDataSource extends AbstractPoiXlsDataSource
Deprecated.Replaced byExcelDataSource
.This data source implementation reads an XLSX stream.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.
- Author:
- Sanda Zaharia (shertage@users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.engine.data.AbstractXlsDataSource
columnIndexMap, 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, INDEXED_COLUMN_PREFIX, numberFormat, PROPERTY_FIELD_COLUMN_INDEX, PROPERTY_FIELD_COLUMN_NAME, sheetSelection, useFirstRowAsHeader
-
Fields inherited from class net.sf.jasperreports.engine.data.JRAbstractTextDataSource
EXCEPTION_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 Summary
Constructors Constructor Description JRXlsxDataSource(File file)
Deprecated.Creates a data source instance from an XLSX file.JRXlsxDataSource(InputStream inputStream)
Deprecated.Creates a data source instance from an XLSX data input stream.JRXlsxDataSource(InputStream inputStream, boolean closeInputStream)
Deprecated.Creates a data source instance from an XLSX data input stream.JRXlsxDataSource(String location)
Deprecated.JRXlsxDataSource(JasperReportsContext jasperReportsContext, String location)
Deprecated.Creates a data source instance that reads XLSX data from a given location.JRXlsxDataSource(RepositoryContext context, String location)
Deprecated.JRXlsxDataSource(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.Creates a data source instance from a workbook.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.apache.poi.ss.usermodel.Workbook
loadWorkbook(InputStream inputStream)
Deprecated.-
Methods inherited from class net.sf.jasperreports.poi.data.AbstractPoiXlsDataSource
checkReadStarted, close, getFieldFormatPattern, getFieldValue, getStringFieldValue, moveFirst, next
-
Methods inherited from class net.sf.jasperreports.engine.data.AbstractXlsDataSource
getColumnIndex, getColumnNames, getDateFormat, getNumberFormat, getSheetSelection, setColumnIndexes, setColumnNames, setColumnNames, setDateFormat, setNumberFormat, setSheetSelection, setUseFirstRowAsHeader
-
Methods inherited from class net.sf.jasperreports.engine.data.JRAbstractTextDataSource
convertNumber, convertStringValue, getConvertBean, getDatePattern, getLocale, getNumberPattern, getTextAttributes, getTimeZone, setDatePattern, setLocale, setLocale, setNumberPattern, setTextAttributes, setTextAttributes, setTimeZone, setTimeZone
-
-
-
-
Constructor Detail
-
JRXlsxDataSource
public JRXlsxDataSource(org.apache.poi.ss.usermodel.Workbook workbook)
Deprecated.Creates a data source instance from a workbook.- Parameters:
workbook
- the workbook
-
JRXlsxDataSource
public JRXlsxDataSource(InputStream inputStream) throws JRException, IOException
Deprecated.Creates a data source instance from an XLSX data input stream.- Parameters:
inputStream
- an input stream containing XLSX data- Throws:
JRException
IOException
-
JRXlsxDataSource
public JRXlsxDataSource(InputStream inputStream, boolean closeInputStream) throws JRException, IOException
Deprecated.Creates a data source instance from an XLSX data input stream.- Parameters:
inputStream
- an input stream containing XLSX data- Throws:
JRException
IOException
-
JRXlsxDataSource
public JRXlsxDataSource(File file) throws JRException, FileNotFoundException, IOException
Deprecated.Creates a data source instance from an XLSX file.- Parameters:
file
- a file containing XLSX data- Throws:
JRException
FileNotFoundException
IOException
-
JRXlsxDataSource
public JRXlsxDataSource(JasperReportsContext jasperReportsContext, String location) throws JRException, IOException
Deprecated.Creates a data source instance that reads XLSX data from a given location.- Parameters:
jasperReportsContext
- the JasperReportsContextlocation
- a String representing XLSX data source- Throws:
IOException
JRException
-
JRXlsxDataSource
public JRXlsxDataSource(RepositoryContext context, String location) throws JRException, IOException
Deprecated.- Throws:
JRException
IOException
-
JRXlsxDataSource
public JRXlsxDataSource(String location) throws JRException, IOException
Deprecated.- Throws:
JRException
IOException
- See Also:
JRXlsxDataSource(JasperReportsContext, String)
-
-
Method Detail
-
loadWorkbook
protected org.apache.poi.ss.usermodel.Workbook loadWorkbook(InputStream inputStream) throws IOException
Deprecated.- Specified by:
loadWorkbook
in classAbstractPoiXlsDataSource
- Throws:
IOException
-
-