diff options
author | match-meng <54879059+match-meng@users.noreply.github.com> | 2019-12-20 22:22:56 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2019-12-20 22:22:56 +0800 |
commit | 7358dca436f6ca5948a3f2865b14e828863d86a9 (patch) | |
tree | f021420d9227772f0ab7db314790661f0c4ebb72 /rows.go | |
parent | 4249dad8eaf8a6dee93fafeffe0bbbd794581ffe (diff) |
Update comments for the xmlNewDecoder (#542)
Diffstat (limited to 'rows.go')
-rw-r--r-- | rows.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -283,7 +283,10 @@ func (xlsx *xlsxC) getValueFrom(f *File, d *xlsxSST) (string, error) { case "s": xlsxSI := 0 xlsxSI, _ = strconv.Atoi(xlsx.V) - return f.formattedValue(xlsx.S, d.SI[xlsxSI].String()), nil + if len(d.SI) > xlsxSI { + return f.formattedValue(xlsx.S, d.SI[xlsxSI].String()), nil + } + return f.formattedValue(xlsx.S, xlsx.V), nil case "str": return f.formattedValue(xlsx.S, xlsx.V), nil case "inlineStr": |