ExcelDataReader开源的读取Excel文件组件net35.7z

时间:2023-05-27 14:26:56
【文件属性】:

文件名称:ExcelDataReader开源的读取Excel文件组件net35.7z

文件大小:158KB

文件格式:7Z

更新时间:2023-05-27 14:26:56

ExcelDataReader C# Excel解析 Excel DLL

开源的读取Excel文件组件,轻量级解析DLL,net3.5 无需自己再编译,直接导入引用: FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read); //1. Reading from a binary Excel file ('97-2003 format; *.xls) IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); //... //2. Reading from a OpenXml Excel file (2007 format; *.xlsx) IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream); //... //3. DataSet - The result of each spreadsheet will be created in the result.Tables DataSet result = excelReader.AsDataSet(); //... //4. DataSet - Create column names from first row excelReader.IsFirstRowAsColumnNames = true; DataSet result = excelReader.AsDataSet(); //5. Data Reader methods while (excelReader.Read()) { //excelReader.GetInt32(0); } //6. Free resources (IExcelDataReader is IDisposable) excelReader.Close();


【文件预览】:
ExcelDataReader.pdb
ExcelDataReader.DataSet.xml
ExcelDataReader.DataSet.dll
ICSharpCode.SharpZipLib.dll
ExcelDataReader.xml
ExcelDataReader.dll
ExcelDataReader.DataSet.pdb

网友评论