ExcelReaderMapper 1.0.0
See the version list below for details.
dotnet add package ExcelReaderMapper --version 1.0.0
NuGet\Install-Package ExcelReaderMapper -Version 1.0.0
<PackageReference Include="ExcelReaderMapper" Version="1.0.0" />
paket add ExcelReaderMapper --version 1.0.0
#r "nuget: ExcelReaderMapper, 1.0.0"
// Install ExcelReaderMapper as a Cake Addin #addin nuget:?package=ExcelReaderMapper&version=1.0.0 // Install ExcelReaderMapper as a Cake Tool #tool nuget:?package=ExcelReaderMapper&version=1.0.0
ExcelReaderMapper
Lightweight excel reader for .NET application
This use ExcelDataReader to read the excel file. It will read line one by one. So it optimize the memory
Installation
Download package from NuGet ExcelReaderMapper
Note for .NET CORE
By default, ExcelDataReader throws a NotSupportedException "No data is available for encoding 1252." on .NET Core.
To fix, add a dependency to the package System.Text.Encoding.CodePages and then add code to register the code page provider during application initialization (f.ex in Startup.cs):
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
This is required to parse strings in binary BIFF2-5 Excel documents encoded with DOS-era code pages. These encodings are registered by default in the full .NET Framework, but not on .NET Core.
Using
Create a model to mapping with datatype with DisplayAttribute to declare the excel column name
public class ExcelModel
{
[Display(Name = "FIRST_NAME")]
public string FirstName { get; set; }
[Display(Name = "LAST_NAME")]
public string LastNane { get; set; }
[Display(Name = "AGE")]
public int Age { get; set; }
}
Call the excelmapper object
var fileContent = File.ReadAllBytes("Example.xlsx");
var excelMapper = new MapExcelFile();
excelMapper.DateTimeFormat = new{ "yyyy-dd-MM" };
var result = excelMapper.GetDataFromExcel<ExcelModel>(fileContent);
Properties
lineOfOffset: It will offset the lines that started reading the excel file (Default = 1) DateTimeFormat: contains a array of datetime format when the columns is not a Date type in excel
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- ExcelDataReader (>= 3.6.0)
- System.ComponentModel.Annotations (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.3.3 | 448 | 11/22/2023 |
2.3.2 | 125 | 11/22/2023 |
2.3.1 | 1,365 | 5/22/2023 |
2.3.0 | 476 | 10/5/2022 |
2.2.9 | 468 | 9/20/2022 |
2.2.8 | 443 | 9/19/2022 |
2.2.7 | 458 | 9/16/2022 |
2.2.6 | 494 | 9/14/2022 |
2.2.5 | 430 | 9/12/2022 |
2.2.4 | 430 | 9/10/2022 |
2.2.3 | 421 | 9/9/2022 |
2.2.2 | 433 | 9/7/2022 |
2.2.1 | 428 | 8/30/2022 |
2.2.0 | 426 | 8/30/2022 |
2.1.0 | 442 | 8/10/2022 |
2.0.0 | 419 | 8/9/2022 |
1.0.0 | 454 | 7/30/2022 |