@Deprecated public class CellsWorksheet extends DocumentPart
Represents an Excel document worksheet.
Modifier and Type | Method and Description |
---|---|
void |
addImageWatermark(ImageWatermark watermark,
CellsImageEffects effects)
Deprecated.
Adds an image watermark to this
CellsWorksheet . |
void |
addImageWatermark(ImageWatermark watermark,
CellsImageEffects effects,
CellsShapeSettings shapeSettings)
Deprecated.
Adds an image watermark to this
CellsWorksheet . |
void |
addModernWordArtWatermark(TextWatermark watermark)
Deprecated.
Adds a rectangular shape with text inside to this
CellsWorksheet . |
void |
addModernWordArtWatermark(TextWatermark watermark,
CellsShapeSettings shapeSettings)
Deprecated.
Adds a rectangular shape with text inside to this
CellsWorksheet . |
void |
addTextWatermark(TextWatermark watermark,
CellsTextEffects effects)
Deprecated.
Adds a text watermark to this
CellsWorksheet . |
void |
addTextWatermark(TextWatermark watermark,
CellsTextEffects effects,
CellsShapeSettings shapeSettings)
Deprecated.
Adds a text watermark to this
CellsWorksheet . |
void |
addWatermark(Watermark watermark,
CellsShapeSettings shapeSettings)
Deprecated.
Adds a watermark to this
CellsWorksheet . |
void |
addWatermarkAsBackground(Watermark watermark)
Deprecated.
Adds a watermark to the worksheet as background.
|
void |
addWatermarkAsBackground(Watermark watermark,
int backgroundWidth,
int backgroundHeight)
Deprecated.
Adds a watermark to the worksheet as background.
|
void |
addWatermarkIntoHeaderFooter(Watermark watermark)
Deprecated.
Adds a watermark into the header or footer of this
CellsWorksheet . |
CellsAttachmentCollection |
getAttachments()
Deprecated.
Gets the collection of all attachments of this
CellsWorksheet . |
CellsWatermarkableImage |
getBackgroundImage()
Deprecated.
Gets the background image of this
CellsWorksheet . |
CellsChartCollection |
getCharts()
Deprecated.
Gets the collection of all charts of this
CellsWorksheet . |
double |
getColumnWidth(int column)
Deprecated.
Gets the width of the specified column in points.
|
int |
getColumnWidthPx(int column)
Deprecated.
Gets the width of the specified column in pixels.
|
double |
getContentAreaHeight()
Deprecated.
Gets the height of the content area in points.
|
int |
getContentAreaHeightPx()
Deprecated.
Gets the height of the content area in pixels.
|
double |
getContentAreaWidth()
Deprecated.
Gets the width of the content area in points.
|
int |
getContentAreaWidthPx()
Deprecated.
Gets the width of the content area in pixels.
|
CellsHeaderFooterCollection |
getHeadersFooters()
Deprecated.
Gets the collection of worksheet headers and footers.
|
CellsPageSetup |
getPageSetup()
Deprecated.
Gets the printing page setup for this
CellsWorksheet . |
double |
getRowHeight(int row)
Deprecated.
Gets the height of the specified row in points.
|
int |
getRowHeightPx(int row)
Deprecated.
Gets the height of the specified row in pixels.
|
CellsShapeCollection |
getShapes()
Deprecated.
Gets the collection of all shapes of this
CellsWorksheet . |
void |
setBackgroundImage(CellsWatermarkableImage value)
Deprecated.
Sets the background image of this
CellsWorksheet . |
addWatermark, findImages, findImages, findWatermarks, findWatermarks
public final CellsPageSetup getPageSetup()
Gets the printing page setup for this CellsWorksheet
.
public final double getContentAreaWidth()
Gets the width of the content area in points.
public final int getContentAreaWidthPx()
Gets the width of the content area in pixels.
public final double getContentAreaHeight()
Gets the height of the content area in points.
public final int getContentAreaHeightPx()
Gets the height of the content area in pixels.
public final CellsShapeCollection getShapes()
Gets the collection of all shapes of this CellsWorksheet
.
CellsWorksheet
.public final CellsAttachmentCollection getAttachments()
Gets the collection of all attachments of this CellsWorksheet
.
CellsWorksheet
.public final CellsChartCollection getCharts()
Gets the collection of all charts of this CellsWorksheet
.
CellsWorksheet
.public final CellsWatermarkableImage getBackgroundImage()
Gets the background image of this CellsWorksheet
.
CellsWorksheet
.
Returns null if the worksheet has no background image.
This example demonstrates how to set the background image for a worksheet.
CellsDocument document = Document.load(CellsDocument.class, "D:\\input.xls"); File file = new File("D:\\background.jpg"); byte[] imageBytes = new byte[(int)file.length()]; InputStream inputStream = new FileInputStream(file); inputStream.read(imageBytes); inputStream.close(); // Set the background image. document.getWorksheets().get_Item(0).setBackgroundImage(new CellsWatermarkableImage(imageBytes)); // Save changes. document.save("D:\\output.xls"); document.close();
public final void setBackgroundImage(CellsWatermarkableImage value)
Sets the background image of this CellsWorksheet
.
value
- The background image of this CellsWorksheet
.
Returns null if the worksheet has no background image.
This example demonstrates how to set the background image for a worksheet.
CellsDocument document = Document.load(CellsDocument.class, "D:\\input.xls"); File file = new File("D:\\background.jpg"); byte[] imageBytes = new byte[(int)file.length()]; InputStream inputStream = new FileInputStream(file); inputStream.read(imageBytes); inputStream.close(); // Set the background image. document.getWorksheets().get_Item(0).setBackgroundImage(new CellsWatermarkableImage(imageBytes)); // Save changes. document.save("D:\\output.xls"); document.close();
public final CellsHeaderFooterCollection getHeadersFooters()
Gets the collection of worksheet headers and footers.
This example demonstrates how to insert image in a particular header/footer.
public final double getColumnWidth(int column)
Gets the width of the specified column in points.
column
- The column index.public final int getColumnWidthPx(int column)
Gets the width of the specified column in pixels.
column
- The column index.public final double getRowHeight(int row)
Gets the height of the specified row in points.
row
- The row index.public final int getRowHeightPx(int row)
Gets the height of the specified row in pixels.
row
- The row index.public final void addWatermark(Watermark watermark, CellsShapeSettings shapeSettings)
Adds a watermark to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The watermark to add to the worksheet.shapeSettings
- Settings that should be applied to the watermark.public final void addImageWatermark(ImageWatermark watermark, CellsImageEffects effects, CellsShapeSettings shapeSettings)
Adds an image watermark to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The image watermark to add to the worksheet.effects
- Image effects that should be applied to the watermark.shapeSettings
- Shape settings that should be applied to the watermark.public final void addImageWatermark(ImageWatermark watermark, CellsImageEffects effects)
Adds an image watermark to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The image watermark to add to the worksheet.effects
- Image effects that should be applied to the watermark.public final void addTextWatermark(TextWatermark watermark, CellsTextEffects effects, CellsShapeSettings shapeSettings)
Adds a text watermark to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The text watermark to add to the worksheet.effects
- Text effects that should be applied to the watermark.shapeSettings
- Shape settings that should be applied to the watermark.public final void addTextWatermark(TextWatermark watermark, CellsTextEffects effects)
Adds a text watermark to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The text watermark to add to the worksheet.effects
- Text effects that should be applied to the watermark.public final void addWatermarkAsBackground(Watermark watermark, int backgroundWidth, int backgroundHeight)
Adds a watermark to the worksheet as background. This method assumes that watermark offset and size are measured in pixels (if they are assigned). Backgrounds are viewable in Normal View in worksheet, and are invisible in Page Layout mode. The image is automatically tiled on the background of the worksheet.
watermark
- The watermark to add to the worksheet.backgroundWidth
- Desired width of the background image in pixels.backgroundHeight
- Desired height of the background image in pixels.
public final void addWatermarkAsBackground(Watermark watermark)
Adds a watermark to the worksheet as background. This method assumes that watermark offset and size are measured in pixels (if they are assigned). Backgrounds are viewable in Normal View in worksheet, and are invisible in Page Layout mode. The image is automatically tiled on the background of the worksheet.
watermark
- The watermark to add to the worksheet.
public final void addWatermarkIntoHeaderFooter(Watermark watermark)
Adds a watermark into the header or footer of this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
You’ll see the watermark in Excel only when you’re in Page Layout view or Print Preview.
watermark
- The watermark to add to the worksheet.public final void addModernWordArtWatermark(TextWatermark watermark, CellsShapeSettings shapeSettings)
Adds a rectangular shape with text inside to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The text watermark to add to the worksheet.shapeSettings
- Settings that should be applied to a shape watermark.public final void addModernWordArtWatermark(TextWatermark watermark)
Adds a rectangular shape with text inside to this CellsWorksheet
.
This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The text watermark to add to the worksheet.