ExcelExtendReadExcelT(Stream, Boolean) Method
讀取Excel文件並轉換為物件
Namespace: eBizprise.UtilityAssembly: eBizprise.Utility.ExcelHelper (in eBizprise.Utility.ExcelHelper.dll) Version: 25.0.1.0+9af286275430f5cdff066120a88db0d7edbaef7c
public static List<T> ReadExcel<T>(
this Stream stream,
bool isOldVersion
)
- stream Stream
- 資料流
- isOldVersion Boolean
- 是否為2003前舊版Excel
- T
ListTList<T>In Visual Basic and C#, you can call this method as an instance method on any object of type
Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
using (FileStream fileStream = new FileStream("ExcelHelperTest.xlsx", FileMode.Open))
{
List<Employee> employees = fileStream.ReadExcel<Employee>(false);
// 其它作業
}
| Date | Version | Description |
|---|
| 2020/02/07 | 1.0.0.0 | 初版 |
| 2025/09/19 | 25.0.0.0 | 彙整2025年度初版 |