Class XlsDataSource

  • All Implemented Interfaces:
    JRDataSource, JRRewindableDataSource

    public class XlsDataSource
    extends AbstractPoiXlsDataSource
    Deprecated.
    Replaced by ExcelDataSource.
    This data source implementation reads an XLS 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 CSV file.

    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Constructor Detail

      • XlsDataSource

        public XlsDataSource​(org.apache.poi.ss.usermodel.Workbook workbook)
        Deprecated.
        Creates a data source instance from a workbook.
        Parameters:
        workbook - the workbook
      • XlsDataSource

        public XlsDataSource​(java.io.InputStream inputStream)
                      throws JRException,
                             java.io.IOException
        Deprecated.
        Creates a data source instance from an XLS data input stream.
        Parameters:
        inputStream - an input stream containing XLS data
        Throws:
        JRException
        java.io.IOException
      • XlsDataSource

        public XlsDataSource​(java.io.InputStream inputStream,
                             boolean closeInputStream)
                      throws JRException,
                             java.io.IOException
        Deprecated.
        Creates a data source instance from an XLS data input stream.
        Parameters:
        inputStream - an input stream containing XLS data
        Throws:
        JRException
        java.io.IOException
      • XlsDataSource

        public XlsDataSource​(java.io.File file)
                      throws JRException,
                             java.io.IOException
        Deprecated.
        Creates a data source instance from an XLS file.
        Parameters:
        file - a file containing XLS data
        Throws:
        JRException
        java.io.IOException
      • XlsDataSource

        public XlsDataSource​(JasperReportsContext jasperReportsContext,
                             java.lang.String location)
                      throws JRException,
                             java.io.IOException
        Deprecated.
        Creates a data source instance that reads XLS data from a given location.
        Parameters:
        jasperReportsContext - the JasperReportsContext
        location - a String representing XLS data source
        Throws:
        java.io.IOException
        JRException
    • Method Detail

      • loadWorkbook

        protected org.apache.poi.ss.usermodel.Workbook loadWorkbook​(java.io.InputStream inputStream)
                                                             throws java.io.IOException
        Deprecated.
        Specified by:
        loadWorkbook in class AbstractPoiXlsDataSource
        Throws:
        java.io.IOException