public ExcelToObjectMapConfig LoadRelatedCollection() { if (_excelToObjectMapConfig != null) { return(_excelToObjectMapConfig); } if (type?.Trim()?.ToLower() != "collection") { return(null); } if (string.IsNullOrEmpty(mapFile)) { return(null); } _excelToObjectMapConfig = ExcelMapper.LoadConfig(mapFile); return(_excelToObjectMapConfig); }
public static bool WriteToExcel <T>(string excelFileName, string configFileName, IReadOnlyList <T> data) { var mapper = ExcelMapper.LoadConfig(configFileName); return(ExcelMapper.WriteToExcel <T>(excelFileName, mapper, data)); }
public static List <T> ReadFromExcel <T>(string excelFileName, string configFileName) { var mapper = ExcelMapper.LoadConfig(configFileName); return(ExcelMapper.ReadFromExcel <T>(excelFileName, mapper)); }