본문으로 건너뛰기

readTemplateInputs()

function readTemplateInputs(templateBuffer, options?): Promise<InputSpec[]>;

Defined in: src/index.ts:340

Inspect a template's runtime input declarations without running a conversion. Hosts use this to render an input form before the host has a source workbook to convert.

Parameters

ParameterType
templateBufferArrayBuffer
options?{ engine?: "auto" | "wasm" | "js"; }
options.engine?"auto" | "wasm" | "js"

Returns

Promise<InputSpec[]>

Stable

Frozen at 1.0.

Example

const inputs = await readTemplateInputs(templateBuffer);
for (const input of inputs) {
console.log(input.name, input.type, input.required);
}