日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Magicodes.IE 2.5.6.1发布

發(fā)布時間:2023/12/4 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Magicodes.IE 2.5.6.1发布 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

2.5.6.1

2021.10.06

  • 修復(fù)?#337,bool?類型導(dǎo)出的映射問題

2.5.6.0

2021.10.05

  • 合并Magicodes.EPPlus到Magicodes.IE,修復(fù)所有單元測試并修復(fù)部分Bug

  • 對EPPlus進行了部分性能優(yōu)化(比如使用高性能內(nèi)存流代替MemoryStream)和功能加強

2.5.5.4

2021.09.02

  • 修復(fù)可為空枚舉導(dǎo)入時的驗證問題#322。

2.5.5.3

2021.08.27

  • 修復(fù)Append方式導(dǎo)出多個sheet時,發(fā)生“Tablename is not unique”錯誤,具體見#299。

2.5.5.2

2021.08.24

  • 添加對Abp模塊的包裝,具體見#318。

  • ?Magicodes.IE.Excel.Abp(MagicodesIEExcelModule)

      • ?注冊IExcelExporter、IExcelImporter、IExportFileByTemplate

  • ?Magicodes.IE.Csv.Abp(MagicodesIECsvModule)

      • ?注冊ICsvExporter、ICsvImporter

  • ?Magicodes.IE.Html.Abp(MagicodesIEHtmlModule)

      • ?注冊IHtmlExporter

  • ?Magicodes.IE.Pdf.Abp(MagicodesIEPdfModule)

      • ?注冊IPdfExporter

  • ?Magicodes.IE.Word.Abp(MagicodesIEWordModule)

      • ?注冊IWordExporter

如何使用?

  • 添加包

<PackageReference Include="Magicodes.IE.Excel.Abp" Version="2.5.5.2" /><PackageReference Include="Magicodes.IE.Pdf.Abp" Version="2.5.5.2" />
  • 添加模塊依賴

[DependsOn(typeof(MagicodesIEExcelModule),typeof(MagicodesIEPdfModule))]
  • 通過構(gòu)造函數(shù)或者其他方式注入IExcelExporter等對象,然后直接使用

2.5.5.1

2021.08.07

  • 為了簡化ASP.NET Core下的Excel導(dǎo)出,對Excel導(dǎo)出進行了進一步的封裝

  • 添加Magicodes.IE.Excel.AspNetCore工程,添加XlsxFileResult的Action Result,支持泛型集合、Bytes數(shù)組、Steam直接導(dǎo)出

  • 修改部分命名和命名空間

2.5.4.9

2021.07.23

  • 修復(fù)Excel合并行導(dǎo)入在存在空的合并單元格時可能的數(shù)據(jù)讀取錯誤#305

2.5.4.8

2021.07.15

  • Magicodes.EPPlus回退到4.6.6,以修復(fù)格式錯亂的問題

  • 修復(fù)Excel僅導(dǎo)出錯誤數(shù)據(jù)時的Bug#302

  • 完善多語言#298,以及完善單元測試

2.5.4.6

2021.07.04

  • 模板導(dǎo)出支持一行多個表格#296

2.5.4.5

2021.06.29

  • 合并PR#295,完善模板導(dǎo)出類型定義的問題

2.5.4.4

2021.06.25

  • Fix only first [ColumnIndex] is valid exception#289

2.5.4.3

2021.06.18

  • Update ImportTestColumnIndex_Test

  • Magicodes.EPPlus was upgraded to 4.6.7#285

2.5.4.2

2021.06.05

  • Fix ImporterHeader->ColumnIndex

  • Utilize RecyclableMemoryStream instead of "new MemoryStream" all over#282

2.5.4.1

2021.06.05

  • EXCEL模板導(dǎo)出支持XOffset和YOffset#280

  • EXCEL修復(fù)ValueMapping

  • Core工程多語言配置

  • EXCEL優(yōu)化時間導(dǎo)出

2.5.4.0

2021.06.01

  • EXCEL支持自動換行屬性#278

  • EXCEL支持隱藏列屬性#273

  • EXCEL優(yōu)化時間優(yōu)化

2.5.3.9

2021.05.26

  • 修復(fù)ValueMappingAttribute#272

2.5.3.8

2021.05.10

  • Excel模板導(dǎo)出功能,將單行復(fù)制改為多行復(fù)制

  • PDF導(dǎo)出內(nèi)存優(yōu)化

2.5.3.7

2021.04.23

  • 修復(fù)導(dǎo)入模板生成,格式錯誤#261?例如:

2.5.3.6

2021.04.18

  • 支持對導(dǎo)入模板生成,預(yù)設(shè)值單元格格式#253?例如:

[ImporterHeader(Name = "序號", Format ="@")]
  • 單元格圖片導(dǎo)出支持偏移設(shè)置#250?例如:

