メインコンテンツへスキップ

preview()

function preview(
templateBuffer,
sourceBuffer,
options?): Promise<PreviewResult>;

Defined in: impl/js/src/index.ts:380

Preview what conversion will produce without generating full files.

Returns the planned filenames, sheet names, row counts, declared inputs, and warnings the host should surface to the operator. Cheaper than convert() because it does not serialize output workbooks.

Parameters​

ParameterType
templateBufferArrayBuffer
sourceBufferArrayBuffer
options?ConvertOptions

Returns​

Promise<PreviewResult>

Stable​

Frozen at 1.0.

Example​

const result = await preview(templateBuffer, sourceBuffer, {
inputs: { month: '2026-05' },
});
console.log(result.files, result.warnings);