Easy.ExportToExcel 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Easy.ExportToExcel --version 1.0.4
                    
NuGet\Install-Package Easy.ExportToExcel -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Easy.ExportToExcel" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Easy.ExportToExcel" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Easy.ExportToExcel" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Easy.ExportToExcel --version 1.0.4
                    
#r "nuget: Easy.ExportToExcel, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Easy.ExportToExcel@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Easy.ExportToExcel&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Easy.ExportToExcel&version=1.0.4
                    
Install as a Cake Tool

Easy.ExportToExcel

A simple C# library to export data to an Excel file

Ever wanted to easily create a real Excel file in C#, from your DataSet, DataTable or List data ? Now you can.

To add this library to your project:

  1. In Visual Studio, click on "Tools\NuGet Package Manager\Manage NuGet Packages for Solution.."
  2. Search for "Easy.ExportToExcel"
  3. Install the package
  4. By default, this package works "out of the box" for WinForms applications. There are two lines commented-out at the top of the "CreateExcelFile.cs" file. If your application is an ASP.Net Core application, please uncomment the first line. If your application is a regular ASP.Net application, please uncomment the second line.
//  #define USING_ASP_NET                    //  Uncomment this line, if you're using regular ASP.NET
//  #define USING_ASP_NET_CORE               //  Uncomment this line, if you're using ASP.NET Core 2 or later
  1. In your code, simply add call the CreateExcelDocument() function, telling it the name of the Excel file to create, and where your data is stored.
// Step 1: Create a DataSet, and put some sample data in it
DataSet ds = CreateSampleData();

// Step 2: Create the Excel .xlsx file
try
{
    string excelFilename = "C:\\Sample.xlsx";
    CreateExcelFile.CreateExcelDocument(ds, excelFilename);
}
catch (Exception ex)
{ 
    MessageBox.Show("Couldn't create Excel file.\r\nException: " + ex.Message);
    return;
}

You can read more about this project on my CodeProject article.

And you can follow my other work on my Mikes Knowledge Base website.

Mike Gledhill

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.6 5,482 1/5/2022
1.0.5 478 1/5/2022
1.0.4 488 1/1/2022
1.0.3 490 1/1/2022
1.0.2 518 1/1/2022
1.0.1 478 12/30/2021
1.0.0 527 12/30/2021