summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-06-29 13:28:44 +0800
committerRi Xu <xuri.me@gmail.com>2017-06-29 13:28:44 +0800
commite05867a033cabfa100e7c2b284e1f85fd4769c3c (patch)
tree2820695a09103d12d22dc75cebb8a06632f7519f /cell.go
parent86466654e270786428540e34fd0a61e7d537a99c (diff)
Function `GetCellValue()` performance improvement by avoid repeating deserialization, relate issue #70.
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go4
1 files changed, 1 insertions, 3 deletions
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)