Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clear table placeholders when data is empty #344

Merged
merged 6 commits into from
Apr 11, 2024

Conversation

smakaiberriesandco
Copy link
Contributor

@smakaiberriesandco smakaiberriesandco changed the title chore: update closed xml include .net 8 to target fw chore: update ClosedXML pkg include .net 8 to target fw Feb 1, 2024
@smakaiberriesandco smakaiberriesandco changed the title chore: update ClosedXML pkg include .net 8 to target fw fix: update ClosedXML pkg, include .net 8 to target fw, fix empty tables Feb 2, 2024
@smakaiberriesandco
Copy link
Contributor Author

when generating excel from a template with an empty list it throws an exception: ClosedXML.Excel.Exceptions.EmptyTableException: Table 'Table1' should have at least 1 row.

I updated the commit to fix that issue too.

@smakaiberriesandco smakaiberriesandco changed the title fix: update ClosedXML pkg, include .net 8 to target fw, fix empty tables fix: clear table placeholders when data is empty Feb 14, 2024
@smakaiberriesandco
Copy link
Contributor Author

Apologies for any confusion caused earlier (The exception mentioned above occurs only when the table range is one row larger than the row containing the placeholders).

So when table range is correct and we provide an empty list to the table, the results still display the placeholders:
image
With my modifications, the table rows are now cleared:
image
Test created, All tests have been successfully executed.

@Pankraty Pankraty added this to the 0.2.10 milestone Apr 11, 2024
@Pankraty Pankraty added the bug label Apr 11, 2024
@Pankraty Pankraty merged commit 7dbb3bb into ClosedXML:develop Apr 11, 2024
1 check passed
@Pankraty
Copy link
Member

Thanks for the contribution and sorry it took me so long!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants