ExcelMapper icon indicating copy to clipboard operation
ExcelMapper copied to clipboard

How do you handle fetching and saving combination of static and dynamic object?

Open 3ggerhappy opened this issue 1 year ago • 2 comments

Hi,

Finding it hard to wrap my head into this, and not sure if possible with ExcelMapper but here it goes:

Say I have an excel w/c the first 5 columns are fixed and succeeding columns are dynamic and i wont know before hand the header names or how may it would be.

Question is, is it possible to map this? what would my class looks like?, i assume it would be like this:

public class TestClass { public string FixedColumn1{ get; set; } public string FixedColumn2{ get; set; } ...... public IEnumerable dynamicColumns { get; set; } }

also i need to make edits on those dynamicColumns, is it possible to make edit then save it to new excel?

3ggerhappy avatar Oct 31 '24 19:10 3ggerhappy

Currently, there is no support for mixing static and dynamic types. The only way to map to unknown column names is to map to dynamic objects. The returned objects are ExpandoObjects.

mganss avatar Nov 06 '24 19:11 mganss

This looks exciting...

NdubuisiJr avatar May 28 '25 20:05 NdubuisiJr