codeice / linqtoexcel

Automatically exported from code.google.com/p/linqtoexcel
0 stars 0 forks source link

Headers containing periods #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download and run the example
2. Add a period to the header name. E.g. "Last.Name"
3. Even if you add a mapping for it, it still won't read it.

Original issue reported on code.google.com by tr...@trafz.dk on 26 Mar 2012 at 12:14

GoogleCodeExporter commented 9 years ago
It turns out that Excel replaces a period (.) in the header with a hash (#)

So you just have to add a mapping like the code below shows.

excel.AddMapping<Person>(x => x.LastName, "Last#Name");

Original comment by paulyo...@gmail.com on 26 Mar 2012 at 9:34

GoogleCodeExporter commented 9 years ago
It works perfectly now. Thank you :)

Original comment by tr...@trafz.dk on 26 Mar 2012 at 9:37

GoogleCodeExporter commented 9 years ago
Thanks a mil

Original comment by houdini....@gmail.com on 10 Aug 2012 at 5:41