Qore jni Module 2.4.0
Loading...
Searching...
No Matches
ExcelDataProvider::ExcelReadDataProvider Class Reference

Provides a data provider for reading EXCEL files. More...

#include <ExcelReadDataProvider.qc.dox.h>

Inherits DataProvider::AbstractDataProvider.

Public Member Methods

 constructor (string path, *hash< auto > opts)
 Creates the ExcelReadDataProvider with the input data path and optionally an option hash.
 
 constructor (InputStream stream, *hash< auto > opts)
 Creates the ExcelReadDataProvider with the input data stream and optionally an option hash.
 
 constructor (*hash< auto > options)
 Creates the object from constructor options.
 
string getName ()
 Returns the object name.
 

Static Public Member Methods

static *hash< auto > processCellOptions (*hash< auto > opts)
 Process cell options.
 
static hash< CellRangeInfoparseRange (string range)
 Parses a string that designates a range of cells (ex: "a1:e10")
 
static hash< CellLocationInfoparseCellLocation (string location)
 Parses a string that designates a cell location (ex: "a1")
 

Public Attributes

const ProviderInfo = ...
 Provider info.
 
const SearchOptions = ...
 Search options.
 
const ConstructorOptions = ...
 Constructor options.
 

Private Member Methods

 checkIterator ()
 Common setup code.
 
AbstractDataProviderRecordIterator searchRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options)
 Returns an iterator for zero or more records matching the search options.
 
*hash< string, AbstractDataField > getRecordTypeImpl (*hash< auto > search_options)
 Returns the description of the record type, if any.
 
*list< string > getChildProviderNamesImpl ()
 Returns a list of child data provider names, if any.
 
*AbstractDataProvider getChildProviderImpl (string child_name)
 Returns the given child provider or nothing if the given child is unknown.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 

Private Attributes

InputStream i
 The inpjut stream for the Excel data.
 
ExcelIterator it
 the iterator object
 
string path
 The path to the Excel file.
 
string name
 The name of the object.
 
string sheet
 the name of the worksheet
 
bool dummy
 dumiterator
 
*hash< auto > opts
 Excel iteration options.
 

Detailed Description

Provides a data provider for reading EXCEL files.

Member Function Documentation

◆ constructor() [1/3]

ExcelDataProvider::ExcelReadDataProvider::constructor ( *hash< auto >  options)

Creates the object from constructor options.

Exceptions
EXCEL-READ-OPTION-ERRORinvalid or unknown option; invalid data type for option; "header_names" is True and "headers" is also present; unknown field type
EXCEL-INVALID-LOCATIONinvalid excel location or range string

◆ constructor() [2/3]

ExcelDataProvider::ExcelReadDataProvider::constructor ( InputStream  stream,
*hash< auto >  opts 
)

Creates the ExcelReadDataProvider with the input data stream and optionally an option hash.

Parameters
streamthe input stream to iterate
optsa hash of optional options
Exceptions
EXCEL-READ-OPTION-ERRORinvalid or unknown option; invalid data type for option; "header_names" is True and "headers" is also present; unknown field type
EXCEL-INVALID-LOCATIONinvalid excel location or range string

◆ constructor() [3/3]

ExcelDataProvider::ExcelReadDataProvider::constructor ( string  path,
*hash< auto >  opts 
)

Creates the ExcelReadDataProvider with the input data path and optionally an option hash.

Parameters
paththe input file to iterate; will be subjected to environment variable substitution
optsa hash of optional options
Exceptions
EXCEL-READ-OPTION-ERRORinvalid or unknown option; invalid data type for option; "header_names" is True and "headers" is also present; unknown field type
EXCEL-INVALID-LOCATIONinvalid excel location or range string

◆ getChildProviderImpl()

*AbstractDataProvider ExcelDataProvider::ExcelReadDataProvider::getChildProviderImpl ( string  child_name)
private

Returns the given child provider or nothing if the given child is unknown.

Returns
the given child provider or nothing if the given child is unknown

◆ getChildProviderNamesImpl()

*list< string > ExcelDataProvider::ExcelReadDataProvider::getChildProviderNamesImpl ( )
private

Returns a list of child data provider names, if any.

Returns
a list of child data provider names, if any

◆ parseCellLocation()

static hash< CellLocationInfo > ExcelDataProvider::ExcelReadDataProvider::parseCellLocation ( string  location)
static

Parses a string that designates a cell location (ex: "a1")

Exceptions
INVALID-LOCATIONinvalid excel location or range string

◆ parseRange()

static hash< CellRangeInfo > ExcelDataProvider::ExcelReadDataProvider::parseRange ( string  range)
static

Parses a string that designates a range of cells (ex: "a1:e10")

Exceptions
EXCEL-INVALID-LOCATIONinvalid excel location or range string

◆ searchRecordsImpl()

AbstractDataProviderRecordIterator ExcelDataProvider::ExcelReadDataProvider::searchRecordsImpl ( *hash< auto >  where_cond,
*hash< auto >  search_options 
)
private

Returns an iterator for zero or more records matching the search options.

Parameters
where_condthe search criteria
search_optionsthe search options after processing by validateSearchOptions()

The documentation for this class was generated from the following file: