New to Telerik Document Processing? Start a free 30-day trial

Provides utility methods for calculating cell content sizes, column widths, and layout boxes within a worksheet.

Definition

Namespace:Telerik.Documents.Spreadsheet.Layout

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public static class LayoutHelper

Inheritance: objectLayoutHelper

Methods

Calculates the size required to render the content of the specified cell, accounting for text wrapping and formatting.

C#
public static Size CalculateCellContentSize(Worksheet worksheet, CellIndex cellIndex)
Parameters:worksheetWorksheet

The worksheet.

cellIndexCellIndex

Index of the cell.

Returns:

Size

The size of the cell content.

Calculates the size required to render the content of the cell at the specified row and column, accounting for text wrapping and formatting.

C#
public static Size CalculateCellContentSize(Worksheet worksheet, int rowIndex, int columnIndex)
Parameters:worksheetWorksheet

The worksheet.

rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

Size

The size of the cell content.

Calculates the positioned layout box for the specified cell, handling merged cell regions when present.

C#
public static CellLayoutBox CalculateCellLayoutBox(Worksheet worksheet, CellIndex cellIndex)
Parameters:worksheetWorksheet

The worksheet.

cellIndexCellIndex

Index of the cell.

Returns:

CellLayoutBox

The cell layout box.

Calculates the positioned layout box for the cell at the specified row and column, handling merged cell regions when present.

C#
public static CellLayoutBox CalculateCellLayoutBox(Worksheet worksheet, int rowIndex, int columnIndex)
Parameters:worksheetWorksheet

The worksheet.

rowIndexint

Index of the row.

columnIndexint

Index of the column.

Returns:

CellLayoutBox

The cell layout box.