|
@@ -1230,11 +1230,12 @@ func handleMixCellShowStyle(showStyleList []string, calculateCellMap map[string]
|
|
|
|
|
|
cell := config[cellPosition.Column][cellPosition.Row]
|
|
|
val := cell.ShowValue
|
|
|
- isPercent := false
|
|
|
- if strings.Contains(val, "%") {
|
|
|
- isPercent = true
|
|
|
- val = strings.Trim(val, "%")
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
_, e := strconv.ParseFloat(val, 64)
|
|
|
if e != nil {
|
|
|
var styleConf request.MixCellShowStyle
|
|
@@ -1262,11 +1263,11 @@ func handleMixCellShowStyle(showStyleList []string, calculateCellMap map[string]
|
|
|
return
|
|
|
}
|
|
|
hasPercent := false
|
|
|
- if styleConf.Nt == "percent" || isPercent {
|
|
|
+ if styleConf.Nt == "percent" {
|
|
|
hasPercent = true
|
|
|
}
|
|
|
if styleConf.Pn != 0 || styleConf.Nt != "" {
|
|
|
- val := changePointDecimalPlaces(val, styleConf.Pn, styleConf.Nt, isPercent)
|
|
|
+ val := changePointDecimalPlaces(val, styleConf.Pn, styleConf.Nt, hasPercent)
|
|
|
cell.ShowFormatValue = val
|
|
|
|
|
|
if styleConf.Pn > 0 {
|