You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,8 +215,40 @@ var excel = new ExcelQueryFactory("excelFileName");
215
215
excel.StrictMapping=StrictMappingType.Both;
216
216
```
217
217
218
+
### Retaining Values from Unmapped Columns
219
+
218
220
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`.
219
221
222
+
Let's say the only field you're guaranteed to have is a `Name` column, and the rest of the columns can be different per spreadsheet. You could write your `Company` class like this, implementing `IContainsUnmappedCells`:
// company.UnmappedCells["StartDate"].Cast<DateTime>() == new DateTime(1918, 11, 11)
250
+
```
251
+
220
252
## Manually setting the database engine
221
253
222
254
LinqToExcel can use the Jet or Ace database engine, and it automatically determines the database engine to use by the file extension. You can manually set the database engine with the `DatabaseEngine` property
0 commit comments