diff options
author | Harris <mike.harris@cerner.com> | 2019-08-07 16:26:13 -0500 |
---|---|---|
committer | Harris <mike.harris@cerner.com> | 2019-08-09 08:12:08 -0500 |
commit | acd76425c2ee55c45a51cf7f71c8a6187a09f507 (patch) | |
tree | 1e6f35871372f5753da9ff9671fb94541f20d49f /rows.go | |
parent | e07581e980444b64bc15fce328ff07736ac9dbf6 (diff) |
Handle multi row inline strings
The inline string struct is actually the same
as the shared strings struct, reuse it.
Note that Go version 1.10 is required.
Fixes #462
Diffstat (limited to 'rows.go')
-rw-r--r-- | rows.go | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -206,18 +206,11 @@ func (xlsx *xlsxC) getValueFrom(f *File, d *xlsxSST) (string, error) { case "s": xlsxSI := 0 xlsxSI, _ = strconv.Atoi(xlsx.V) - if len(d.SI[xlsxSI].R) > 0 { - value := "" - for _, v := range d.SI[xlsxSI].R { - value += v.T - } - return value, nil - } - return f.formattedValue(xlsx.S, d.SI[xlsxSI].T), nil + return f.formattedValue(xlsx.S, d.SI[xlsxSI].String()), nil case "str": return f.formattedValue(xlsx.S, xlsx.V), nil case "inlineStr": - return f.formattedValue(xlsx.S, xlsx.IS.T), nil + return f.formattedValue(xlsx.S, xlsx.IS.String()), nil default: return f.formattedValue(xlsx.S, xlsx.V), nil } |