Workbook

Overview

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

Represents an Excel workbook.

This class provides 10 methods for working with Workbook objects in Java programs. Available methods include: Workbook, close, getCalculationProperties, getDefinedNames, getDocumentProperties, getLoadDiagnostics, getProperties, getSettings, getWorksheets, save. All exported members are accessible to any Java application after installing the Aspose.Cells FOSS for Java package. Properties: calculationProperties, definedNames, documentProperties, loadDiagnostics, properties, settings, and 1 more.

Properties

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

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.
getCalculationProperties()CalculationPropertiesReturns the workbook calculation properties.
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.

See Also