ClosedXML / ClosedXML/ClosedXML.Report

BUG - row height issues, and changed named region Print_Titles value after generation

Open
#397 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
647
Forks
122
PR merge metrics
No merged PRs in 30d

Description

**Description:**

- We have an unstandard XLSX form (with merged cells, validations, conditional formatting, and repeating title at printing).
- Generating the data is OK
- **But there are numerous issues with the output**
- Inside the XLSX | Formulas | Name Manager - the Print_Titles region no more refers to the $2:$4 lines (although if I open the XLSX | Page Layout | Print Titles - i still see $2:$4 (PRint_Areas adjusted just fine)
- ~~Rows from 64 to 200-ish got hidden (or have 0 height) - whereas row 64 should be part of the print (bottom margin)~~ My mistake: the hidden rows were part of the original template, although not sure if they are pushed down when new rows are inserted to the tables...
- For some reason, when the 2nd table generation finished, all the rows below started to have extra heights - when I do insert rows in the SAMPLE Excel manually, everything shifts as expected
- In some cases, despite this setup, if something changed in the XLSX (outside the tables and regions defined for templating) the 2nd table row heights shrunk to 1/2 (like if I'd called auto adjust)...

If then protected for tersting via pwd: 0000

Notes:
- The Named Regions (Contacts/Employees) into which I do generate the data are a 2-row region (entire rows, so original ref. like $46:$47)
- Adding an extra row does not help either, and the output is non-deterministic...and row hiding occurs there too - see last screenshot(s)

--

Output:
Image

Sample XLSX:
[Annual Questionnaire - TX - SAMPLE.xlsx](https://github.com/user-attachments/files/22026791/Annual.Questionnaire.-.TX.-.SAMPLE.xlsx)

Sample app:
[ClosedXml.Report.Issue01.zip](https://github.com/user-attachments/files/22026792/ClosedXml.Report.Issue01.zip)

Extra screenshots:

Image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.