Skip to content

Commit

Permalink
Fix issue qax-os#19.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuri committed Feb 7, 2017
1 parent 94dc0da commit 53564cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ func (xlsx *xlsxC) getValueFrom(f *File) (string, error) {
if err != nil {
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
case "str":
return xlsx.V, nil
Expand Down
Binary file modified test/Workbook1.xlsx
Binary file not shown.
8 changes: 6 additions & 2 deletions xmlSharedStrings.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ package excelize
import "encoding/xml"

// xlsxSST directly maps the sst element from the namespace
// http://schemas.openxmlformats.org/spreadsheetml/2006/main currently I have
// not checked this for completeness - it does as much as I need.
// http://schemas.openxmlformats.org/spreadsheetml/2006/main. String values may
// 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 {
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main sst"`
Count int `xml:"count,attr"`
Expand Down

0 comments on commit 53564cb

Please sign in to comment.