ExcelMapper
ExcelMapper copied to clipboard
valueparser not work when call Fetch() function
valueparser will not callback Platform: net 8.0
Can you provide a code snippet that shows the issue?
Can you provide a code snippet that shows the issue?
Func<string, object, object> parser = (key, value) =>
{
if (value is string s && s.Contains(",") && s.Split(",").All(x => int.TryParse(x, out int _)))
return new Point(int.Parse(s.Split(",")[0]), int.Parse(s.Split(",")[1]));
return value;
};
ExcelMapper excelMapper = new ExcelMapper();
excelMapper.Save("Config.xlsx", mapInfos, "MapInfo", true, converter);
I can't repro. In your example the Func variable is called parser but you're passing a different variable named converter to the Save method. Could that be the cause?