Magicodes.IE 2.7.1发布

2.7.1

2022.12.01

2.7.0

2022.11.07

2.7.0-beta

2022.10.27

2.6.9

2022.10.26

2.6.8

2022.10.18

2.6.7

2022.10.12

2.6.5-beta1

2022.07.17

2.6.4

2022.04.17

2.6.3

2022.03.06

 builder.Services.AddTransient;
builder.Services.AddTransient;
builder.Services.AddTransient;

[ExcelImporter(ImportHeaderFilter = typeof(ImportHeaderFilterB))]
public class ImportExcelTemplateDto
{
[ImporterHeader(Name = "TypeName")]
public string? Name { get; set; }
}

2.6.2

2022.03.02

 [Fact(DisplayName = "导入结果回调函数测试")]
public async Task ImportResultCallBack_Test
{
var filePath = Path.Combine(Directory.GetCurrentDirectory, "TestFiles", "Import", "缴费流水导入模板.xlsx");
var import = await Importer.Import(filePath, (importResult) =>
{
int rowNum = ;2 //首行数据对应Excel中的行号首行数据对应Excel中的行号
foreach (var importPaymentLogDto in importResult.Data)
{
if (importPaymentLogDto.Amount > 5000)
{
var dataRowError = new DataRowErrorInfo;
dataRowError.RowIndex = rowNum;
dataRowError.FieldErrors.Add("Amount", "金额不能大于5000");
importResult.RowErrors.Add(dataRowError);
}
rowNum++;
}
return importResult;
});
import.ShouldNotBe;
import.HasError.ShouldBeTrue;
import.RowErrors.ShouldContain(p => p.RowIndex == 3 && p.FieldErrors.ContainsKey("金额不能大于5000"));
import.Exception.ShouldBe;
import.Data.Count.ShouldBe(20);
}

2.6.1

2.6.0

2021.11.29

2.5.6.3

2021.10.23

2.5.6.2

2021.10.13

2.5.6.1

2021.10.06

2.5.6.0

2021.10.05

2.5.5.4

2021.09.02

2.5.5.3

2021.08.27

2.5.5.2

2021.08.24

如何使用?

 
 [DependsOn(
typeof(MagicodesIEExcelModule),
typeof(MagicodesIEPdfModule)
)]

2.5.5.1

2021.08.07

2.5.4.9

2021.07.23

2.5.4.8

2021.07.15

2.5.4.6

2021.07.04

2.5.4.5

2021.06.29

2.5.4.4

2021.06.25

2.5.4.3

2021.06.18

2.5.4.2

2021.06.05

2.5.4.1

2021.06.05

2.5.4.0

2021.06.01

2.5.3.9

2021.05.26

2.5.3.8

2021.05.10

2.5.3.7

2021.04.23

2.5.3.6

2021.04.18

[ImporterHeader(Name = "序号", Format ="@")]
**YOffset**:垂直偏移(可进行移动图片)
**XOffset**:水平偏移(可进行移动图片)
[ExcelImporter(SheetIndex = 2)]

2.5.3.5

2021.04.13

2.5.3.4

2021.04.06

2.5.3.3

2021.04.03

2.5.3.2

2021.03.30

2.5.3.1

2021.03.12

2.5.3

2021.03.08

2.5.2

2021.03.05

2.5.1.8

2021.02.23

2.5.1.7

2021.02.20

2.5.1.6

2021.01.31

2.5.1.5

2021.01.29

2.5.1.4

2021.01.09

2.5.1.3

2021.01.02

2.5.1

2020.12.21

2.5.0

2020.12.03

2.5.0-beta6

2020.11.26

2.5.0-beta5

2020.11.25

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)

2.5.0-beta3

2020.10.29

2.5.0-beta2

2020.10.20

2.4.0

2020.10.01

 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
AppDependencyResolver.Init(app.ApplicationServices);
//all other code
}

2.4.0-beta4

2020.09.26

2.4.0-beta3

2020.09.24

2.4.0-beta2

2020.09.16

 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
AppDependencyResolver.Init(app.ApplicationServices);
//all other code
}

2.4.0-beta1

2020.09.14

2.3.0

2020.08.30

2.3.0-beta8

2020.08.22

2.3.0-beta7

2020.08.16

2020.08.10

2020.08.04

2020.07.14

2020.07.13

2020.07.06

2020.06.22

2020.06.16

2020.06.14

2020.06.07

2020.05.31

2020.05.24

2020.05.16

2020.05.12

2020.04.16

2020.04.02

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

2020.03.29

2020.03.27

2020.03.26

2020.03.25

2020.03.19

2020.03.18

 /// 
/// 追加集合到当前导出程序
/// append the collection to context
///

///
///
///
ExcelExporter Append(ICollection dataItems) where T : class;

///
/// 导出所有的追加数据
/// export excel after append all collectioins
///

///
///
Task ExportAppendData(string fileName);

///
/// 导出所有的追加数据
/// export excel after append all collectioins
///

///
///
Task ExportAppendDataAsByteArray;
 var exporter = new ExcelExporter;
var list1 = GenFu.GenFu.ListOf;
var list2 = GenFu.GenFu.ListOf(30);
var result = exporter.Append(list1).Append(list2).ExportAppendData(filePath);

2020.03.12

2020.03.06

2020.02.25

2020.02.24

2020.02.14

2020.02.13

2020.02.11

2020.02.05

2020.02.04

2020.01.18

 /// 
/// 导出Excel
///

/// 文件名称
/// 数据
/// 表头筛选器
/// 一个Sheet最大允许的行数,设置了之后将输出多个Sheet
/// 文件
Task Export(string fileName, DataTable dataItems, IExporterHeaderFilter exporterHeaderFilter = , int maxRowNumberOnASheet = 1000000);

///
/// 导出Excel
///

/// 数据
/// 表头筛选器
/// 一个Sheet最大允许的行数,设置了之后将输出多个Sheet
/// 文件二进制数组
Task ExportAsByteArray(DataTable dataItems, IExporterHeaderFilter exporterHeaderFilter = , int maxRowNumberOnASheet = 1000000);

2020.01.16

2020.01.16

2020.01.14

2020.01.09

2020.01.08

2020.01.07

2019.12.17

2019.12.10

2019.12.06

2019.11.25

2019.11.24

2019.11.20

2019.11.16

2019.11.13

2019.11.5

2019.10.30

2019.10.22

2019.10.21

2019.10.18

2019.10.12

2019.9.28

2019.9.26

2019.9.19

2019.9.18

2019.9.11

展开阅读全文

页面更新:2024-02-29

标签:表头   特性   模板   错误   名称   类型   版本   动态   数据   图片

1 2 3 4 5

上滑加载更多 ↓
推荐阅读:
友情链接:
更多:

本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828  

© CopyRight 2020-2024 All Rights Reserved. Powered By 71396.com 闽ICP备11008920号-4
闽公网安备35020302034903号

Top