Easy.ExportToExcel 1.0.6

dotnet add package Easy.ExportToExcel --version 1.0.6
NuGet\Install-Package Easy.ExportToExcel -Version 1.0.6
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.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Easy.ExportToExcel --version 1.0.6
#r "nuget: Easy.ExportToExcel, 1.0.6"
#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.
// Install Easy.ExportToExcel as a Cake Addin
#addin nuget:?package=Easy.ExportToExcel&version=1.0.6

// Install Easy.ExportToExcel as a Cake Tool
#tool nuget:?package=Easy.ExportToExcel&version=1.0.6

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 C# 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_CORE       //  Uncomment this line, if you're using ASP.NET Core 2+
//  #define USING_ASP_NET            //  Uncomment this line, if you're using regular ASP.NET
  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. 
.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 2,385 1/5/2022
1.0.5 246 1/5/2022
1.0.4 259 1/1/2022
1.0.3 263 1/1/2022
1.0.2 261 1/1/2022
1.0.1 264 12/30/2021
1.0.0 267 12/30/2021