public class XlsDataSource 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 CSV file.
columnNames, dateFormat, numberFormat, sheetSelection, useFirstRowAsHeader| Constructor and Description |
|---|
XlsDataSource(java.io.File file)
Creates a data source instance from an XLS file.
|
XlsDataSource(java.io.InputStream inputStream)
Creates a data source instance from an XLS data input stream.
|
XlsDataSource(JasperReportsContext jasperReportsContext,
java.lang.String location)
Creates a data source instance that reads XLS data from a given location.
|
XlsDataSource(java.lang.String location) |
XlsDataSource(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(java.io.InputStream inputStream) |
checkReadStarted, close, getFieldValue, moveFirst, nextgetColumnNames, getDateFormat, getNumberFormat, getSheetSelection, setColumnIndexes, setColumnNames, setColumnNames, setDateFormat, setNumberFormat, setSheetSelection, setUseFirstRowAsHeaderconvertNumber, convertStringValue, getConvertBean, getDatePattern, getFormattedDate, getFormattedNumber, getLocale, getNumberPattern, getTimeZone, setDatePattern, setLocale, setLocale, setNumberPattern, setTextAttributes, setTimeZone, setTimeZonepublic XlsDataSource(org.apache.poi.ss.usermodel.Workbook workbook)
workbook - the workbookpublic XlsDataSource(java.io.InputStream inputStream)
throws JRException,
java.io.IOException
inputStream - an input stream containing XLS dataJRExceptionjava.io.IOExceptionpublic XlsDataSource(java.io.File file)
throws JRException,
java.io.IOException
file - a file containing XLS dataJRExceptionjava.io.IOExceptionpublic XlsDataSource(JasperReportsContext jasperReportsContext, java.lang.String location) throws JRException, java.io.IOException
jasperReportsContext - the JasperReportsContextlocation - a String representing XLS data sourcejava.io.IOExceptionJRExceptionpublic XlsDataSource(java.lang.String location)
throws JRException,
java.io.IOException
JRExceptionjava.io.IOExceptionXlsDataSource(JasperReportsContext, String)protected org.apache.poi.ss.usermodel.Workbook loadWorkbook(java.io.InputStream inputStream)
throws java.io.IOException
loadWorkbook in class AbstractPoiXlsDataSourcejava.io.IOException© 2001-2010 Jaspersoft Corporation www.jaspersoft.com