Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miladsoft committed Jun 17, 2024
1 parent 9da653f commit d5d309a
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
Import and Export excel in ASP.NET Core 6.0 Razor Pages
===========
NPOI is a free tool which supports xls, xlsx and docx extensions. This project is the .NET version of POI Java project at http://poi.apache.org/. POI is an open source project, which can help you read/write XLS, DOC, PPT files. It covers most features of Excel like styling, formatting, data formulas, extract images, etc.. The good thing is, it doesn’t require Microsoft Office to be installed on the server.
# Import and Export Excel in ASP.NET Core 8.0 Razor Pages 📊🚀

For example, you can use it to Generate an Excel report without Microsoft Office suite installed on your Server and more efficient than calling Microsoft Excel ActiveX in the background.
Extract text from Office documents to help you implement full-text indexing feature (most of the time this feature is used to create search engines).
Extract images from Office documents.
Generate Excel sheets, which contains formulas.
NPOI is a powerful and free tool that supports xls, xlsx, and docx extensions. This project is the .NET version of the POI Java project at [Apache POI](http://poi.apache.org/). POI is an open-source project that enables you to read/write XLS, DOC, and PPT files. It covers most features of Excel, such as styling, formatting, data formulas, and extracting images. The best part is, it doesn't require Microsoft Office to be installed on the server. 🌟

Let’s create an ASP.NET Core Razor Page application. Open Visual Studio 2017. Hit File-> New Project -> Select ASP.NET Core Web Application. Enter the project name and say “OK”. Select “Web Application” from the next dialog.
With NPOI, you can:

Once the project is created, install NPOI package for .NET Core. To install, run the following command in the Package Manager Console:
- Generate Excel reports without needing Microsoft Office installed on your server, offering more efficiency than using Microsoft Excel ActiveX in the background.
- Extract text from Office documents to implement full-text indexing features, commonly used to create search engines.
- Extract images from Office documents.
- Generate Excel sheets with formulas.

```
Let's create an ASP.NET Core Razor Page application. Open Visual Studio 2022, go to File -> New Project -> Select ASP.NET Core Web Application. Enter the project name and click “OK”. Select “Web Application” from the next dialog.

Once the project is created, install the NPOI package for .NET Core by running the following command in the Package Manager Console:

```bash
PM> Install-Package DotNetCore.NPOI
```

To show,
### Features 🎉

- Import: We’ll upload an excel file on the server and then process it using NPOI.
- Export: We’ll create an excel file with some dummy data using NPOI and download the same in the browser.
#### Import Excel Files 📥
We’ll upload an Excel file to the server and then process it using NPOI.

#### Export Excel Files 📤
We’ll create an Excel file with some dummy data using NPOI and download it via the browser.

## Export xlsx/xls in ASP.NET Core

![Export xlsx/xls in ASP.NET Core](/pic/Export-excel-in-ASP.NET-Core-2.0-Razor-Pages.gif)

-------------

## Import xlsx/xls in ASP.NET Core

![Import xlsx/xls in ASP.NET Core](/pic/Import-and-Export-excel-in-ASP.NET-Core-2.0-Razor-Pages.gif)

Happy coding! 💻✨

0 comments on commit d5d309a

Please sign in to comment.