analyze()
function analyze(templateBuffer): Promise<ParsedTemplate>;
Defined in: src/index.ts:383
Analyze a template file and return its full parsed model (including the underlying ExcelJS workbook). Useful for tooling that needs to inspect template internals.
Parameters
| Parameter | Type |
|---|---|
templateBuffer | ArrayBuffer |
Returns
Promise<ParsedTemplate>
Stable
The entry point itself is frozen at 1.0 (per
spec/STABILITY.md "Public API surface"). The return type
ParsedTemplate is @experimental: it exposes internal model
shapes (Directive, DataBlock, SheetTemplate) and the live
ExcelJS.Workbook, which MAY change between minor versions.
For a stable serializable view, prefer
analyzeModel (which returns TemplateModel).
Example
const parsed = await analyze(templateBuffer);
console.log(parsed.meta.name, parsed.sheetTemplates.length);