LLExport
Internal members (not exported)
Factory
Create #
Create a unified export handler
Signature:
Public Function Create(ByVal exportSheet As Worksheet, _
Optional ByVal startRow As Long = 1, _
Optional ByVal startColumn As Long = 1) As ILLExport
Creates a linelist export handler over the specification sheet provided by the caller. The implementation caches the underlying datasheet, worksheet, and sanitisation rules so subsequent calls can resolve filenames and table rows without repeatedly scanning the workbook.
Parameters:
exportSheet: Worksheet hosting the export specification table.startRow: Optional; first row of the export table (defaults to 1).startColumn: Optional; first column of the export table (defaults to 1).
Returns: A fully initialised ILLExport instance.
Throws:
- ProjectError.ObjectNotInitialized when the worksheet is missing.
SetInternalData #
Signature:
Public Property Set InternalData(ByVal exportData As IDataSheet)
Parameters:
exportData: Datasheet wrapper over the specification table.
SetInternalWorksheet #
Signature:
Public Property Set InternalWorksheet(ByVal exportSheet As Worksheet)
Parameters:
exportSheet: Worksheet that stores the export specification table.
Self #
Return the current instance as interface
Signature:
Public Property Get Self() As ILLExport
Returns: The object cast as ILLExport.
Properties
Data #
Underlying export datasheet
Signature:
Public Property Get Data() As IDataSheet
Returns: Datasheet abstraction wrapping the export specification table.
Worksheet #
Worksheet hosting the export specification table
Signature:
Public Property Get Worksheet() As Worksheet
Returns: Worksheet reference used by the handler.
NumberOfExports #
Count the configured export rows
Signature:
Public Property Get NumberOfExports() As Long
Counts rows within the specification table excluding headers.
Returns: Total number of export definitions currently present.
HasCheckings #
Whether informational checkings were captured
Signature:
Public Property Get HasCheckings() As Boolean
CheckingValues #
Collected informational diagnostics
Signature:
Public Property Get CheckingValues() As IChecking
Returns: Checking object containing log entries, if any.
Row Management
ManageRows #
Align export rows and dictionary columns
Signature:
Private Sub ManageRows(Optional ByVal del As Boolean = False, _
Optional ByVal dict As ILLdictionary, _
Optional ByVal rowCount As Long = 2)
Handle the addition or removal of export rows while keeping the dictionary columns aligned with the actual identifiers present in the worksheet. The logic operates on identifiers rather than simple counts so arbitrary deletions do not remove unrelated export columns.
Parameters:
dict: Optional dictionary used to add/remove export columns.del: Optional flag switching to row removal mode.rowCount: Optional threshold for row removal; rows with non-empty cells at or below the threshold are trimmed (defaults to 0, removing empty rows).
InsertRows #
Insert export rows and keep dictionary columns aligned
Signature:
Public Sub InsertRows(ByVal targetCell As Range, _
Optional ByVal dict As ILLdictionary, _
Optional ByVal insertShift As Boolean = False)
Parameters:
targetCell: Range anchor representing where to mirror inserted rows.dict: Optional dictionary to shift export columns.insertShift: Optional Boolean to insert worksheet rows when necessary. Defaults to False.
DeleteRows #
Delete export rows intersecting the supplied selection
Signature:
Public Sub DeleteRows(ByVal targetCell As Range, _
Optional ByVal dict As ILLdictionary, _
Optional ByVal forceShift As Boolean = False)
AddRows #
Append export definition rows
Signature:
Public Sub AddRows(Optional ByVal dict As ILLdictionary)
Parameters:
dict: Optional dictionary to align export columns with.
RemoveRows #
Remove empty export rows
Signature:
Public Sub RemoveRows(Optional ByVal dict As ILLdictionary, _
Optional ByVal rowCount As Long = 2)
Parameters:
rowCount: Optional threshold; rows with non-empty cell counts at or below this value are removed (defaults to 0).
SyncDictionaryExports #
Synchronise dictionary export columns
Signature:
Public Sub SyncDictionaryExports(Optional ByVal dict As ILLdictionary)
Sort #
Sort export definitions and normalize identifiers
Signature:
Public Sub Sort(Optional ByVal dict As ILLdictionary)
SpecManagement
ImportSpecs #
Import export specifications from another worksheet
Signature:
Public Sub ImportSpecs(ByVal fromWksh As Worksheet, _
ByVal fromStartRow As Long, _
ByVal fromStartColumn As Long)
Parameters:
fromWksh: Source worksheet containing the export table.fromStartRow: First row of the source data.fromStartColumn: First column of the source data.
Throws:
- ProjectError.ObjectNotInitialized when the source worksheet is missing.
ExportSpecs #
Export specifications into another workbook
Signature:
Public Sub ExportSpecs(ByVal toWkb As Workbook, _
Optional ByVal Hide As Long = xlSheetHidden)
Parameters:
toWkb: Destination workbook.Hide: Optional visibility flag for the exported sheet.
Throws:
- ProjectError.ObjectNotInitialized when the target workbook is missing.
FileName
ExportFileName #
Build the filename for a specific export definition
Signature:
Public Function ExportFileName(ByVal exportNumber As Long, _
ByVal dict As ILLdictionary, _
ByVal pass As IPasswords, _
Optional ByVal exportAll As Boolean = False) As String
Parameters:
exportNumber: Target export definition number starting at 1.dict: Dictionary providing metadata for chunk substitutions.pass: Password provider used to append version/public key information.exportAll: Optional flag forcing the "export all" naming schema.
Returns: Sanitised filename incorporating dictionary-driven chunks and metadata.
Throws:
- ProjectError.InvalidArgument when the export number is invalid.
- ProjectError.ObjectNotInitialized when required collaborators are missing.
Export Count Tracking
HiddenNameStore #
Resolve worksheet name manager
Signature:
Private Function HiddenNameStore() As IHiddenNames
Utilities
IsActive #
Determine whether an export is marked active
Signature:
Public Function IsActive(ByVal exportNumber As Long) As Boolean
Parameters:
exportNumber: Export definition number to inspect.
Returns: True when the status column contains "active" (case-insensitive).
ColumnValue #
Retrieve a column value for a given export row
Signature:
Public Function ColumnValue(ByVal exportNumber As Long, ByVal columnName As String) As String
Parameters:
exportNumber: Export definition number to read.columnName: Column header to retrieve.
Returns: Column value as string (empty string when not found).
ActiveExportNumbers #
Enumerate export numbers marked as active
Signature:
Public Function ActiveExportNumbers() As BetterArray
Returns: BetterArray containing active export numbers using 1-based numbering.
Translate #
Translate the current LLExport
Signature:
Private Sub Translate(ByVal trads As ITranslationObject)
Private Helpers
EnsureDataReady #
Ensure the datasheet state is initialised
Signature:
Private Sub EnsureDataReady()
EnsureWorksheetReady #
Ensure the worksheet reference is initialised
Signature:
Private Sub EnsureWorksheetReady()
EnsureDictionaryReady #
Validate dictionary dependency
Signature:
Private Sub EnsureDictionaryReady(Optional ByVal dict As ILLdictionary, Optional ByVal resetInt As Boolean = False, Optional ByVal required As Boolean = True)
EnsureVariablesReady #
Lazily instantiate dictionary-backed variable helper
Signature:
Private Sub EnsureVariablesReady(Optional ByVal dict As ILLdictionary)
InternalDictionary #
Signature:
Private Property Get InternalDictionary() As ILLdictionary
InternalDictionary #
Signature:
Private Property Set InternalDictionary(ByVal dict As ILLdictionary)
ValidateExportNumber #
Validate export number bounds
Signature:
Private Sub ValidateExportNumber(ByVal exportNumber As Long)
ValidatePasswords #
Validate password provider dependency
Signature:
Private Sub ValidatePasswords(ByVal pass As IPasswords)
ExportTable #
Retrieve export table wrapper
Signature:
Private Function ExportTable() As ICustomTable
ReadValue #
Read a column value from the cached datasheet
Signature:
Private Function ReadValue(ByVal columnName As String, _
ByVal exportNumber As Long, _
Optional ByVal required As Boolean = False) As String
ResolveColumnRange #
Resolve and cache a specification column
Signature:
Private Function ResolveColumnRange(ByVal columnName As String, _
ByVal required As Boolean) As Range
ResetCaches #
Reset cached references and diagnostics
Signature:
Public Sub ResetCaches()
ComposeTemplatePath #
Build the filename path from template chunks
Signature:
Private Function ComposeTemplatePath(ByVal template As String) As String
ResolveTemplateChunk #
Resolve a single template chunk into a safe string
Signature:
Private Function ResolveTemplateChunk(ByVal rawChunk As String, _
ByVal workbook As Workbook) As String
IsLiteralTemplateChunk #
Determine whether a chunk represents a literal string
Signature:
Private Function IsLiteralTemplateChunk(ByVal chunk As String) As Boolean
StripLiteralChunk #
Remove wrapping quotes from literal chunk values
Signature:
Private Function StripLiteralChunk(ByVal chunk As String) As String
ResolveVariableChunk #
Resolve dictionary-driven chunk value
Signature:
Private Function ResolveVariableChunk(ByVal chunk As String, _
ByVal workbook As Workbook) As String
TryGetWorksheet #
Safely retrieve a worksheet by name
Signature:
Private Function TryGetWorksheet(ByVal workbook As Workbook, ByVal sheetName As String) As Worksheet
TryGetNamedRange #
Safely retrieve a named range for a chunk
Signature:
Private Function TryGetNamedRange(ByVal workbook As Workbook, _
ByVal chunk As String, _
ByVal targetSheet As Worksheet) As Range
SanitizeChunk #
Sanitise individual chunk values for filenames
Signature:
Private Function SanitizeChunk(ByVal chunk As String) As String
ReplaceInvalidCharacters #
Replace characters unsupported in filenames
Signature:
Private Function ReplaceInvalidCharacters(ByVal value As String) As String
EnsureSanitizeList #
Initialise invalid filename character list
Signature:
Private Sub EnsureSanitizeList()
BuildVersionSuffix #
Compose version/public key suffix for filenames
Signature:
Private Function BuildVersionSuffix(ByVal pass As IPasswords) As String
BuildTimestamp #
Compose timestamp fragment for filenames
Signature:
Private Function BuildTimestamp() As String
DefaultTemplate #
Provide fallback filename template
Signature:
Private Function DefaultTemplate(ByVal exportNumber As Long) As String
WorkbookBaseName #
Remove Excel extensions from workbook name
Signature:
Private Function WorkbookBaseName(ByVal workbook As Workbook) As String
LogInfo #
Append informational diagnostics to the Checking log
Signature:
Private Sub LogInfo(ByVal label As String, Optional ByVal scope As Byte = checkingInfo)
Error Handling
ThrowError #
Raise a ProjectError coded runtime error
Signature:
Private Sub ThrowError(ByVal errNumb As Long, ByVal errorMessage As String)
Used in (22 file(s))
- ExportButton.cls
- ILLExporter.cls
- LLExporter.cls
- DesignerImportService.cls
- IDesignerImportService.cls
- ILLExport.cls
- LLExport.cls
- ILinelistSpecs.cls
- Linelist.cls
- LinelistSpecs.cls
- EventSetup.cls
- IEventSetup.cls
- SetupImportService.cls
- EventsLinelistButtons.bas
- FormLogicExport.bas
- FormLogicExportMig.bas
- SetupHelpers.bas
- TestLLExporter.bas
- TestLLExport.bas
- LinelistSpecsWorkbookStub.cls
- LLVarContextSpecsStub.cls
- TableSpecsLinelistStub.cls