TOExport is the main class of the OExport library. Use it for creating and reading XLSX and ODS files.
Name | Type | Description |
---|---|---|
WorkSheets | TExportWorkSheets | Worksheet list in your document |
ActiveWorkSheet | TExportWorkSheet | Active sheet |
Drawings | TExportDrawings | List of images and charts |
Title | OWideString | Document title |
Author | OWideString | Document author |
Application | OWideString | Creator application |
SaveOnTheFly | Boolean | Use on-the-fly approach when exporting this document. See code snippet. |
LoadOnTheFly | Boolean | Use on-the-fly approach when importing this document. See code snippet. |
LoadOnTheFlyOnAddWorkSheet | TExportAddWorkSheetEvent | This event is called when a new worksheet is about to be imported during on-the-fly import. |
LoadOnTheFlyOnAddRow | TExportAddRowEvent | This event is called when a new row has been imported during on-the-fly import. |
OnTheFlyParam | Pointer | Store a user-defined object here. |
UseProgress | Boolean | If set to false, no progress events are fired and no progress is shown. |
Name | Type | Description |
---|---|---|
OnProgress | TExportProgressNotification | Progress event |
function AddWorkSheet(const aTitle: OWideString = ''): TExportWorkSheet; |
---|
Adds a new worksheet with a title to the document. The title must be unique - if it's empty an automatic title from the language variable oexport_worksheet will be assigned and followed by the worksheet index (e.g. Worksheet 1). |
procedure SaveToStream(const aStream: TStream; const aExporter: TOCustomExporter); overload; procedure SaveToFile(const aFileName: OWideString; const aExecuteFileAfterExport: Boolean = False); overload; |
---|
Saves the document to a stream/file with a defined exporter. The document can be opened automatically after the export. |
procedure SaveToStream(const aStream: TStream; const aExporterClass: TOExporterClass); overload; procedure SaveToFile(const aFileName: OWideString; const aExporterClass: TOExporterClass; const aExecuteFileAfterExport: Boolean = False); overload; |
Saves the document to a stream/file with a defined exporter class. The exporter will be created automatically. The document can be opened automatically after the export. |
procedure SaveToFile(const aFileName: OWideString; const aExecuteFileAfterExport: Boolean = False); overload; |
Saves the document to a file. The exporter will picked up from the global exporter list according to the extension of the file name. The document can be opened automatically after the export. |
function SaveToFileWithDialog(const aFileName: OWideString = ''; const aInitialDir: OWideString = ''; const aExecuteFileAfterExport: Boolean = False): Boolean; |
Opens a save dialog before exporting the document with a list of file types from the global exporter list. The exporter will picked up from the global exporter list according to the extension of the file name or the file type user has chosen. Use aFileName and aInitialDir as default parameters for the dialog. The document can be opened automatically after the export. |
procedure LoadFromStream(const aStream: TStream; const aExporter: TOCustomExporter); overload; procedure LoadFromFile(const aFileName: OWideString; const aExporter: TOCustomExporter); overload; |
---|
Loads a document from a stream/file with a defined exporter. |
procedure LoadFromStream(const aStream: TStream; const aExporterClass: TOExporterClass); overload; procedure LoadFromFile(const aFileName: OWideString; const aExporterClass: TOExporterClass); overload; |
Loads a document from a stream/file with a defined exporter class. The exporter will be created automatically. |
procedure LoadFromFile(const aFileName: OWideString); overload; |
Loads a document from a file. The exporter will picked up from the global exporter list according to the extension of the file name. |
function LoadFromFileWithDialog(const aFileName: OWideString = ''; const aInitialDir: OWideString = ''): Boolean; |
Opens an open dialog in which the user chooses the document which he wants to import.
The filter list of file types will be taken from the global exporter list. The exporter will picked up from the global exporter list according to the extension of the file name or the file type user has chosen. Use aFileName and aInitialDir as default parameters for the dialog. |