xlsx sheet help schema marks page-setup properties "set": false, but set applies them
Author: rpinckneCreated Sep 24, 2026Updated Sep 26, 2026
OfficeCLI 1.0.152 (linux-x64). In schemas/help/xlsx/sheet.json, the properties orientation, paperSize, fitToPage and margin.top|bottom|left|right|header|footer are declared with "set": false, so they look read-only.
In practice they can all be set:
ExcelHandler.Set.Sheet.cshandles every one of them.examples/excel/sheet-settings.shsets them the same way.
Clients that read the help schema to decide what is settable therefore end up rewriting sheet XML by hand, or stop using OfficeCLI for page setup.
Repro
This uses a workbook with one sheet named Cash.
officecli set a.xlsx /Cash --prop orientation=landscape --prop paperSize=9 --prop fitToPage=1x0 --prop margin.left=0.5in --prop printArea=A1:M29
# Updated /Cash: orientation=landscape, paperSize=9, fitToPage=1x0, margin.left=0.5in, printArea=A1:M29 (exit 0)
officecli get a.xlsx /Cash
# /Cash (sheet) orientation=landscape paperSize=9 fitToPage=1x0 printArea=A1:M29 margin.left=0.5in ...
echo '[{"command":"set","path":"/Cash","props":{"orientation":"landscape","paperSize":"1","fitToPage":"1x0","margin.top":"0.75in"}}]' | officecli batch b.xlsx --json --stop-on-error
# success: 1/1Reading the result back with openpyxl confirms every value was written:
- orientation is
landscape; - paperSize is 9, or 1 for the batch file;
fitToPageisTrue, with fitToWidth 1 and fitToHeight 0;- the margins are as set;
- the print area is
'Cash'!$A$1:$M$29.
Expected
These properties are marked "set": true in sheet.json, matching what the handler actually supports.
Source: iOfficeAI/OfficeCLI