Summary
Excel extends a sheet's printed range to columns that carry formatting even when they hold
no cell value: a row-level customFormat style whose fill spans a trailing empty column
makes that column part of every printed page. office2pdf derives the printed range from
populated cells only, so a formatted-but-empty trailing column and its fill band are
dropped from the output entirely.
Measured
NumberFormatTests.xlsx Tests sheet, row 1 (customFormat style s=3, orange fill): GT
prints an empty 64pt column E on every one of the sheet's 8 pages, with the A1:E1 header
fill band spanning 461pt. office2pdf prints columns A–D only; the fill band measures 396pt.
|
GT (Excel) |
office2pdf |
| printed columns |
A–E |
A–D |
| header fill band width |
461pt |
396pt |
| empty formatted column E |
64pt, present |
absent |
Reproduction
cargo run -p office2pdf-cli -- tests/fixtures/xlsx/poi/NumberFormatTests.xlsx -o out.pdf
mutool draw -F trace -o - out.pdf 2 | grep fill_path # header band 396pt; GT 461pt incl. column E
Expected
The printed range includes formatted-but-empty trailing columns, as Excel prints them.
Actual
Only populated columns print: the formatted empty column and its header fill vanish.
Related: #621
Found in: the #621 fix-PR visual audit (NumberFormatTests.xlsx Tests sheet p1, local Excel-for-Mac GT, 150 DPI, 2026-07-30). Visual comparison below.
Visual comparison
| Compare |
 |
GT left (Letter), office2pdf right (A4), 150 DPI, Tests sheet page 1.
Summary
Excel extends a sheet's printed range to columns that carry formatting even when they hold
no cell value: a row-level
customFormatstyle whose fill spans a trailing empty columnmakes that column part of every printed page. office2pdf derives the printed range from
populated cells only, so a formatted-but-empty trailing column and its fill band are
dropped from the output entirely.
Measured
NumberFormatTests.xlsxTests sheet, row 1 (customFormatstyle s=3, orange fill): GTprints an empty 64pt column E on every one of the sheet's 8 pages, with the A1:E1 header
fill band spanning 461pt. office2pdf prints columns A–D only; the fill band measures 396pt.
Reproduction
Expected
The printed range includes formatted-but-empty trailing columns, as Excel prints them.
Actual
Only populated columns print: the formatted empty column and its header fill vanish.
Related: #621
Found in: the #621 fix-PR visual audit (NumberFormatTests.xlsx Tests sheet p1, local Excel-for-Mac GT, 150 DPI, 2026-07-30). Visual comparison below.
Visual comparison
GT left (Letter), office2pdf right (A4), 150 DPI, Tests sheet page 1.