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

Empty Lists with Applied NumberFormat Throw ArgumentOutOfRangeException #51

Open
a-frazier opened this issue Jan 26, 2016 · 1 comment

Comments

@a-frazier
Copy link

If the formatter receives an empty result set to format, and the object's model has an ExcelColumn attribute applies using the NumberFormat property, the DefaultSerializer will throw an ArgumentOutOfRangeException with the message "Start cell Address must be less or equal to End cell address."

The expected result is an Excel file with only the header row.

Since XlsxDocumentBuilder.FormatColumn skips the header row by default, firstRow is 2 and RowCount is 1 since the list was empty and only the header row is output.

a-frazier pushed a commit to a-frazier/WebApiContrib.Formatting.Xlsx that referenced this issue Jan 26, 2016
@jordangray
Copy link
Member

Ah, awesome! Thanks for taking the time to write a great summary and write a fix, I appreciate it; I'll take a look and approve the PR soon.

jordangray added a commit that referenced this issue Feb 2, 2016
Fix Issue #51: Empty Lists with Applied NumberFormat Throw ArgumentOutOfRangeException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants