Magicodes.IE
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.
Install / Use
/learn @dotnetcore/Magicodes.IEREADME
Magicodes.IE | 简体中文
Overview
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.

Azure DevOps
For details, see: https://dev.azure.com/xinlaiopencode/Magicodes.IE/_build?definitionId=4&_a=summary
NuGet
Stable version (recommended)
| Name | NuGet |
|----------|:-------------|
| Magicodes.IE.Core | |
| Magicodes.IE.Excel |
|
| Magicodes.IE.Excel.NPOI |
|
| Magicodes.IE.Excel.AspNetCore |
|
| Magicodes.IE.Pdf |
|
| Magicodes.IE.Word |
|
| Magicodes.IE.Html |
|
| Magicodes.IE.Csv |
|
| Magicodes.IE.AspNetCore |
|
| Magicodes.IE.EPPlus |
|
| Magicodes.IE.Excel.Abp |
|
| Magicodes.IE.Csv.Abp |
|
| Magicodes.IE.Html.Abp |
|
| Magicodes.IE.Pdf.Abp |
|
| Magicodes.IE.Word.Abp |
|
| Magicodes.IE.Stash |
|
Note
- Excel import does not support ".xls" files, that is, Excel97-2003 is not supported.
- For use in Docker, please refer to the section "Use in Docker" in the documentation.
- Relevant functions have been compiled with unit tests. You can refer to unit tests during the use process.
Tutorial
- <a href="docs/1.Basic tutorial of importing student data.md">Basic tutorial of importing student data</a>
- <a href="docs/2.Basic tutorial of export Excel.md">Basic tutorial of export Excel</a>
- <a href="docs/3.Basic tutorial of export Pdf receipts.md">Basic tutorial of export Pdf receipts</a>
- <a href="docs/4.Use in Docker.md">Use in Docker</a>
- <a href="docs/5.Dynamic Export.md">Dynamic Export</a>
- <a href="docs/6.Import Multi-Sheet Tutorial.md">Import Multi-Sheet Tutorial</a>
- <a href="docs/7.Csv Import and Export.md">Csv Import and Export</a>
- <a href="docs/8. Import and export Excel as pictures.md">Import and export Excel as pictures</a>
- <a href="docs/9.Excel template export-Export textbook order form .md">Excel template export-Export textbook order form</a>
- <a href="https://docs.xin-lai.com/2020/09/21/%E7%BB%84%E4%BB%B6/Magicodes.IE/Magicodes.IE%E4%B9%8B%E5%AF%BC%E5%85%A5%E5%AF%BC%E5%87%BA%E7%AD%9B%E9%80%89%E5%99%A8/">Import and Export Filters</a>
- <a href="https://docs.xin-lai.com/2020/09/28/%E7%BB%84%E4%BB%B6/Magicodes.IE/Magicodes.IE%E4%B9%8B%E8%8A%B1%E5%BC%8F%E5%AF%BC%E5%87%BA/">Magicodes.IE Fancy Export</a>
- <a href="docs/12.Exporting multiple formats in NETCore via request headers.md">Exporting multiple formats in NETCore via request headers</a>
- <a href="docs/13.Performance Measurement.md">Performance Measurement</a>
- <a href="docs/Excel Merge Row Cells Import.md">Excel Merge Row Cells Import</a>
- <a href="docs/Excel template export - dynamic export.md">Excel template export - dynamic export</a>
- <a href="docs/Magicodes.IE.Excel.AspNetCore Quick Export Excel.md">Magicodes.IE.Excel.AspNetCore Quick Export Excel (new)</a>
See below for other tutorials or unit tests
See below for update history.
Features
- Need to be used in conjunction with related import and export DTO models, support import and export through DTO and related characteristics. Configure features to control related logic and display results without modifying the logic code;

- Support various filters to support scenarios such as multi-language, dynamic control column display, etc. For specific usage, see unit test:
- Import column header filter <IImportHeaderFilter>(you can dynamically specify the imported column and imported value mapping relationship)
- Export column header filter <IExportHeaderFilter>(can dynamically control the export column, support dynamic export (DataTable))
- Export column headers filter <IExportHeadersFilter>(can dynamically control the export column, support dynamic export (DataTable))
- Import result filter <IImportResultFilter>(can modify annotation file)
- Export supports text custom filtering or processing;
- Import supports automatic skipping of blank lines in the middle;
- Import supports automatically generate import templates based on DTO, and automatically mark required items;

- Import supports data drop-down selection, currently only supports enumerated types;
- Imported data supports the processing of leading and trailing spaces and intermediate spaces, allowing specific columns to be set;
- Import supports automatic template checking, automatic data verification, unified exception handling, and unified error encapsulation, including exceptions, template errors and row data errors;

- Support import header position setting, the default is 1;
- Support import columns out of order, no need to correspond one to one in order;
- Support to import the specified column index, automatic recognition by default;
- Exporting Excel supports splitting of Sheets, only need to set the value of [MaxRowNumberOnASheet] of the characteristic [ExporterAttribute]. If it is 0, no splitting is required. See unit test for details;
- Support importing into Excel for error marking;

- Import supports cutoff column setting, if not set, blank cutoff will be encountered by default;
- Support exporting HTML, Word, Pdf, support custom export template;
-Export HTML
-Export Word
-Export Pdf, support settings, see the update log for details
-Export receipt

- Import supports repeated verification;

- Support single data template export, often used to export receipts, credentials and other businesses
- **Support dynamic column export (based on DataTable), and the Sheet will be split automatically if it exceeds 10
