1c-mxl-compile

Generates 1C spreadsheet Template.xml files from a JSON layout definition.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/pavelvdo/universal-xml-exchange2 --skill 1c-mxl-compile-pavelvdo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1c-mxl-compile
Source: https://github.com/pavelvdo/universal-xml-exchange2/tree/main/.cursor/skills/1c-mxl/compile
Command: npx skills add https://github.com/pavelvdo/universal-xml-exchange2 --skill 1c-mxl-compile-pavelvdo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Writing 1C spreadsheet document layouts (MXL/Template.xml) by hand is error-prone: palette indices, merges, namespaces, and format references must all stay consistent. This Skill lets you describe the print form layout in a compact JSON DSL and compiles it into a correct Template.xml automatically. ## Core Features & Use Cases - JSON-to-XML compilation: Converts a JSON definition with areas, rows, cells, fonts, and styles into a valid 1C Template.xml with proper palettes and namespaces. - Automatic layout calculation: Supports page formats like A4-landscape and proportional column widths ("Nx") with automatic defaultWidth computation. - Merges and named areas: Handles horizontal/vertical cell merging (span, rowspan), rowStyle gap-filling, and named row areas for template parameters. - Use Case: You receive a scanned print form from a customer. You define its columns, styles, and areas in JSON, run the compiler, then verify the result with 1c-mxl-validate and 1c-mxl-info. ## Quick Start Ask the assistant to compile your JSON layout definition into a 1C Template.xml by running the 1c-mxl-compile command with your JSON file path and desired output path.

Frequently Asked Questions about 1c-mxl-compile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a 1C print form template from JSON?

Write a JSON definition with columns, fonts, styles, and areas, then run the mxl-compile.ps1 PowerShell script with -JsonPath and -OutputPath parameters. It produces a valid Template.xml with correct palettes, merges, and namespaces.

What is the JSON DSL structure for 1C spreadsheet layouts?

The JSON contains columns, page, defaultWidth, columnWidths, fonts, styles, and areas. Each area has rows with cells specifying col, span, rowspan, style, and content via param, text, or template fields.

Does the compiler support automatic column width calculation?

Yes. Set the page field to A4-landscape, A4-portrait, or a numeric target width, and use proportional "Nx" values in columnWidths. The script computes defaultWidth so the total layout fits the page.

How are cell merges and rowspans handled in the layout?

Use span for horizontal merging and rowspan for vertical merging in cell definitions. The compiler tracks occupied columns across rows, generates merge elements, and adjusts rowStyle gap-filling around merged regions.

How do I verify the generated Template.xml is correct?

After compiling, run the companion 1c-mxl-validate skill to check XML correctness and 1c-mxl-info to inspect the structure. The compiler also prints a summary with area, row, font, and merge counts.