-
-
Notifications
You must be signed in to change notification settings - Fork 412
Fixed headers being printed when using SaveAsAsync despite ExcelIgnore property set to true on DynamicExcelColumn #937
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,16 +73,16 @@ private static async IAsyncEnumerable<CellWriteInfo> GetRowValuesAsync(T current | |
| foreach (var prop in props) | ||
| { | ||
| column++; | ||
|
|
||
| if (prop is null) | ||
| continue; | ||
|
|
||
| yield return currentValue switch | ||
| if (prop is { ExcelIgnore: false }) | ||
| { | ||
| IDictionary<string, object> genericDictionary => new CellWriteInfo(genericDictionary[prop.Key.ToString()], column, prop), | ||
| IDictionary dictionary => new CellWriteInfo(dictionary[prop.Key], column, prop), | ||
| _ => new CellWriteInfo(prop.Property.GetValue(currentValue), column, prop) | ||
| }; | ||
| yield return currentValue switch | ||
| { | ||
| IDictionary<string, object> genericDictionary => new CellWriteInfo(genericDictionary[prop.Key.ToString()], column, prop), | ||
| IDictionary dictionary => new CellWriteInfo(dictionary[prop.Key], column, prop), | ||
| _ => new CellWriteInfo(prop.Property.GetValue(currentValue), column, prop) | ||
| }; | ||
| } | ||
|
Comment on lines
75
to
+85
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The if (prop is { ExcelIgnore: false })
{
column++;
yield return currentValue switch
{
IDictionary<string, object> genericDictionary => new CellWriteInfo(genericDictionary[prop.Key.ToString()], column, prop),
IDictionary dictionary => new CellWriteInfo(dictionary[prop.Key], column, prop),
_ => new CellWriteInfo(prop.Property.GetValue(currentValue), column, prop)
};
}
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not correct, as we still want to increase the |
||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.