From e05867a033cabfa100e7c2b284e1f85fd4769c3c Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Thu, 29 Jun 2017 13:28:44 +0800 Subject: Function `GetCellValue()` performance improvement by avoid repeating deserialization, relate issue #70. --- cell.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cell.go') diff --git a/cell.go b/cell.go index a8f6861..dc2263a 100644 --- a/cell.go +++ b/cell.go @@ -1,7 +1,6 @@ package excelize import ( - "encoding/xml" "strconv" "strings" ) @@ -48,10 +47,9 @@ func (f *File) GetCellValue(sheet, axis string) string { } switch r.T { case "s": - shardStrings := xlsxSST{} + shardStrings := f.sharedStringsReader() xlsxSI := 0 xlsxSI, _ = strconv.Atoi(r.V) - xml.Unmarshal([]byte(f.readXML("xl/sharedStrings.xml")), &shardStrings) return f.formattedValue(r.S, shardStrings.SI[xlsxSI].T) case "str": return f.formattedValue(r.S, r.V) -- cgit v1.2.1