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

add example for Extract convertDatafunc #6

Open
xavave opened this issue Mar 5, 2018 · 0 comments
Open

add example for Extract convertDatafunc #6

xavave opened this issue Mar 5, 2018 · 0 comments

Comments

@xavave
Copy link

xavave commented Mar 5, 2018

excellent project
just a new example in case someone is looking for it:
rmWorkSheet.Extract<RawMaterial>() // Here we can chain multiple definition for the columns .WithProperty(p => p.Id, "A") .WithProperty(p => p.Name, "B", fnTrimString) .WithProperty(p => p.Code, "C", fnTrimString)

fnTrimString is converting, fot this example, input object to string
with
Func<object, string> fnTrimString = objStr => { if (objStr == null) return ""; return objStr.ToString().Trim(); };

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

No branches or pull requests

2 participants