예제 #1
0
 /// <summary>
 /// 导入EXCEL
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="fs">流</param>
 /// <param name="Types">类型</param>
 /// <param name="HasPageFooter">文档是否有页脚</param>
 /// <param name="SheetIndex">数据表索引</param>
 /// <returns></returns>
 public static List <T> ImportExcel <T>(Stream fs, ExcelType Types,
                                        bool HasPageFooter = false, int SheetIndex = 0) where T : new()
 {
     return(ExcelFactory.ImportExcel <T>(fs, Types, HasPageFooter, SheetIndex));
 }
예제 #2
0
 public void ExcelImportTest()
 {
     using var fs = new FileStream("TestD.xlsx", FileMode.Open, FileAccess.Read);
     var data = ExcelFactory.ImportExcel <TestD>(fs, ExcelType.xlsx, true);
 }