From 1c2e7c5c68f15739112e9c06d238b81318af0c97 Mon Sep 17 00:00:00 2001 From: WXDYGR <33148310+WXDYGR@users.noreply.github.com> Date: Wed, 5 Aug 2020 20:33:12 +0800 Subject: [PATCH] Update styles.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复获取百分比值时,GetCellValue返回值不准确的问题 --- styles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles.go b/styles.go index d7b1460..c3a2393 100644 --- a/styles.go +++ b/styles.go @@ -909,7 +909,7 @@ func formatToC(i int, v string) string { return v } f = f * 100 - return fmt.Sprintf("%d%%", int(f)) + return fmt.Sprintf("%.f%%", f) } // formatToD provides a function to convert original string to special format