EPPlus.Samples.CSharp
Sample project to show functionality of the EPPlus library in C#
Install / Use
/learn @EPPlusSoftware/EPPlus.Samples.CSharpREADME
EPPlus samples
EPPlus samples for .Net Core
The solution can be opened in Visual Studio for Windows or MacOS. On other operating systems please use...
dotnet restore
dotnet run
... to execute the samples.
Table of Contents
- Workbook Worksheet and Ranges
- Import and Export
- Styling
- Filters and Validations
- Drawings Charts and Themes
- Formula Calculation
- Tables PivotTables and Slicers
- Encryption Protection and VBA
- Connections and Query Tables
Workbook Worksheet and Ranges
|No|Sample|Description| |---|---|-----------------| |1.01|Getting started | Basic usage of EPPlus: create a workbook, fill with data and some basic styling <img width=800/>| |1.02|Read an existing workbook | Read in a workbook| |1.03|Using async await | Async Await in Epplus| |1.04|Fill copy and sort ranges |Different range operations| |1.05|Notes and threaded comments | Handling notes and Comments in Epplus| |1.06|Sales report with hyperlinks | Hyperlink and database guide| |1.07|Performance write | Loading and writing in a performant way| |1.08|Performance read using linq | Using Linq on Cells| |1.09|External links | External links to other workbooks| |1.10|Ignore errors | How to ignore errors on ranges|
Import and Export
|No|Sample|Description| |---|---|-----------------| |2.1|Load data from collection| Load data into worksheet from various types of objects. It also demonstrates the Autofit columns feature.<img width=800/>| |2.2|Export data to collection| Demonstrates Export ranges and tables into an IEnumerable<T> where T is a class type. | |2.3|Import export csv files | Async Await in Epplus| |2.4|Import export DataTable |Different range operations| |2.5|Export to html | Handling notes and Comments in Epplus| |2.6|Export to json | Hyperlink and database guide|
Styling
|No|Sample|Description| |---|---|-----------------| |3.1|Styling basics | Demonstrates how to apply different styling on cells including Fills, Fonts etc. | |3.2|Conditional formatting| Demonstrates all conditional formatting and how to apply styling/Formatting.<img width=800/>| |3.3|Fx report from database | This sample produces a workbook with foreign exchange rates. | |3.4|Create a file system report | Demonstrates usage of styling, printer settings, rich text, pie-, doughnut- and bar-charts, freeze panes.|
Filters and Validations
|No|Sample|Description| |---|---|-----------------| |4.1|Data Validations | Demonstrates how to apply different styling on cells including Fills, Fonts etc.<img width=800/>| |4.2|Filter| Demonstrates all conditional formatting and how to apply styling/Formatting. | <img width=800/>
Drawings Charts and Themes
|No|Sample|Description| |---|---|-----------------| |5.1|Shapes and images| How to create shapes and images using EPPlus and apply effects<img width=800/>| |5.2|Open workbook add data and chart|Open an existing workbook with EPPlus, add data and charts | |5.3|Charts And themes|Demonstrates how to use various types of charts, chart styling and themes | |5.4|Sparklines| demonstrates EPPlus support for Sparklines| |5.5|Form controls | demonstrates how to Add form controls, like drop-downs, buttons and radiobuttons to a worksheet and grouping drawings via VBA Macro| |5.6|OLE Objects| demonstrates how to work with OLE Objects in a workbook.| |5.7|In-cell pictures| demonstrates how to work with In-cell pictures, including usage of the IMAGE function.|
Formula Calculation
|No|Sample|Description| |---|---|-----------------| |6.1|Formula Calculation | shows formula calculation capabilities of EPPlus<img width=800/>| |6.2|Dynamic Array Formulas | Example of dynamic array formula calculation |
Tables Pivot Tables and Slicers
|No|Sample|Description| |---|---|-----------------| |7.1|Tables| Samples of creating and calculating tables in Epplus<img width=800/>| |7.2|Pivot Tables| Pivot table functionality of EPPlus | |7.3|Slicers| Slicers for table and pivot table slicers | |7.4|Custom Named Styles| Example for how to create custom slicer styles |
Encryption Protection and VBA
|No|Sample|Description| |---|---|-----------------| |8.1|Encryption and Protection| Sample of encryption and password protection.<img width=800/>| |8.2|VBA| An implementation of a Battleship game, implemented in Excel/VBA as an example of epplus+VBA interaction | |8.3|Digital Signatures| Demonstrates how to work with |
Connections and QueryTables
|No|Sample|Description| |---|---|-----------------| |9|Connections and QueryTables| Sample of external connections and query tables.<img width=800/>|
Also see wiki on https://github.com/EPPlusSoftware/EPPlus/wiki for more details
Output files
The samples above produces some workbooks - the name of each workbook indicates which sample that generated it. These workbooks are located in a subdirectory - named "SampleApp" - to the output directory of the sample project.
Feedback and issues in the sample project.
If you have feedback or want to report and issue in the sample project, please use the EPPlus issue tracker
