Compare commits
No commits in common. "7b035e00d6175c451ce0c38b3ae02144af563292" and "13c27da6180046447af3acbd7a0c5a99d7e6541e" have entirely different histories.
7b035e00d6
...
13c27da618
@ -474,7 +474,7 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, fns
|
||||
var cellValue any
|
||||
switch field.Kind() {
|
||||
case reflect.Float32, reflect.Float64:
|
||||
cellValue = fmt.Sprintf("$%.2f", field.Float()) // 保留两位小数
|
||||
cellValue = fmt.Sprintf("%.2f", field.Float()) // 保留两位小数
|
||||
default:
|
||||
cellValue = field.Interface()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user