Qore jni Module 2.6.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

void constructor (string path, soft< hash< auto > > opts)
 Creates the ExcelReadDataProvider with the input data path and optionally an option hash.
 
void constructor (InputStream stream, soft< hash< auto > > opts)
 Creates the ExcelReadDataProvider with the input data stream and optionally an option hash.
 
string getName ()
 Returns the object name.
 
void checkIterator ()
 Common setup code.
 
AbstractDataProviderRecordIterator searchRecordsImpl (soft< hash< auto > > where_cond, soft< hash< auto > > search_options)
 Returns an iterator for zero or more records matching the search options.
 
soft< hash< string, AbstractDataField > > getRecordTypeImpl (soft< hash< auto > > search_options)
 Returns the description of the record type, if any.
 
soft< list< string > > getChildProviderNamesImpl ()
 Returns a list of child data provider names, if any.
 
soft< 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.
 

Static Public Member Methods

static soft< hash< auto > > processCellOptions (soft< 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 auto ProviderInfo = ...
 Provider info.
 
const auto SearchOptions = ...
 Search options.
 
const auto ConstructorOptions = ...
 Constructor options.
 

Private Attributes

InputStream i
 The input 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
 dummy iterator
 
soft< hash< auto > > opts
 Excel iteration options.
 

Detailed Description

Provides a data provider for reading EXCEL files.

Member Function Documentation

◆ constructor() [1/2]

void ExcelDataProvider::ExcelReadDataProvider::constructor ( InputStream  stream,
soft< 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() [2/2]

void ExcelDataProvider::ExcelReadDataProvider::constructor ( string  path,
soft< 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()

soft< AbstractDataProvider > ExcelDataProvider::ExcelReadDataProvider::getChildProviderImpl ( string  child_name)

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()

soft< list< string > > ExcelDataProvider::ExcelReadDataProvider::getChildProviderNamesImpl ( )

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 ( soft< hash< auto > >  where_cond,
soft< hash< auto > >  search_options 
)

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: