Workbook

Overview

Workbook is a class in Aspose.Cells FOSS for Java. Inherits from: AutoCloseable.

Represents an Excel workbook.

Properties

NameTypeAccessDescription
worksheetsWorksheetCollectionReadReturns the worksheets.
settingsWorkbookSettingsReadReturns the settings.
propertiesWorkbookPropertiesReadReturns the properties.
documentPropertiesDocumentPropertiesReadReturns the document properties.
definedNamesDefinedNameCollectionReadReturns the defined names.
loadDiagnosticsLoadDiagnosticsReadReturns the load diagnostics.

Methods

SignatureDescription
Workbook()Initializes a new Workbook instance.
Workbook(fileName: String)Initializes a new Workbook instance.
Workbook(stream: InputStream)Initializes a new Workbook instance.
Workbook(fileName: String, options: LoadOptions)Initializes a new Workbook instance.
Workbook(stream: InputStream, options: LoadOptions)Initializes a new Workbook instance.
getWorksheets()WorksheetCollectionReturns the worksheets.
getSettings()WorkbookSettingsReturns the settings.
getProperties()WorkbookPropertiesReturns the properties.
getDocumentProperties()DocumentPropertiesReturns the document properties.
getDefinedNames()DefinedNameCollectionReturns the defined names.
getLoadDiagnostics()LoadDiagnosticsReturns the load diagnostics.
save(fileName: String)Saves the workbook to a file path (XLSX format).
save(fileName: String, format: SaveFormat)Saves the workbook to a file path with the given format.
save(fileName: String, options: SaveOptions)Saves the workbook to a file path with the given options.
save(stream: OutputStream, format: SaveFormat)Saves the workbook to a stream with the given format.
save(stream: OutputStream, options: SaveOptions)Saves the workbook to a stream with the given options.
close()Releases any resources associated with this instance.