/// <summary> /// 将excel文件内容读取到泛型集合中 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="fileName">文件完整路径名</param> /// <param name="sheetName">指定读取excel工作薄sheet的名称</param> /// <param name="isFirstRowColumn">第一行是否是DataTable的列名:true=是,false=否</param> /// <returns></returns> public static List <T> StreamToList <T>(string fileName, string sheetName = null, bool isFirstRowColumn = true) where T : new() { return(DataConvert <T> .ConvertToModel(ExcelToDataTable(fileName, sheetName, isFirstRowColumn))); }