ILLExporter

Defines the public contract for the LLExporter class, exposing methods to export linelist data into standalone workbooks. Supports custom filtered exports, full migration exports, analysis-only exports, and geobase exports. Consumers use ExportCustom, ExportMigration, ExportAnalysis, or ExportGeo, then read LastExportPassword if a password was applied.

Export Methods

ExportCustom #

Export a numbered custom export definition

Signature:

Public Function ExportCustom(ByVal exportNumber As Long, _
                             ByVal folderPath As String, _
                             Optional ByVal useFilters As Boolean = False) As String

Creates an output workbook containing filtered data, optional metadata sheets, and optional analysis sheets according to the export definition identified by exportNumber. Saves the workbook to folderPath and returns the full file path. When useFilters is True, exports filtered HList data from companion filter sheets rather than the raw ListObject data.

Parameters:

  • exportNumber: Long. Which export definition to use (1-based).
  • folderPath: String. Target folder for the saved file.
  • useFilters: Optional Boolean. When True, exports filtered HList data instead of raw data. Defaults to False.

Returns: String. Saved file path, or empty string on failure.


ExportMigration #

Export all data for migration to another linelist

Signature:

Public Function ExportMigration(ByVal folderPath As String, _
                                Optional ByVal includeShowHide As Boolean = False, _
                                Optional ByVal keepLabels As Boolean = False) As String

Creates an output workbook with full unfiltered data, metadata sheets, dictionary, choices, translations, and metadata tags for re-import. Optionally includes show/hide state with column widths and marks editable labels for update on import. No password is applied.

Parameters:

  • folderPath: String. Target folder for the saved file.
  • includeShowHide: Optional Boolean. When True, includes show/hide state with column widths. Defaults to False.
  • keepLabels: Optional Boolean. When True, marks editable labels for update on import. Defaults to False.

Returns: String. Saved file path, or empty string on failure.


ExportAnalysis #

Export analysis worksheets only

Signature:

Public Function ExportAnalysis(ByVal folderPath As String) As String

Creates an output workbook containing only the four analysis sheets (univariate, time series, spatial, spatio-temporal) with their values, formatting, and graphs. No data or metadata sheets are included.

Parameters:

  • folderPath: String. Target folder for the saved file.

Returns: String. Saved file path, or empty string on failure.


ExportGeo #

Export geobase data to a separate workbook

Signature:

Public Function ExportGeo(ByVal folderPath As String, _
                           Optional ByVal onlyHistoric As Boolean = False) As String

Creates an output workbook and delegates to LLGeo.ExportToFile to write geobase data. When onlyHistoric is True, exports only the historic geobase subset. The file name includes a date stamp.

Parameters:

  • folderPath: String. Target folder for the saved file.
  • onlyHistoric: Optional Boolean. When True, exports only the historic geobase. Defaults to False.

Returns: String. Saved file path, or empty string on failure.


State

LastExportPassword #

Password used in the last export operation

Signature:

Public Property Get LastExportPassword() As String

Returns the password that was applied to the most recent custom export, or an empty string when no password was used. Modules display this value to the user after a successful export so they can share it securely.

Returns: String. The password applied to the last export, or vbNullString.


Cleanup

CloseAll #

Close all output workbooks that may still be open

Signature:

Public Sub CloseAll()

Closes any output workbook left open after an export error, preventing orphaned minimized windows. Safe to call even when no workbook is open.