IDiseaseExportWorkbook
Lifecycle
EnsureWorkbook #
Ensure a workbook instance is available for exports.
Signature:
Public Function EnsureWorkbook(ByVal excelApp As Application) As Workbook
Parameters:
excelApp: Application host used to create the workbook.
Returns: Workbook ready for export operations.
SaveAs #
Persist the workbook to disk.
Signature:
Public Sub SaveAs(ByVal filePath As String, _
Optional ByVal fileFormat As XlFileFormat = xlOpenXMLWorkbook, _
Optional ByVal createBackup As Boolean = False)
Parameters:
filePath: String destination path.fileFormat: Optional XlFileFormat. Defaults to xlOpenXMLWorkbook.createBackup: Optional Boolean. Defaults to False.
Close #
Close the workbook and clear references.
Signature:
Public Sub Close(Optional ByVal saveChanges As Boolean = False)
Parameters:
saveChanges: Optional Boolean controlling SaveChanges flag.
Release #
Release the workbook without saving, ensuring references are cleared.
Signature:
Public Sub Release()