xmlSharedStrings.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. RPr *xlsxRPr `xml:"rPr"`
  28. T string `xml:"t"`
  29. }
  30. // xlsxRPr (Run Properties) specifies a set of run properties which shall be
  31. // applied to the contents of the parent run after all style formatting has been
  32. // applied to the text. These properties are defined as direct formatting, since
  33. // they are directly applied to the run and supersede any formatting from
  34. // styles.
  35. type xlsxRPr struct {
  36. B string `xml:"b,omitempty"`
  37. Sz *attrValFloat `xml:"sz"`
  38. Color *xlsxColor `xml:"color"`
  39. RFont *attrValString `xml:"rFont"`
  40. Family *attrValInt `xml:"family"`
  41. }