Class JRXlsxDataSource

  • All Implemented Interfaces:
    JRDataSource, JRRewindableDataSource

    public class JRXlsxDataSource
    extends AbstractPoiXlsDataSource
    Deprecated.
    Replaced by ExcelDataSource.
    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)
    • 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​(java.io.InputStream inputStream)
                         throws JRException,
                                java.io.IOException
        Deprecated.
        Creates a data source instance from an XLSX data input stream.
        Parameters:
        inputStream - an input stream containing XLSX data
        Throws:
        JRException
        java.io.IOException
      • JRXlsxDataSource

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

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

        public JRXlsxDataSource​(JasperReportsContext jasperReportsContext,
                                java.lang.String location)
                         throws JRException,
                                java.io.IOException
        Deprecated.
        Creates a data source instance that reads XLSX data from a given location.
        Parameters:
        jasperReportsContext - the JasperReportsContext
        location - a String representing XLSX 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