MiniExcel icon indicating copy to clipboard operation
MiniExcel copied to clipboard

Add listener mode or Func to handle/edit Query IEnumerable objects, avoiding having to toList first

Open shps951023 opened this issue 4 years ago • 2 comments

image

shps951023 avatar Apr 24 '21 10:04 shps951023

@shps951023 Maybe I'm misunderstanding this, but since MiniExcel.Query is lazily executed wouldn't this result be achieved by simply appending a Select statement with the desired transformation before the ToList? What would be the advantage/use case for a listener or a Func?

michelebastione avatar Feb 19 '25 20:02 michelebastione

@michelebastione e.g.

config.CallBackFunc = (IDictionary<string,object> row => {
  row["TotalReputation"] = row["vip"]?row["Reputation"] * 5:row["Reputation"] 
});

It can update or do something else like log in listener before lazy return

shps951023 avatar Mar 21 '25 13:03 shps951023