public class SpreadsheetContent extends Content
Represents an Excel document where a watermark can be placed.
This 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();
Modifier and Type | Method and Description |
---|---|
void |
decrypt()
Decrypts the document.
|
void |
encrypt(String password)
Encrypts the content.
|
SpreadsheetWorksheetCollection |
getWorksheets()
Gets the collection of all worksheets of this
SpreadsheetContent . |
void |
performSave(OutputStream stream)
Saves the document to the specified stream.
|
void |
performSave(OutputStream stream,
SaveOptions saveOptions)
Saves the document to the specified stream.
|
findImages, findImages, search, search
public final SpreadsheetWorksheetCollection getWorksheets()
Gets the collection of all worksheets of this SpreadsheetContent
.
SpreadsheetContent
.public final void encrypt(String password)
Encrypts the content.
password
- The password that will be required to open the document.public final void decrypt()
Decrypts the document.
public void performSave(OutputStream stream)
Saves the document to the specified stream.
performSave
in class Content
stream
- The stream to save the document data to.public void performSave(OutputStream stream, SaveOptions saveOptions)
Saves the document to the specified stream.
performSave
in class Content
stream
- The stream to save the document data to.saveOptions
- The options tha should be used when saving the content data.Copyright © 2020. All rights reserved.