**YOffset**:垂直偏移(可進行移動圖片) **XOffset**:水平偏移(可進行移動圖片)
  • 支持多sheet導(dǎo)入SheetIndex的支持#254?例如:

[ExcelImporter(SheetIndex = 2)]

2.5.3.5

2021.04.13

  • Excel導(dǎo)入支持列頭忽略大小寫導(dǎo)入(全局配置:IsIgnoreColumnCase)

2.5.3.4

2021.04.06

  • Excel導(dǎo)入修復(fù)枚舉值不在范圍時的錯誤提示

2.5.3.3

2021.04.03

  • Excel導(dǎo)入邏輯移除5萬行的限制,默認(rèn)不限制導(dǎo)入數(shù)量

2.5.3.2

2021.03.30

  • Excel修復(fù)OutputBussinessErrorData擴展方法

  • 多Sheet導(dǎo)入對Stream的支持

2.5.3.1

2021.03.12

  • Excel模板導(dǎo)出支持使用Dictionary、ExpandoObject完成動態(tài)導(dǎo)出

  • 優(yōu)化模板導(dǎo)出邏輯

2.5.3

2021.03.08

  • Excel模板導(dǎo)出支持使用JSON對象完成動態(tài)導(dǎo)出?#I398DI

2.5.2

2021.03.05

  • Excel導(dǎo)入支持合并行數(shù)據(jù)?#239

2.5.1.8

2021.02.23

  • Input string was not in a correct format.#241

  • 使用Stream方式導(dǎo)入xlsx,rowErrors里的rowIndex位置不對#236

2.5.1.7

2021.02.20

  • Excel支持Base64導(dǎo)出?#219

  • 修復(fù)?#214

2.5.1.6

2021.01.31

  • 部分重構(gòu)模板導(dǎo)出

  • Excel模板導(dǎo)出語法解析加強?#211

  • 修復(fù)當(dāng)表格下面存在變量時,無法渲染的Bug

2.5.1.5

2021.01.29

  • 移除模板導(dǎo)出時的控制臺日志輸出

2.5.1.4

2021.01.09

  • 修復(fù)Excel導(dǎo)出列頭索引與內(nèi)容排序不一致問題及單測?#226

2.5.1.3

2021.01.02

  • Add PDF support for paper size

  • Add PDF support for margins?#223

2.5.1

2020.12.21

  • 導(dǎo)出支持使用ColumnIndex指定導(dǎo)出順序,以導(dǎo)出時在某些情況下順序不一致的問題(Export supports the use of ColumnIndex to specify the export order, so that the order is inconsistent in some cases when exporting)?#179

2.5.0

2020.12.03

  • Excel導(dǎo)出支持HeaderRowIndex?#164

  • 增加Excel枚舉導(dǎo)出對DescriptionAttribute的支持?#168

  • Excel生成導(dǎo)入模板支持內(nèi)置數(shù)據(jù)驗證#167

    • 支持MaxLengthAttribute、MinLengthAttribute、StringLengthAttribute、RangeAttribute

    • 支持?jǐn)?shù)據(jù)驗證

    • 支持輸入提示 To fix The Mapping Values of The total length of a Data Validation list always exceed 255 characters (# 196) (https://github.com/dotnetcore/Magicodes.IE/issues/196)

  • Excel export List data type errors, and formatting issues.#191?[193] (https://github.com/dotnetcore/Magicodes.IE/issues/193)

  • 導(dǎo)入Excel對Enum類型匹配值映射時,忽略值前后空格

  • fix MappingValues The total length of a DataValidation list cannot exceed 255 characters?#196

  • Excel導(dǎo)出List數(shù)據(jù)類型存在錯誤,以及格式化問題。?#191?#193

  • The ColumnIndex property does not appear to be valid in Excel import?#198

  • TableStyle修改為枚舉類型

2.5.0-beta6

2020.11.26

  • The ColumnIndex property does not appear to be valid in Excel import?#198

2.5.0-beta5

2020.11.25

  • fix MappingValues The total length of a DataValidation list cannot exceed 255 characters?#196

  • Excel導(dǎo)出List數(shù)據(jù)類型存在錯誤,以及格式化問題。?#191?#193

2.5.0-beta4

2020.11.20?To fix The Mapping Values of The total length of a Data Validation list always exceed 255 characters (# 196) (https://github.com/dotnetcore/Magicodes.IE/issues/196)

  • Excel export List data type errors, and formatting issues.?#191?[193] (https://github.com/dotnetcore/Magicodes.IE/issues/193)

  • 導(dǎo)入Excel對Enum類型匹配值映射時,忽略值前后空格

2.5.0-beta3

2020.10.29

  • Excel生成導(dǎo)入模板支持內(nèi)置數(shù)據(jù)驗證#167

    • 支持MaxLengthAttribute、MinLengthAttribute、StringLengthAttribute、RangeAttribute

    • 支持?jǐn)?shù)據(jù)驗證

    • 支持輸入提示

