public List <dynamic> ReadAsDynamic(string file) { var parser = new ExcelDataReaderToIParser(file, new ExcelDataOptions()); using (var csv = new CsvReader(parser)) { return(csv.GetRecords <dynamic>().ToList()); } }
public List <dynamic> ReadAsExpandoObject(string file, ExpandoObject expando) { var parser = new ExcelDataReaderToIParser(file, new ExcelDataOptions()); using (var csv = new CsvReader(parser)) { foreach (var property in expando) { Console.WriteLine(property.Key + ": " + property.Value); } return(csv.GetRecords <dynamic>(expando).ToList()); } }