dotnetcore / dotnetcore/Magicodes.IE

ExporterHeader 特性写有其他内容,但是不写DisplayName可否回落读取 [DisplayName("")]标签?

Open
#366 1 comment 0 reactions 0 assignees View on GitHub
area-excel bug
Dominant language
C#
Stars
2.2k
Forks
495
PR merge metrics
No merged PRs in 30d

Description

l例如这个情况,不写 [ExporterHeader(DisplayName = "备注", IsAutoFit = false)] 导出会显示Remark作为列名.
```
[ExporterHeader(IsAutoFit = false)]
[JsonProperty, Column(StringLength = -1)]
[DisplayName("备注")]
public string Remark { get; set; }

```
以下写法是ok的,导出能显示"备注"作为列名
```
[ExporterHeader(DisplayName = "备注", IsAutoFit = false)]
[JsonProperty, Column(StringLength = -1)]
[DisplayName("备注")]
public string Remark { get; set; }

```

```
[JsonProperty, Column(StringLength = -1)]
[DisplayName("备注")]
public string Remark { get; set; }

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.