dotnetcore / dotnetcore/Magicodes.IE
在 excle 使用 Dictionary<string, object> 动态导出时 能否弄个默认值
Open
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 495
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
在 excel 使用 Dictionary 动态导出时 模版文件 列 在数据中 没有 能否弄成默认值 或者 让异常 选择性的抛出。
我这边 是有个动态表单的导出,所以 会导致 上传的模版 和 数据对应不上 就会导致异常。
例如:我的模板里面 有 【WorkUnit】字段,我的数据字典里面 没有 【WorkUnit】字段 就会抛出 【The given key 'WorkUnit' was not present in the dictionary.】 异常。
**Describe the solution you'd like**
不抛出异常或者选择性的抛出,或者就默认为空白也可以。
**Describe alternatives you've considered**
之前是直接复制源码 重新修改一下 这个判断,现在版本升级后就不好处理了
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.