Summary
When a merged cell has textRotation=90 (vertical text), officecli renders the first row of the merged range at approximately 4x its specified height, even though customHeight="1" is set in the row dimensions XML.
Steps to reproduce
Script to create reproduction Excels:
create_repro.py
pip install openpyxl
python create_repro.py
echo "=== Rendering with textRotation=90 ==="
officecli view repro.xlsx screenshot --out repro_rotated.png --range "Sheet1!A1:I14"
echo "Output: repro_rotated.png"
echo ""
echo "=== Rendering without textRotation ==="
officecli view repro_no_rotation.xlsx screenshot --out repro_no_rotation.png --range "Sheet1!A1:I14"
echo "Output: repro_no_rotation.png"
This creates two workbooks:
repro.xlsx — merged cell I3:I12 with textRotation=90
repro_no_rotation.xlsx — same layout, textRotation=0
Expected behavior
Both files should render with identical row heights. The row height is explicitly set to 15pt with customHeight=true — the renderer should respect it regardless of text rotation.
Actual behavior
In repro.xlsx, row 3 (the first row of the merged range) renders at ~4x normal height. The text content ("Category Label") is short enough to fit within the merge vertically, so there is no reason for height expansion.
Removing textRotation=90 (keeping everything else identical) renders correctly.
Summary
When a merged cell has
textRotation=90(vertical text), officecli renders the first row of the merged range at approximately 4x its specified height, even thoughcustomHeight="1"is set in the row dimensions XML.Steps to reproduce
Script to create reproduction Excels:
create_repro.py
This creates two workbooks:
repro.xlsx— merged cell I3:I12 withtextRotation=90repro_no_rotation.xlsx— same layout,textRotation=0Expected behavior
Both files should render with identical row heights. The row height is explicitly set to 15pt with
customHeight=true— the renderer should respect it regardless of text rotation.Actual behavior
In
repro.xlsx, row 3 (the first row of the merged range) renders at ~4x normal height. The text content ("Category Label") is short enough to fit within the merge vertically, so there is no reason for height expansion.Removing
textRotation=90(keeping everything else identical) renders correctly.