---
Product: Aspose.Slides
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/java/icell
---

# ICell

## Overview

`ICell` is an interface in Aspose.Slides FOSS for Java.

Represents a cell in a table.

This interface declares 33 methods for ICell objects in Java programs.
Available methods include: `getAsIPresentationComponent`, `getAsISlideComponent`, `getCellFormat`, `getColSpan`, `getFirstColumn`, `getFirstColumnIndex`, `getFirstRow`, `getFirstRowIndex`, `getHeight`, `getMarginBottom`, `getMarginLeft`, `getMarginRight`, and 21 additional methods.
Public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `anchorCenter`, `asIPresentationComponent`, `asISlideComponent`, `cellFormat`, `colSpan`, `firstColumn`, and 20 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `offsetX` | `double` | Read | Returns a distance from left side of a table to left side of a cell. |
| `offsetY` | `double` | Read | Returns a distance from top side of a table to top side of a cell. |
| `firstRowIndex` | `int` | Read | Returns an index of first row, covered by the cell. |
| `firstColumnIndex` | `int` | Read | Returns an index of first column, covered by the cell. |
| `width` | `double` | Read | Returns the width of the cell. |
| `height` | `double` | Read | Returns the height of the cell. |
| `minimalHeight` | `double` | Read | Returns the minimum height of a cell. |
| `marginLeft` | `double` | Read/Write | Returns or sets the left margin in a TextFrame. |
| `marginRight` | `double` | Read/Write | Returns or sets the right margin in a TextFrame. |
| `marginTop` | `double` | Read/Write | Returns or sets the top margin in a TextFrame. |
| `marginBottom` | `double` | Read/Write | Returns or sets the bottom margin in a TextFrame. |
| `textVerticalType` | `TextVerticalType` | Read/Write | Returns or sets the type of vertical text. |
| `textAnchorType` | `TextAnchorType` | Read/Write | Returns or sets the text anchor type. |
| `anchorCenter` | `boolean` | Read/Write | Determines whether or not text box centered inside a cell. |
| `firstRow` | `IRow` | Read | Gets first row of cell. |
| `firstColumn` | `IColumn` | Read | Gets first column of cell. |
| `colSpan` | `int` | Read | Returns the number of grid columns spanned by the current cell. |
| `rowSpan` | `int` | Read | Returns the number of rows that a merged cell spans. |
| `textFrame` | `ITextFrame` | Read | Returns the text frame of a cell. |
| `table` | `ITable` | Read | Returns the parent Table object for a cell. |
| `mergedCell` | `boolean` | Read | Returns true if the cell is merged with any adjusted cell. |
| `cellFormat` | `ICellFormat` | Read | Returns the CellFormat object that contains formatting properties for this cell. |
| `slide` | `IBaseSlide` | Read | Returns the parent slide of a cell. |
| `presentation` | `IPresentation` | Read | Returns the parent presentation of a cell. |
| `asISlideComponent` | `ISlideComponent` | Read | Returns this cell as {@link ISlideComponent}. |
| `asIPresentationComponent` | `IPresentationComponent` | Read | Returns this cell as {@link IPresentationComponent}. |

## Methods

| Signature | Description |
|-----------|-------------|
| `getOffsetX()` → `double` | Returns a distance from left side of a table to left side of a cell. |
| `getOffsetY()` → `double` | Returns a distance from top side of a table to top side of a cell. |
| `getFirstRowIndex()` → `int` | Returns an index of first row, covered by the cell. |
| `getFirstColumnIndex()` → `int` | Returns an index of first column, covered by the cell. |
| `getWidth()` → `double` | Returns the width of the cell. |
| `getHeight()` → `double` | Returns the height of the cell. |
| `getMinimalHeight()` → `double` | Returns the minimum height of a cell. |
| `getMarginLeft()` → `double` | Returns or sets the left margin in a TextFrame. |
| `setMarginLeft(value: double)` | Sets the left margin. |
| `getMarginRight()` → `double` | Returns or sets the right margin in a TextFrame. |
| `setMarginRight(value: double)` | Sets the right margin. |
| `getMarginTop()` → `double` | Returns or sets the top margin in a TextFrame. |
| `setMarginTop(value: double)` | Sets the top margin. |
| `getMarginBottom()` → `double` | Returns or sets the bottom margin in a TextFrame. |
| `setMarginBottom(value: double)` | Sets the bottom margin. |
| `getTextVerticalType()` → `TextVerticalType` | Returns or sets the type of vertical text. |
| `setTextVerticalType(value: TextVerticalType)` | Sets the type of vertical text. |
| `getTextAnchorType()` → `TextAnchorType` | Returns or sets the text anchor type. |
| `setTextAnchorType(value: TextAnchorType)` | Sets the text anchor type. |
| `isAnchorCenter()` → `boolean` | Determines whether or not text box centered inside a cell. |
| `setAnchorCenter(value: boolean)` | Sets whether text box is centered inside a cell. |
| `getFirstRow()` → `IRow` | Gets first row of cell. |
| `getFirstColumn()` → `IColumn` | Gets first column of cell. |
| `getColSpan()` → `int` | Returns the number of grid columns spanned by the current cell. |
| `getRowSpan()` → `int` | Returns the number of rows that a merged cell spans. |
| `getTextFrame()` → `ITextFrame` | Returns the text frame of a cell. |
| `getTable()` → `ITable` | Returns the parent Table object for a cell. |
| `isMergedCell()` → `boolean` | Returns true if the cell is merged with any adjusted cell. |
| `getCellFormat()` → `ICellFormat` | Returns the CellFormat object that contains formatting properties for this cell. |
| `getSlide()` → `IBaseSlide` | Returns the parent slide of a cell. |
| `getPresentation()` → `IPresentation` | Returns the parent presentation of a cell. |
| `getAsISlideComponent()` → `ISlideComponent` | Returns this cell as {@link ISlideComponent}. |
| `getAsIPresentationComponent()` → `IPresentationComponent` | Returns this cell as {@link IPresentationComponent}. |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)