@sheetwrite/core/adapterfunction
Converts simple columns and row objects into canonical workbook and columnar input.
- Package
@sheetwrite/core/adapter- Source
packages/core/src/adapter.ts#L281
Declaration
function createSimpleGridInput< Row extends Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →>,>(options: SimpleSheetwriteOptionsinterface SimpleSheetwriteOptions<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> {
columns: readonly SimpleColumn<Row>[];
defaultRows: readonly Row[];
sheetName?: string;
getRowId?: (row: Row, index: number) => Id;
createRowId?: RowBridgeOptions<Row, Id>["createRowId"];
}interface SimpleSheetwriteOptions<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> {
columns: readonly SimpleColumn<Row>[];
defaultRows: readonly Row[];
sheetName?: string;
getRowId?: (row: Row, index: number) => Id;
createRowId?: RowBridgeOptions<Row, Id>["createRowId"];
}interface SimpleSheetwriteOptions<
Row extends Record<
string,
CellScalar
>,
Id extends RowBridgeId =
RowBridgeId,
> {
columns: readonly SimpleColumn<Row>[];
defaultRows: readonly Row[];
sheetName?: string;
getRowId?: (
row: Row,
index: number,
) => Id;
createRowId?: RowBridgeOptions<
Row,
Id
>["createRowId"];
}Framework-neutral simple columns, rows, sizing, and grid options.API reference →<Row>): SimpleGridInputinterface SimpleGridInput {
workbook: Workbook;
data: ColumnarData;
presentation: "data-grid";
}interface SimpleGridInput {
workbook: Workbook;
data: ColumnarData;
presentation: "data-grid";
}interface SimpleGridInput {
workbook: Workbook;
data: ColumnarData;
presentation: "data-grid";
}Normalized workbook and columnar data produced from simple adapter props.API reference →