formula
Ri Xu 8 years ago
parent 94dc0da329
commit 53564cbe57

@ -82,6 +82,13 @@ func (xlsx *xlsxC) getValueFrom(f *File) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
if len(d.SI[xlsxSI].R) > 0 {
value := ""
for _, v := range d.SI[xlsxSI].R {
value += v.T
}
return value, nil
}
return d.SI[xlsxSI].T, nil return d.SI[xlsxSI].T, nil
case "str": case "str":
return xlsx.V, nil return xlsx.V, nil

Binary file not shown.

@ -3,8 +3,12 @@ package excelize
import "encoding/xml" import "encoding/xml"
// xlsxSST directly maps the sst element from the namespace // xlsxSST directly maps the sst element from the namespace
// http://schemas.openxmlformats.org/spreadsheetml/2006/main currently I have // http://schemas.openxmlformats.org/spreadsheetml/2006/main. String values may
// not checked this for completeness - it does as much as I need. // be stored directly inside spreadsheet cell elements; however, storing the
// same value inside multiple cell elements can result in very large worksheet
// Parts, possibly resulting in performance degradation. The Shared String Table
// is an indexed list of string values, shared across the workbook, which allows
// implementations to store values only once.
type xlsxSST struct { type xlsxSST struct {
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main sst"` XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main sst"`
Count int `xml:"count,attr"` Count int `xml:"count,attr"`

Loading…
Cancel
Save