Provides a data provider for writing EXCEL files.
More...
#include <ExcelWriteDataProvider.qc.dox.h>
Inherits DataProvider::AbstractDataProvider.
|
| void | constructor (string path, soft< hash< auto > > opts) |
| | Creates the ExcelWriteDataProvider with the output path and optionally an option hash.
|
| |
| void | constructor (OutputStream stream, soft< hash< auto > > opts) |
| | Creates the ExcelWriteDataProvider with an output stream and optionally an option hash.
|
| |
|
void | setupWriter () |
| | Sets up the writer.
|
| |
|
string | getName () |
| | Returns the object name.
|
| |
|
void | destructor () |
| | Destructor - ensures file is written.
|
| |
| soft< hash< auto > > | createRecordImpl (hash< auto > rec, soft< hash< auto > > create_options) |
| | Creates a single record in the data provider.
|
| |
| void | commit () |
| | Commits (writes) the Excel file.
|
| |
| binary | getData () |
| | Returns the data as binary.
|
| |
|
int | getCreatedCount () |
| | Returns the number of records created.
|
| |
|
hash< DataProviderInfo > | getStaticInfoImpl () |
| | Returns data provider static info.
|
| |
|
|
const auto | ProviderInfo = ... |
| | Provider info.
|
| |
|
const auto | ConstructorOptions = ... |
| | Constructor options.
|
| |
|
|
soft< string > | path |
| | The output path.
|
| |
|
soft< OutputStream > | stream |
| | The output stream.
|
| |
|
string | name |
| | The name of the object.
|
| |
|
ExcelWriter | writer |
| | The Excel writer object.
|
| |
|
soft< hash< auto > > | opts |
| | The options.
|
| |
Provides a data provider for writing EXCEL files.
◆ commit()
| void ExcelDataProvider::ExcelWriteDataProvider::commit |
( |
| ) |
|
Commits (writes) the Excel file.
Call this method when you are done writing records to ensure the file is written. This is also called automatically in the destructor.
◆ constructor() [1/2]
| void ExcelDataProvider::ExcelWriteDataProvider::constructor |
( |
OutputStream |
stream, |
|
|
soft< hash< auto > > |
opts |
|
) |
| |
Creates the ExcelWriteDataProvider with an output stream and optionally an option hash.
- Parameters
-
| stream | the output stream to write to |
| opts | a hash of optional options |
- Exceptions
-
| EXCEL-WRITE-OPTION-ERROR | invalid or unknown option; conflicting options |
◆ constructor() [2/2]
| void ExcelDataProvider::ExcelWriteDataProvider::constructor |
( |
string |
path, |
|
|
soft< hash< auto > > |
opts |
|
) |
| |
Creates the ExcelWriteDataProvider with the output path and optionally an option hash.
- Parameters
-
| path | the output file path |
| opts | a hash of optional options |
- Exceptions
-
| EXCEL-WRITE-OPTION-ERROR | invalid or unknown option; conflicting options |
◆ createRecordImpl()
| soft< hash< auto > > ExcelDataProvider::ExcelWriteDataProvider::createRecordImpl |
( |
hash< auto > |
rec, |
|
|
soft< hash< auto > > |
create_options |
|
) |
| |
Creates a single record in the data provider.
- Parameters
-
| rec | the record to create |
| create_options | no options are currently supported |
- Returns
- the record created (echoes back the input)
◆ getData()
| binary ExcelDataProvider::ExcelWriteDataProvider::getData |
( |
| ) |
|
Returns the data as binary.
- Returns
- the Excel file contents as binary data
- Note
- This is an alternative to using path or stream - get the data directly
The documentation for this class was generated from the following file:
- doxygen/qlib/ExcelDataProvider/ExcelWriteDataProvider.qc.dox.h