All Projects → dotnetcore → Magicodes.ie

dotnetcore / Magicodes.ie

Licence: mit
Import and export general library, support Dto import and export, template export, fancy export and dynamic export, support Excel, Csv, Word, Pdf and Html.

Projects that are alternatives of or similar to Magicodes.ie

Gotenberg
A Docker-powered stateless API for PDF files.
Stars: ✭ 3,272 (+173.12%)
Mutual labels:  pdf, csv, excel, word
Tabula
Tabula is a tool for liberating data tables trapped inside PDF files
Stars: ✭ 5,420 (+352.42%)
Mutual labels:  excel, csv, pdf
Gotenberg Php Client
PHP client for the Gotenberg API
Stars: ✭ 80 (-93.32%)
Mutual labels:  excel, word, pdf
Gotenberg Go Client
Go client for the Gotenberg API
Stars: ✭ 35 (-97.08%)
Mutual labels:  excel, word, pdf
Androiddocumentviewer
Android 文档查看: word、excel、ppt、pdf,使用mupdf及tbs
Stars: ✭ 235 (-80.38%)
Mutual labels:  excel, word, pdf
Laravel Report Generator
Rapidly Generate Simple Pdf, CSV, & Excel Report Package on Laravel
Stars: ✭ 380 (-68.28%)
Mutual labels:  excel, csv, pdf
Superfileview
基于腾讯浏览服务Tbs,使用X5Webkit内核,实现文件的展示功能,支持多种文件格式
Stars: ✭ 1,115 (-6.93%)
Mutual labels:  excel, word, pdf
Rows
A common, beautiful interface to tabular data, no matter the format
Stars: ✭ 739 (-38.31%)
Mutual labels:  excel, csv
Tableexport
The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
Stars: ✭ 781 (-34.81%)
Mutual labels:  excel, csv
Pyexcel
Single API for reading, manipulating and writing data in csv, ods, xls, xlsx and xlsm files
Stars: ✭ 902 (-24.71%)
Mutual labels:  excel, csv
Pyexcel Io
One interface to read and write the data in various excel formats, import the data into and export the data from databases
Stars: ✭ 40 (-96.66%)
Mutual labels:  excel, csv
Docconv
Converts PDF, DOC, DOCX, XML, HTML, RTF, etc to plain text
Stars: ✭ 735 (-38.65%)
Mutual labels:  word, pdf
Sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+2277.21%)
Mutual labels:  excel, csv
Jsreport
javascript based business reporting platform 🚀
Stars: ✭ 798 (-33.39%)
Mutual labels:  excel, pdf
Dataproofer
A proofreader for your data
Stars: ✭ 628 (-47.58%)
Mutual labels:  excel, csv
Sqlitebiter
A CLI tool to convert CSV / Excel / HTML / JSON / Jupyter Notebook / LDJSON / LTSV / Markdown / SQLite / SSV / TSV / Google-Sheets to a SQLite database file.
Stars: ✭ 601 (-49.83%)
Mutual labels:  excel, csv
Pyetl
python ETL framework
Stars: ✭ 33 (-97.25%)
Mutual labels:  excel, csv
Fast Excel
🦉 Fast Excel import/export for Laravel
Stars: ✭ 1,183 (-1.25%)
Mutual labels:  excel, csv
Django Rest Pandas
📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)
Stars: ✭ 1,030 (-14.02%)
Mutual labels:  excel, csv
Excellentexport
Javascript export to Excel
Stars: ✭ 1,018 (-15.03%)
Mutual labels:  excel, csv

Magicodes.IE | 简体中文

Member project of .NET Core Community nuget Build Status stats License

Stargazers over time

Azure DevOps tests (master) Azure DevOps coverage (branch) Financial Contributors on Open Collective

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.

General description

Milestone

# Status Completion time Milestone situation
3.0 ☕In progress 2021-12-31 To Do
2.5 🚩Completed 2020-10-30 Completed
2.4 🚩Completed 2020-09-30 Completed
2.3 🚩Completed 2020-06-30 Completed
2.2 🚩Completed 2020-04-31 Completed
2.1 🚩Completed 2020-03-15 Completed

Azure DevOps

  • Build Status:Build Status
  • Azure DevOps coverage (master): Azure DevOps coverage (branch)
  • Azure DevOps coverage (develop): Azure DevOps coverage (branch)
  • Azure DevOps tests (master): Azure DevOps tests (master)
  • Azure DevOps tests (develop): Azure DevOps tests (develop)

For details, see: https://dev.azure.com/xinlaiopencode/Magicodes.IE/_build?definitionId=4&_a=summary

Nuget

Stable version (recommended)

Name Nuget
Magicodes.IE.Core NuGet
Magicodes.IE.Excel NuGet
Magicodes.IE.Pdf NuGet
Magicodes.IE.Word NuGet
Magicodes.IE.Html NuGet
Magicodes.IE.Csv NuGet
Magicodes.IE.AspNetCore NuGet

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

