public class SpreadsheetContent extends Content implements IEncryptable
Learn more:
The following example demonstrates how to load and save Excel content of any supported type.
SpreadsheetLoadOptions loadOptions = new SpreadsheetLoadOptions(); Watermarker watermarker = new Watermarker("D:\\input.xls", loadOptions); // Use add method to add watermark to a particular or all worksheets. // Save changes. watermarker.save("D:\\output.xls"); watermarker.close();
| Constructor and Description |
|---|
SpreadsheetContent(StreamContainer stream,
StrategyManager<Integer> strategyManager,
com.aspose.cells.FileFormatInfo fileFormatInfo,
SpreadsheetLoadOptions spreadsheetLoadOptions,
WatermarkerSettings watermarkerSettings) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Watermark watermark,
WatermarkOptions options) |
void |
addModernWordArtWatermark(TextWatermark watermark,
SpreadsheetShapeSettings shapeSettings) |
void |
addWatermark(Watermark watermark,
SpreadsheetShapeSettings shapeSettings,
ISpreadsheetWatermarkEffects effects) |
void |
addWatermarkAsBackground(Watermark watermark,
int backgroundWidth,
int backgroundHeight) |
void |
addWatermarkIntoHeaderFooter(Watermark watermark) |
void |
decrypt()
Decrypts the document.
|
protected void |
dispose(boolean disposing)
Releases all resources used by the
SpreadsheetContent |
void |
encrypt(String password)
Encrypts the content.
|
void |
generatePreview(PreviewOptions previewOptions) |
com.aspose.cells.Workbook |
getAsposeCellsWorkbook() |
IDocumentInfo |
getDocumentInfo() |
FileType |
getFileType() |
SpreadsheetWorksheetCollection |
getWorksheets()
Gets the collection of all worksheets of this
. |
void |
performSave(OutputStream stream) |
void |
performSave(OutputStream stream,
SaveOptions saveOptions) |
void |
performSave(String filePath) |
void |
performSave(String filePath,
SaveOptions saveOptions) |
close, dispose, getInfo, getInfo, getSearchableObjects, getStream, getWatermarkerSettings, registerDisposableResource, save, save, save, save, setSearchableObjectsaddWatermark, afterWatermarkAdding, checkWatermarkingLicenseRestrictions, findImages, findImages, getParts, getSearchWatermarksInParts, getStrategyManager, getTopParent, search, search, setParts, tryGetWatermarkerSettingspublic SpreadsheetContent(StreamContainer stream, StrategyManager<Integer> strategyManager, com.aspose.cells.FileFormatInfo fileFormatInfo, SpreadsheetLoadOptions spreadsheetLoadOptions, WatermarkerSettings watermarkerSettings)
public void add(Watermark watermark, WatermarkOptions options)
public final void addModernWordArtWatermark(TextWatermark watermark, SpreadsheetShapeSettings shapeSettings)
public final void addWatermark(Watermark watermark, SpreadsheetShapeSettings shapeSettings, ISpreadsheetWatermarkEffects effects)
public final void addWatermarkAsBackground(Watermark watermark, int backgroundWidth, int backgroundHeight)
public final void addWatermarkIntoHeaderFooter(Watermark watermark)
public final void decrypt()
Decrypts the document.
decrypt in interface IEncryptableprotected void dispose(boolean disposing)
Releases all resources used by the SpreadsheetContent
public final void encrypt(String password)
Encrypts the content.
encrypt in interface IEncryptablepassword - The password that will be required to open the document.public void generatePreview(PreviewOptions previewOptions)
generatePreview in class Contentpublic final com.aspose.cells.Workbook getAsposeCellsWorkbook()
public IDocumentInfo getDocumentInfo()
getDocumentInfo in class Contentpublic FileType getFileType()
getFileType in class Contentpublic final SpreadsheetWorksheetCollection getWorksheets()
SpreadsheetContent.SpreadsheetContent.public void performSave(OutputStream stream)
performSave in class Contentpublic void performSave(OutputStream stream, SaveOptions saveOptions)
performSave in class Contentpublic void performSave(String filePath)
performSave in class Contentpublic void performSave(String filePath, SaveOptions saveOptions)
performSave in class ContentCopyright © 2026. All rights reserved.