Skip to content

Conversation

@izanhzh
Copy link
Member

@izanhzh izanhzh commented Jan 23, 2025

close: #708

我注意到,在此前的PR #700 中,DynamicExcelColumn增加了一个属性:

public Func<object, string> CustomFormatter { get; set; }

PR #700 存在一些问题,假设我原来的值是数字类型,因为这里返回的值是string类型,并且因为调用CustomFormatter委托时机问题,导致最终生成的Excel单元格设置是数字但实际值非数字,Excel打开报错,例如,我想对金额加一个币别符号1 -> $1

我进行了一些优化,调整为 Func<object, object>,可以避免此问题

@izanhzh izanhzh requested a review from shps951023 January 23, 2025 03:39
@shps951023 shps951023 merged commit 2e7219c into mini-software:master Jan 23, 2025
3 checks passed
@izanhzh izanhzh deleted the feat-custom-formatter branch February 6, 2025 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

写文件时,对格式化数据的支持

2 participants