We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ b25a7003-8062-4c93-8926-a1a1407697a8.xlsx ](url)
1.33.0
我的数据源有long类型的字段,已经在代码中将excel的列格式设置为文本格式(@),虽然生成的excel看起来是正常显示了的,但实际上点击下就变成了科学计数法,而且列的格式显示的仍然是常规。
var path = Path.Combine("C:\\Demo\\", $"{Guid.NewGuid()}.xlsx"); var config = new OpenXmlConfiguration { AutoFilter = false, DynamicColumns = [ new DynamicExcelColumn("long2") { Format = "@", Width = 25 }, ] }; var value = new[] { new { long2 = "1550432695793487872" } }; MiniExcel.SaveAs(path, value, configuration: config);
The text was updated successfully, but these errors were encountered:
可以判断是否超过值,假如超过在前面加上 '
'
Sorry, something went wrong.
更新,SaveAs 应该要增加长数值判断,自动加上 style quotePrefix="1" 并把 text 的值改为去除 ' 下个版本实现选项 EnableQuotePrefix 给用户选择
quotePrefix="1"
EnableQuotePrefix
No branches or pull requests
Excel Type
Upload Excel File
[
b25a7003-8062-4c93-8926-a1a1407697a8.xlsx
](url)
MiniExcel Version
1.33.0
Description
我的数据源有long类型的字段,已经在代码中将excel的列格式设置为文本格式(@),虽然生成的excel看起来是正常显示了的,但实际上点击下就变成了科学计数法,而且列的格式显示的仍然是常规。
The text was updated successfully, but these errors were encountered: