xmlSharedStrings.go 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. package excelize
  2. import "encoding/xml"
  3. // xlsxSST directly maps the sst element from the namespace
  4. // http://schemas.openxmlformats.org/spreadsheetml/2006/main. String values may
  5. // be stored directly inside spreadsheet cell elements; however, storing the
  6. // same value inside multiple cell elements can result in very large worksheet
  7. // Parts, possibly resulting in performance degradation. The Shared String Table
  8. // is an indexed list of string values, shared across the workbook, which allows
  9. // implementations to store values only once.
  10. type xlsxSST struct {
  11. XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main sst"`
  12. Count int `xml:"count,attr"`
  13. UniqueCount int `xml:"uniqueCount,attr"`
  14. SI []xlsxSI `xml:"si"`
  15. }
  16. // xlsxSI directly maps the si element from the namespace
  17. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  18. // not checked this for completeness - it does as much as I need.
  19. type xlsxSI struct {
  20. T string `xml:"t"`
  21. R []xlsxR `xml:"r"`
  22. }
  23. // xlsxR directly maps the r element from the namespace
  24. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  25. // not checked this for completeness - it does as much as I need.
  26. type xlsxR struct {
  27. T string `xml:"t"`
  28. }