SheetScope

class SheetScope(driver: ExcelDriver, defaultStyle: ExcelStyle? = null) : BaseScope

Scope for creating a sheet.

Supports column configuration, individual rows, and high-performance streaming of row sequences.

Parameters

driver

the underlying ExcelDriver

defaultStyle

the style inherited from workbook or sheet level

Constructors

Link copied to clipboard
constructor(driver: ExcelDriver, defaultStyle: ExcelStyle? = null)

Properties

Link copied to clipboard

The zero-based index of the next row to be processed in this sheet.

Functions

Link copied to clipboard
fun columnWidth(vararg widths: Pair<Int, Int>)

Configures widths for specific columns.

Link copied to clipboard
fun mergeCells(firstRow: Int, lastRow: Int, firstCol: Int, lastCol: Int)

Merges a range of cells within this sheet.

Link copied to clipboard
inline fun <T> nativeSheet(crossinline block: (T) -> Unit)

Provides access to the underlying native sheet object.

Link copied to clipboard
fun row(rowNum: Int? = null, height: Double? = null, style: ExcelStyle? = null, init: RowScope.() -> Unit)

Defines a single row.

Link copied to clipboard
fun <T> rows(data: Iterable<T>, height: Double? = null, style: ExcelStyle? = null, init: RowScope.(T) -> Unit)

Creates rows from an Iterable (e.g., List, Set).

fun <T> rows(data: Sequence<T>, height: Double? = null, style: ExcelStyle? = null, init: RowScope.(T) -> Unit)

Creates rows from a Sequence for high-performance, memory-efficient streaming.

Link copied to clipboard
fun skipRows(count: Int = 1)

Skips the specified number of rows.