2.5.0-beta2

2020.10.20

  • Excel導(dǎo)出支持HeaderRowIndex?#164

  • 增加Excel枚舉導(dǎo)出對DescriptionAttribute的支持?#168

2.4.0

2020.10.01

  • 支持單元格導(dǎo)出寬度設(shè)置?#129

  • Excel導(dǎo)出支持對Enum的ValueMapping設(shè)置?#106

  • Excel導(dǎo)出支持對bool類型的ValueMapping設(shè)置?#16

  • #152?篩選器支持依賴注入

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory){AppDependencyResolver.Init(app.ApplicationServices);//all other code}
  • #151 導(dǎo)出添加AutoFitMaxRows,超過指定行數(shù)則不啟用AutoFit

  • 添加全局IsDisableAllFilter屬性,以通過特性禁用所有篩選器

  • #142?【修復(fù)】根據(jù)模板列表高度的設(shè)置,統(tǒng)一設(shè)置渲染高度

  • #157【修復(fù)】對低版本框架的兼容

  • Excel導(dǎo)入對圖片獲取算法的優(yōu)化

2.4.0-beta4

2020.09.26

  • #157【修復(fù)】對低版本框架的兼容

2.4.0-beta3

2020.09.24

  • #142?【修復(fù)】根據(jù)模板列表高度的設(shè)置,統(tǒng)一設(shè)置渲染高度

2.4.0-beta2

2020.09.16

  • #152?篩選器支持依賴注入

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory){AppDependencyResolver.Init(app.ApplicationServices);//all other code}
  • #151 導(dǎo)出添加AutoFitMaxRows,超過指定行數(shù)則不啟用AutoFit

  • 添加全局IsDisableAllFilter屬性,以通過特性禁用所有篩選器

2.4.0-beta1

2020.09.14

  • 支持單元格導(dǎo)出寬度設(shè)置?#129

  • Excel導(dǎo)出支持對Enum的ValueMapping設(shè)置?#106

  • Excel導(dǎo)出支持對bool類型的ValueMapping設(shè)置?#16

2.3.0

2020.08.30

2.3.0-beta8

2020.08.22

  • 修復(fù)基于文件流導(dǎo)入時的NULL異常,并完善單元測試?#141**

2.3.0-beta7

2020.08.16

  • excel添加對ExpandoObject類型的支持?#135**

2020.08.10

  • 【Nuget】版本更新到2.3.0-beta6

  • 多Sheet導(dǎo)入保存標(biāo)注錯誤單元測試,并沒出現(xiàn)多數(shù)據(jù)導(dǎo)入效驗bug?#108

  • Excel多Sheet 導(dǎo)入模板生成?#133

  • 修復(fù)Excel模板圖片高度問題?#131

2020.08.04

  • 【Nuget】版本更新到2.3.0-beta5

  • 在runtimes native包問題

  • 對于跨平臺native中?COM Interop is not supported on this platform.修復(fù)?#130

2020.07.14

  • 【Nuget】版本更新到2.3.0-beta4

2020.07.13

  • 【Nuget】版本更新到2.3.0-beta3

  • 【PDF導(dǎo)出】修復(fù)Linux下導(dǎo)出PDf 出錯問題?#125

2020.07.06

  • 【Nuget】版本更新到2.3.0-beta2

  • 【Excel導(dǎo)出】導(dǎo)出業(yè)務(wù)錯誤數(shù)據(jù)支持直接返回錯誤數(shù)據(jù)的文件流字節(jié)

  • 【Excel導(dǎo)出】對追加sheet實現(xiàn)同一個Model可自定義傳入不同sheet名稱

    • exporter.Append(list1,"sheet1").SeparateBySheet().Append(list2).ExportAppendData(filePath);

  • 【Nuget】針對于一些客戶端不支持SemVer 2.0.0 進行采取兼容機制

2020.06.22

  • 【Nuget】版本更新到2.3.0-beta1

  • 【Excel導(dǎo)出】添加對Excel模板導(dǎo)出函數(shù)的支持

    - {{Formula::AVERAGE?params=G4:G6}}- {{Formula::SUM?params=G4:G6&G4}}

2020.06.16

  • 【Nuget】版本更新到2.2.6

  • 【HTML導(dǎo)出】添加對NETCore2.2模板引擎的支持

2020.06.14

  • 【Nuget】版本更新到2.2.5

  • 【Excel導(dǎo)出】增加分欄、分sheet、追加rows導(dǎo)出?#74

    - exporter.Append(list1).SeparateByColumn().Append(list2).ExportAppendData(filePath); - exporter.Append(list1).SeparateBySheet().Append(list2).ExportAppendData(filePath); - exporter.Append(list1).SeparateByRow().AppendHeaders().Append(list2).ExportAppendData(filePath);
  • [Excel導(dǎo)出】修復(fù)‘IsAllowRepeat=true’?#107

  • [Pdf導(dǎo)出】增加PDF擴展方法,支持通過以參數(shù)形式傳遞特性參數(shù)?#104

    - Task<byte[]> ExportListBytesByTemplate<T>(ICollection<T> data, PdfExporterAttribute pdfExporterAttribute,string temple); - Task<byte[]> ExportBytesByTemplate<T>(T data, PdfExporterAttribute pdfExporterAttribute,string template);

2020.06.07

  • 【Nuget】版本更新到2.2.4

  • 【Excel導(dǎo)入】增加導(dǎo)入失敗僅返回錯誤行功能

  • 【Excel導(dǎo)入】修復(fù)導(dǎo)入的空行標(biāo)注位置偏移

  • 【Excel導(dǎo)出】增加SeparateByColumn進行分割追加列

2020.05.31

  • 【Nuget】版本更新到2.2.3

  • 【Excel導(dǎo)入】增加了stream Csv導(dǎo)入擴展方法

  • 【W(wǎng)ord導(dǎo)出】修復(fù)word文件字節(jié)導(dǎo)出錯誤

2020.05.24

  • 【Nuget】版本更新到2.2.2

  • 【Excel導(dǎo)入】增加了stream導(dǎo)入擴展方法

  • 【Excel導(dǎo)出】增加了內(nèi)容居中(單列居中、整表居中)

  • 【導(dǎo)出】對一些中間件代碼進行了修復(fù)及優(yōu)化

2020.05.16

  • 【Nuget】版本更新到2.2.1

  • 【PDF導(dǎo)出】對模板引擎進行升級更新

2020.05.12

  • 【Nuget】版本更新到2.2.0

  • 【Excel模板導(dǎo)出】支持導(dǎo)出字節(jié)

  • 【文檔】Magicodes.IE Csv導(dǎo)入導(dǎo)出

  • 【Excel導(dǎo)入導(dǎo)出】修復(fù)標(biāo)注的添加問題

  • 【導(dǎo)出】ASP.NET Core Web API 中使用自定義格式化程序?qū)С鯡xcel、Pdf、Csv等內(nèi)容?#64

  • 【導(dǎo)入導(dǎo)出】支持使用System.ComponentModel.DataAnnotations命名空間下的部分特性來控制導(dǎo)入導(dǎo)出?#63

2020.04.16

  • 【Nuget】版本更新到2.2.0-beta9

  • 【Excel模板導(dǎo)出】修復(fù)只存在一列時的導(dǎo)出?#73

  • 【Excel導(dǎo)入】支持返回表頭和索引?#76

  • 【Excel導(dǎo)入導(dǎo)入】#63

    • IEIgnoreAttribute(可作用于屬性、枚舉成員,可影響導(dǎo)入和導(dǎo)出)

    • DisplayAttribute

    • DisplayFormatAttribute

    • DescriptionAttribute

    • 支持使用System.ComponentModel.DataAnnotations命名空間下的部分特性來控制導(dǎo)入導(dǎo)出,比如

    • 封裝簡單的易于使用的單一特性,例如

2020.04.02

  • 【Nuget】版本更新到2.2.0-beta8

  • 【Excel模板導(dǎo)出】支持圖片?#62,渲染語法如下所示:

{{Image::ImageUrl?Width=50&Height=120&Alt=404}}{{Image::ImageUrl?w=50&h=120&Alt=404}}{{Image::ImageUrl?Alt=404}}

2020.03.29

  • 【Nuget】版本更新到2.2.0-beta7

  • 【Excel模板導(dǎo)出】修復(fù)渲染問題?#51

2020.03.27

  • 【Nuget】版本更新到2.2.0-beta6

  • 【Excel導(dǎo)入導(dǎo)出】修復(fù).NET Core 2.2的包引用問題?#68

2020.03.26

  • 【Nuget】版本更新到2.2.0-beta4

  • 【Excel多Sheet導(dǎo)出】修復(fù)#66,并添加單元測試

2020.03.25

  • 【Nuget】版本更新到2.2.0-beta3

  • 【Excel導(dǎo)入】修復(fù)日期問題?#68

  • 【Excel導(dǎo)出】添加ExcelOutputType設(shè)置,支持輸出無格式的導(dǎo)出。#54可以使用此方式。

2020.03.19

  • 【Nuget】版本更新到2.2.0-beta2

  • 【Excel導(dǎo)入】修復(fù)日期格式的導(dǎo)入Bug,支持DateTime和DateTimeOffset以及可為空類型,默認(rèn)支持本地化時間格式(默認(rèn)根據(jù)地區(qū)自動使用本地日期時間格式)

  • 【Excel導(dǎo)入導(dǎo)出】添加單元測試ExportAndImportUseOneDto_Test,對使用同一個Dto導(dǎo)出并導(dǎo)入進行測試。Issue見?#53

2020.03.18

  • 【Nuget】版本更新到2.2.0-beta1

  • 【Excel導(dǎo)出】添加以下API:

/// <summary>/// 追加集合到當(dāng)前導(dǎo)出程序/// append the collection to context/// </summary>/// <typeparam name="T"></typeparam>/// <param name="dataItems"></param>/// <returns></returns>ExcelExporter Append<T>(ICollection<T> dataItems) where T : class;/// <summary>/// 導(dǎo)出所有的追加數(shù)據(jù)/// export excel after append all collectioins/// </summary>/// <param name="fileName"></param>/// <returns></returns>Task<ExportFileInfo> ExportAppendData(string fileName);/// <summary>/// 導(dǎo)出所有的追加數(shù)據(jù)/// export excel after append all collectioins/// </summary>/// <param name="fileName"></param>/// <returns></returns>Task<byte[]> ExportAppendDataAsByteArray();
  • 【Excel導(dǎo)出】支持多個實體導(dǎo)出多個Sheet,感謝@ccccccmd 的貢獻?#pr52?,Issue見?#50。使用代碼參考,具體見單元測試(ExportMutiCollection_Test):

var exporter = new ExcelExporter();var list1 = GenFu.GenFu.ListOf<ExportTestDataWithAttrs>();var list2 = GenFu.GenFu.ListOf<ExportTestDataWithSplitSheet>(30);var result = exporter.Append(list1).Append(list2).ExportAppendData(filePath);

2020.03.12

  • 【Nuget】版本更新到2.1.4

  • 【Excel導(dǎo)入】支持圖片導(dǎo)入,見特性ImportImageFieldAttribute

    • 導(dǎo)入為Base64

    • 導(dǎo)入到臨時目錄

    • 導(dǎo)入到指定目錄

  • 【Excel導(dǎo)出】支持圖片導(dǎo)出,見特性ExportImageFieldAttribute

    • 將文件路徑導(dǎo)出為圖片

    • 將網(wǎng)絡(luò)路徑導(dǎo)出為圖片

2020.03.06

  • 【Nuget】版本更新到2.1.3

  • 【Excel導(dǎo)入】修復(fù)GUID類型的問題。問題見(https://github.com/dotnetcore/Magicodes.IE/issues/44)。

2020.02.25

  • 【Nuget】版本更新到2.1.2

  • 【導(dǎo)入導(dǎo)出】已支持CSV

  • 【文檔】完善Pdf導(dǎo)出文檔

2020.02.24

  • 【Nuget】版本更新到2.1.1-beta

  • 【導(dǎo)入】Excel導(dǎo)入支持導(dǎo)入標(biāo)注,僅需設(shè)置ExcelImporterAttribute的ImportDescription屬性,即會在頂部生成Excel導(dǎo)入說明

  • 【重構(gòu)】添加兩個接口

    • IExcelExporter:繼承自IExporter, IExportFileByTemplate,Excel特有的API將在此補充

    • IExcelImporter:繼承自IImporter,Excel特有的API在此補充,例如“ImportMultipleSheet”、“ImportSameSheets”

  • 【重構(gòu)】增加實例依賴注入

  • 【構(gòu)建】完成代碼覆蓋率的DevOps的配置

2020.02.14

  • 【Nuget】版本更新到2.1.0

  • 【導(dǎo)出】PDF導(dǎo)出支持.NET 4.6.1,具體見單元測試

2020.02.13

  • 【Nuget】版本更新到2.0.2

  • 【導(dǎo)入】修復(fù)單列導(dǎo)入的Bug,單元測試“OneColumnImporter_Test”。問題見(https://github.com/dotnetcore/Magicodes.IE/issues/35)。

  • 【導(dǎo)出】修復(fù)導(dǎo)出HTML、Pdf、Word時,模板在某些情況下編譯報錯的問題。

  • 【導(dǎo)入】重寫空行檢查。

2020.02.11

  • 【Nuget】版本更新到2.0.0

  • 【導(dǎo)出】Excel模板導(dǎo)出修復(fù)多個Table渲染以及合并單元格渲染的問題,具體見單元測試“ExportByTemplate_Test1”。問題見(https://github.com/dotnetcore/Magicodes.IE/issues/34)。

  • 【導(dǎo)出】完善模板導(dǎo)出的單元測試,針對導(dǎo)出結(jié)果添加渲染檢查,確保所有單元格均已渲染。

2020.02.05

  • 【Nuget】版本更新到2.0.0-beta4

  • 【導(dǎo)入】支持列篩選器(需實現(xiàn)接口【IImportHeaderFilter】),可用于兼容多語言導(dǎo)入等場景,具體見單元測試【ImportHeaderFilter_Test】

  • 【導(dǎo)入】支持傳入標(biāo)注文件路徑,不傳參則默認(rèn)同目錄"_"后綴保存

  • 【導(dǎo)入】完善單元測試【ImportResultFilter_Test】

  • 【其他】修改【ValueMappingAttribute】的命名空間為Magicodes.ExporterAndImporter.Core

2020.02.04

  • 【Nuget】版本更新到2.0.0-beta2

  • 【導(dǎo)入】支持導(dǎo)入結(jié)果篩選器——IImportResultFilter,可用于多語言場景的錯誤標(biāo)注,具體使用見單元測試【ImportResultFilter_Test】

  • 【其他】修改IExporterHeaderFilter的命名空間為Magicodes.ExporterAndImporter.Core.Filters

2020.01.18

  • 【Nuget】版本更新到2.0.0-beta1

  • 【導(dǎo)出】完全重構(gòu)整個導(dǎo)出Excel模塊并且重寫大部分接口

  • 【導(dǎo)出】支持列頭篩選器——IExporterHeaderFilter,具體使用見單元測試

  • 【導(dǎo)出】修復(fù)轉(zhuǎn)換DataTable時支持為空類型

  • 【導(dǎo)出】導(dǎo)出Excel支持拆分Sheet,僅需設(shè)置特性【ExporterAttribute】的【MaxRowNumberOnASheet】的值,為0則不拆分。具體見單元測試

  • 【導(dǎo)出】修復(fù)導(dǎo)出結(jié)果無法篩選的問題。目前導(dǎo)出即為數(shù)據(jù)表

  • 【導(dǎo)出】添加擴展方法ToExcelExportFileInfo

  • 【導(dǎo)出】IExporter再添加兩個動態(tài)DataTable導(dǎo)出方法,無需定義Dto即可動態(tài)導(dǎo)出數(shù)據(jù),并且支持表頭篩選器、Sheet拆分

/// <summary>/// 導(dǎo)出Excel/// </summary>/// <param name="fileName">文件名稱</param>/// <param name="dataItems">數(shù)據(jù)</param>/// <param name="exporterHeaderFilter">表頭篩選器</param>/// <param name="maxRowNumberOnASheet">一個Sheet最大允許的行數(shù),設(shè)置了之后將輸出多個Sheet</param>/// <returns>文件</returns>Task<ExportFileInfo> Export(string fileName, DataTable dataItems, IExporterHeaderFilter exporterHeaderFilter = null, int maxRowNumberOnASheet = 1000000);/// <summary>/// 導(dǎo)出Excel/// </summary>/// <param name="dataItems">數(shù)據(jù)</param>/// <param name="exporterHeaderFilter">表頭篩選器</param>/// <param name="maxRowNumberOnASheet">一個Sheet最大允許的行數(shù),設(shè)置了之后將輸出多個Sheet</param>/// <returns>文件二進制數(shù)組</returns>Task<byte[]> ExportAsByteArray(DataTable dataItems, IExporterHeaderFilter exporterHeaderFilter = null, int maxRowNumberOnASheet = 1000000);

2020.01.16

  • 【Nuget】版本更新到1.4.25

  • 【導(dǎo)出】修復(fù)沒有定義導(dǎo)出特性會報錯的情形,具體見單元測試“ExportTestDataWithoutExcelExporter_Test”。問題見(https://github.com/dotnetcore/Magicodes.IE/issues/21)。

2020.01.16

  • 【Nuget】版本更新到1.4.24

  • 【導(dǎo)出】修復(fù)日期格式默認(rèn)導(dǎo)出數(shù)字的Bug,默認(rèn)輸出“yyyy-MM-dd”,可以通過設(shè)置“[ExporterHeader(DisplayName = "日期2", Format = "yyyy-MM-dd HH:mm:ss")]”來修改。問題見(https://github.com/dotnetcore/Magicodes.IE/issues/22)。

2020.01.14

  • 【Nuget】版本更新到1.4.21

  • 【導(dǎo)出】Excel模板導(dǎo)出修復(fù)數(shù)據(jù)項為Null報錯的Bug。

2020.01.09

  • 【Nuget】版本更新到1.4.20

  • 【導(dǎo)出】Excel模板導(dǎo)出性能優(yōu)化。5000條表格數(shù)據(jù)1秒內(nèi)完成,具體見單元測試ExportByTemplate_Large_Test。

2020.01.08

  • 【Nuget】版本更新到1.4.18

  • 【導(dǎo)入】支持導(dǎo)入最大數(shù)量限制

    • ImporterAttribute支持MaxCount設(shè)置,默認(rèn)為50000

    • 完成相關(guān)單元測試

2020.01.07

  • 【Nuget】版本更新到1.4.17

  • 【重構(gòu)】重構(gòu)IExportFileByTemplate中的ExportByTemplate,將參數(shù)htmlTemplate改為template。以便支持Excel模板導(dǎo)出。

  • 【導(dǎo)出】支持Excel模板導(dǎo)出并填寫相關(guān)單元測試,如何使用見教程《Excel模板導(dǎo)出之導(dǎo)出教材訂購表》

    • 支持單元格單個綁定

    • 支持列表

2019.12.17

  • 【Nuget】版本更新到1.4.16

  • 【導(dǎo)入】Excel導(dǎo)入支持多sheet導(dǎo)入,感謝tanyongzheng(https://github.com/dotnetcore/Magicodes.IE/pull/18)

2019.12.10

  • 【Nuget】版本更新到1.4.15

  • 【測試】單元測試添加多框架版本支持 (https://docs.xin-lai.com/2019/12/10/%E6%8A%80%E6%9C%AF%E6%96%87%E6%A1%A3/Magicodes.IE%E7%BC%96%E5%86%99%E5%A4%9A%E6%A1%86%E6%9E%B6%E7%89%88%E6%9C%AC%E6%94%AF%E6%8C%81%E5%92%8C%E6%89%A7%E8%A1%8C%E5%8D%95%E5%85%83%E6%B5%8B%E8%AF%95/)

  • 【修復(fù)】修復(fù)部分.NET Framework 461下的問題

2019.12.06

  • 【Nuget】版本更新到1.4.14

  • 【重構(gòu)】大量重構(gòu)

    • 移除部分未使用的代碼

    • 將TemplateFileInfo重命名為ExportFileInfo

    • 將IExporterByTemplate接口拆分為4個接口:IExportListFileByTemplate, IExportListStringByTemplate, IExportStringByTemplate, IExportFileByTemplate,并修改相關(guān)實現(xiàn)

    • 重構(gòu)ImportHelper部分代碼

  • 【導(dǎo)入】修復(fù)導(dǎo)入Excel時表頭設(shè)置的問題,已對此編寫單元測試,見【產(chǎn)品信息導(dǎo)入】

  • 【完善】編寫ExportAsByteArray對于DataTable的單元測試,ExportWordFileByTemplate_Test

2019.11.25

  • 【Nuget】版本更新到1.4.13

  • 【導(dǎo)出】Pdf導(dǎo)出支持特性配置,詳見單元測試【導(dǎo)出豎向排版收據(jù)】。目前主要支持以下設(shè)置:

    • Orientation:排版方向(橫排、豎排)

    • PaperKind:紙張類型,默認(rèn)A4

    • IsEnablePagesCount:是否啟用分頁數(shù)

    • Encoding:編碼設(shè)置,默認(rèn)UTF8

    • IsWriteHtml:是否輸出HTML模板,如果啟用,則會輸出.html后綴的對應(yīng)的HTML文件,方便調(diào)錯

    • HeaderSettings:頭部設(shè)置,通常可以設(shè)置頭部的分頁內(nèi)容和信息

    • FooterSettings:底部設(shè)置

2019.11.24

  • 【Nuget】版本更新到1.4.12

  • 【導(dǎo)出】導(dǎo)出動態(tài)類支持超過100W數(shù)據(jù)時自動拆分Sheet(具體見PR:https://github.com/xin-lai/Magicodes.IE/pull/14)

2019.11.20

  • 【Nuget】版本更新到1.4.11

  • 【導(dǎo)出】修復(fù)Datatable列的順序和DTO的順序不一致,導(dǎo)致數(shù)據(jù)放錯列(具體見PR:https://github.com/xin-lai/Magicodes.IE/pull/13)

2019.11.16

  • 【Nuget】版本更新到1.4.10

  • 【導(dǎo)出】修復(fù)Pdf導(dǎo)出在多線程下的問題

2019.11.13

  • 【Nuget】版本更新到1.4.5

  • 【導(dǎo)出】修復(fù)導(dǎo)出Pdf在某些情況下可能會導(dǎo)致內(nèi)存報錯的問題

  • 【導(dǎo)出】添加批量導(dǎo)出收據(jù)單元測試示例,并添加大量數(shù)據(jù)樣本進行測試

2019.11.5

  • 【Nuget】版本更新到1.4.4

  • 【導(dǎo)入】修復(fù)枚舉類型的問題,并編寫單元測試

  • 【導(dǎo)入】增加值映射,支持通過“ValueMappingAttribute”特性設(shè)置值映射關(guān)系。用于生成導(dǎo)入模板的數(shù)據(jù)驗證約束以及進行數(shù)據(jù)轉(zhuǎn)換。

  • 【導(dǎo)入】優(yōu)化枚舉和Bool類型的導(dǎo)入數(shù)據(jù)驗證項的生成,以便于模板生成和數(shù)據(jù)轉(zhuǎn)換

    • 枚舉默認(rèn)情況下會自動獲取枚舉的描述、顯示名、名稱和值生成數(shù)據(jù)項

    • bool類型默認(rèn)會生成“是”和“否”的數(shù)據(jù)項

    • 如果已設(shè)置自定義值映射,則不會生成默認(rèn)選項

  • 【導(dǎo)入】支持枚舉可為空類型

2019.10.30

  • 【Nuget】版本更新到1.4.0

  • 【導(dǎo)出】Excel導(dǎo)出支持動態(tài)列導(dǎo)出(基于DataTable),感謝張善友(https://github.com/xin-lai/Magicodes.IE/pull/8?)

2019.10.22

  • 【Nuget】版本更新到1.3.7

  • 【導(dǎo)入】修復(fù)忽略列的驗證問題

  • 【導(dǎo)入】修正驗證錯誤信息,一行僅允許存在一條數(shù)據(jù)

  • 【導(dǎo)入】修復(fù)忽略列在某些情況下可能引發(fā)的異常

  • 【導(dǎo)入】添加存在忽略列的導(dǎo)入情形下的單元測試

2019.10.21

  • 【Nuget】版本更新到1.3.4

  • 【導(dǎo)入】支持設(shè)置忽略列,以便于在Dto定義數(shù)據(jù)列做處理或映射

2019.10.18

  • 【優(yōu)化】優(yōu)化.NET標(biāo)準(zhǔn)庫2.1下集合轉(zhuǎn)DataTable的性能

  • 【重構(gòu)】多處IList修改為ICollection

  • 【完善】補充部分單元測試

2019.10.12

  • 【重構(gòu)】重構(gòu)HTML、PDF導(dǎo)出等邏輯,并修改IExporterByTemplate為:

    • Task ExportListByTemplate(IList dataItems, string htmlTemplate = null) where T : class;

    • Task ExportByTemplate(T data, string htmlTemplate = null) where T : class;

  • 【示例】添加收據(jù)導(dǎo)出的單元測試示例

2019.9.28

  • 【導(dǎo)出】修改默認(rèn)的導(dǎo)出HTML、Word、Pdf模板

  • 【導(dǎo)入】添加截斷行的單元測試,以測試中間空格和結(jié)尾空格

  • 【導(dǎo)入】將【數(shù)據(jù)錯誤檢測】和【導(dǎo)入】單元測試的Dto分開,確保全部單元測試通過

  • 【文檔】更新文檔

2019.9.26

  • 【導(dǎo)出】支持導(dǎo)出Word、Pdf、HTML,支持自定義導(dǎo)出模板

  • 【導(dǎo)出】添加相關(guān)導(dǎo)出的單元測試

  • 【導(dǎo)入】支持重復(fù)驗證,需設(shè)置ImporterHeader特性的IsAllowRepeat為false

2019.9.19

  • 【導(dǎo)入】支持截止列設(shè)置,如未設(shè)置則默認(rèn)遇到空格截止

  • 【導(dǎo)入】導(dǎo)入支持通過特性設(shè)置Sheet名稱

2019.9.18

  • 【導(dǎo)入】重構(gòu)導(dǎo)入模塊

  • 【導(dǎo)入】統(tǒng)一導(dǎo)入錯誤消息

    • Exception :導(dǎo)入異常信息

    • RowErrors :數(shù)據(jù)錯誤信息

    • TemplateErrors :模板錯誤信息,支持錯誤分級

    • HasError : 是否存在錯誤(僅當(dāng)出現(xiàn)異常并且錯誤等級為Error時返回true)

  • 【導(dǎo)入】基礎(chǔ)類型必填自動識別,比如int、double等不可為空類型自動識別,無需額外設(shè)置Required

  • 【導(dǎo)入】修改Excel模板的Sheet名稱

  • 【導(dǎo)入】支持導(dǎo)入表頭位置設(shè)置,默認(rèn)為1

  • 【導(dǎo)入】支持列亂序(導(dǎo)入模板的列序號不再需要固定)

  • 【導(dǎo)入】支持列索引設(shè)置

  • 【導(dǎo)入】支持將導(dǎo)入的Excel進行錯誤標(biāo)注,支持多個錯誤

  • 【導(dǎo)入】加強對基礎(chǔ)類型和可為空類型的支持

  • 【EPPlus】由于EPPlus.Core已經(jīng)不維護,將EPPlus的包從EPPlus.Core改為EPPlus,

2019.9.11

  • 【導(dǎo)入】導(dǎo)入支持自動去除前后空格,默認(rèn)啟用,可以針對列進行關(guān)閉,具體見AutoTrim設(shè)置

  • 【導(dǎo)入】導(dǎo)入Dto的字段允許不設(shè)置ImporterHeader,支持通過DisplayAttribute特性獲取列名

  • 【導(dǎo)入】導(dǎo)入的Excel移除對Sheet名稱的約束,默認(rèn)獲取第一個Sheet

  • 【導(dǎo)入】導(dǎo)入增加對中間空格的處理支持,需設(shè)置FixAllSpace

  • 【導(dǎo)入】導(dǎo)入完善對日期類型的支持

  • 【導(dǎo)入】完善導(dǎo)入的單元測試

總結(jié)

以上是生活随笔為你收集整理的Magicodes.IE 2.5.6.1发布的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。