Skip to content

Add a way to gather unmapped cells#151

Merged
mrworkman merged 3 commits intopaulyoder:masterfrom
freakingawesome:gather-unmapped-cells
Aug 13, 2018
Merged

Add a way to gather unmapped cells#151
mrworkman merged 3 commits intopaulyoder:masterfrom
freakingawesome:gather-unmapped-cells

Conversation

@freakingawesome
Copy link
Copy Markdown
Contributor

This provides a way to retain unmapped cell values when fetching a strongly typed row.

@mrworkman
Copy link
Copy Markdown
Collaborator

I will try to review this week

@mrworkman
Copy link
Copy Markdown
Collaborator

Lol, so much for "this week". Looking at it now.

Copy link
Copy Markdown
Collaborator

@mrworkman mrworkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely a useful feature. The changes look great, but updating the readme might be helpful for some users. If you can do that, I'll go ahead and merge it!

Comment thread README.md
excel.StrictMapping = StrictMappingType.Both;
```

If you are using `None` or `ClassStrict` mapping, you can retain unmapped columns by implementing the `IContainsUnmappedCells` interface. This will put all values from the unmapped columns into a dictionary on your class named `UnmappedCells`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably include an example here by showing how to implement the interface, and then "using" one of the unmapped values.

@freakingawesome
Copy link
Copy Markdown
Contributor Author

Thanks, @mrworkman. I've added a concrete example in the README.

@mrworkman
Copy link
Copy Markdown
Collaborator

Awesome, thanks! There was a small merge conflict introduced by another PR, but I have resolved it.

@mrworkman mrworkman merged commit 68b04e1 into paulyoder:master Aug 13, 2018
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

Successfully merging this pull request may close these issues.

2 participants