Sorry, due to limited energy, please help translate.

  1. 基础教程之导入学生数据

  2. 基础教程之导出Excel (点此访问国内文档)

  3. 基础教程之导出Pdf收据 (点此访问国内文档)

  4. 在Docker中使用

  5. 动态导出

  6. 多Sheet导入

  7. Csv导入导出

  8. Excel图片导入导出 (点此访问国内文档)

  9. Excel模板导出之导出教材订购表点此访问国内文档

  10. 进阶篇之导入导出筛选器

  11. Magicodes.IE之花式导出

  12. .NETCore中通过请求头导出多种格式文件

  13. 性能测试

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 (you can dynamically specify the imported column and imported value mapping relationship)
    • Export column header filter (can dynamically control the export column, support dynamic export (DataTable))
    • Import result filter (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 100W. (Thanks to teacher Zhang Shanyou (https://github.com/xin-lai/Magicodes.IE/pull/8 )) *
  • Support dynamic/ExpandoObject dynamic column export
        [Fact(DisplayName = "DTO导出支持动态类型")]
        public async Task ExportAsByteArraySupportDynamicType_Test()
        {
            IExporter exporter = new ExcelExporter();

            var filePath = GetTestFilePath($"{nameof(ExportAsByteArraySupportDynamicType_Test)}.xlsx");

            DeleteFile(filePath);

            var source = GenFu.GenFu.ListOf<ExportTestDataWithAttrs>();
            string fields = "text,number,name";
            var shapedData = source.ShapeData(fields) as ICollection<ExpandoObject>;

            var result = await exporter.ExportAsByteArray<ExpandoObject>(shapedData);
            result.ShouldNotBeNull();
            result.Length.ShouldBeGreaterThan(0);
            File.WriteAllBytes(filePath, result);
            File.Exists(filePath).ShouldBeTrue();
        }
  • **Support value mapping, support setting value mapping relationship through "ValueMappingAttribute" feature. It is used to generate data validation constraints for import templates and perform data conversion. **
        /// <summary>
        ///     性别
        /// </summary>
        [ImporterHeader(Name = "性别")]
        [Required(ErrorMessage = "性别不能为空")]
        [ValueMapping(text: "男", 0)]
        [ValueMapping(text: "女", 1)]
        public Genders Gender { get; set; }
  • Support the generation of imported data verification items of enumeration and Bool type, and related data conversion

    • Enumeration will automatically obtain the description, display name, name and value of the enumeration by default to generate data items

       	/// <summary>
       	/// 学生状态 正常、流失、休学、勤工俭学、顶岗实习、毕业、参军
       	/// </summary>
       	public enum StudentStatus
       	{
       		/// <summary>
       		/// 正常
       		/// </summary>
       		[Display(Name = "正常")]
       		Normal = 0,
      
       		/// <summary>
       		/// 流失
       		/// </summary>
       		[Description("流水")]
       		PupilsAway = 1,
      
       		/// <summary>
       		/// 休学
       		/// </summary>
       		[Display(Name = "休学")]
       		Suspension = 2,
      
       		/// <summary>
       		/// 勤工俭学
       		/// </summary>
       		[Display(Name = "勤工俭学")]
       		WorkStudy = 3,
      
       		/// <summary>
       		/// 顶岗实习
       		/// </summary>
       		[Display(Name = "顶岗实习")]
       		PostPractice = 4,
      
       		/// <summary>
       		/// 毕业
       		/// </summary>
       		[Display(Name = "毕业")]
       		Graduation = 5,
      
       		/// <summary>
       		/// 参军
       		/// </summary>
       		[Display(Name = "参军")]
       		JoinTheArmy = 6,
       	}
      

    • The bool type will generate "yes" and "no" data items by default

    • If custom value mapping has been set, no default options will be generated

  • Support excel multi-sheet import

  • Support Excel template export, and support image rendering

    The rendering syntax is as follows:

      {{Company}}  //Cell rendering
      {{Table>>BookInfos|RowNo}} //Table rendering start syntax
      {{Remark|>>Table}}//Table rendering end syntax
      {{Image::ImageUrl?Width=50&Height=120&Alt=404}} //Picture rendering
      {{Image::ImageUrl?w=50&h=120&Alt=404}} //Picture rendering
      {{Image::ImageUrl?Alt=404}} //Picture rendering
    

    Custom pipelines will be supported in the future.

  • Support Excel import template to generate annotation

  • Support Excel image import and export

    • Picture import
      • Import as Base64
      • Import to temporary directory
      • Import to the specified directory
    • Picture export
    • Export file path as picture
    • Export network path as picture
  • Support multiple entities to export multiple Sheets

  • Support using some features under the System.ComponentModel.DataAnnotations namespace to control import and export #63

  • Support the use of custom formatter in ASP.NET Core Web API to export content such as Excel, Pdf, Csv #64

  • Support export by column, sheet, and additional rows

exporter.Append(list1).SeparateByColumn().Append(list2).ExportAppendData(filePath);

For details, see the above tutorial "Magicodes.IE Fancy Export"

  • Support cell export width setting
[ExporterHeader(Width = 100)]
public DateTime Time3 { get; set; }
  • **Excel export supports HeaderRowIndex. Add the HeaderRowIndex attribute to the ExcelExporterAttribute export attribute class, so that it is convenient to specify the export from the first row when exporting. **

  • Excel generated import template supports built-in data verification

The support for the built-in data validation can be turned on through the IsInterValidation attribute, and it should be noted that only MaxLengthAttribute, MinLengthAttribute, StringLengthAttribute, and RangeAttribute support the opening operation of the built-in data validation.

Support display operations for input prompts:

  • Excel import supports merging row data #239

合并行导入文件

FAQ

Question List

Update history

Update history

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].