worksheet.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package xlsx
  2. // XLSXWorksheet directly maps the worksheet element in the namespace
  3. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  4. // currently I have not checked it for completeness - it does as much
  5. // as I need.
  6. type XLSXWorksheet struct {
  7. Dimension XLSXDimension `xml:"dimension"`
  8. SheetViews XLSXSheetViews `xml:"sheetViews"`
  9. SheetFormatPr XLSXSheetFormatPr `xml:"sheetFormatPr"`
  10. SheetData XLSXSheetData `xml:"sheetData"`
  11. }
  12. // XLSXDimension directly maps the dimension element in the namespace
  13. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  14. // currently I have not checked it for completeness - it does as much
  15. // as I need.
  16. type XLSXDimension struct {
  17. Ref string `xml:"ref,attr"`
  18. }
  19. // XLSXSheetViews directly maps the sheetViews element in the namespace
  20. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  21. // currently I have not checked it for completeness - it does as much
  22. // as I need.
  23. type XLSXSheetViews struct {
  24. SheetView []XLSXSheetView `xml:"sheetView"`
  25. }
  26. // XLSXSheetView directly maps the sheetView element in the namespace
  27. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  28. // currently I have not checked it for completeness - it does as much
  29. // as I need.
  30. type XLSXSheetView struct {
  31. TabSelected string `xml:"tabSelected,attr"`
  32. WorkbookViewID string `xml:"workbookViewId,attr"`
  33. Selection XLSXSelection `xml:"selection"`
  34. }
  35. // XLSXSelection directly maps the selection element in the namespace
  36. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  37. // currently I have not checked it for completeness - it does as much
  38. // as I need.
  39. type XLSXSelection struct {
  40. ActiveCell string `xml:"activeCell,attr"`
  41. SQRef string `xml:"sqref,attr"`
  42. }
  43. // XLSXSheetFormatPr directly maps the sheetFormatPr element in the namespace
  44. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  45. // currently I have not checked it for completeness - it does as much
  46. // as I need.
  47. type XLSXSheetFormatPr struct {
  48. BaseColWidth string `xml:"baseColWidth,attr"`
  49. DefaultRowHeight string `xml:"defaultRowHeight,attr"`
  50. }
  51. // XLSXSheetData directly maps the sheetData element in the namespace
  52. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  53. // currently I have not checked it for completeness - it does as much
  54. // as I need.
  55. type XLSXSheetData struct {
  56. Row []XLSXRow `xml:"row"`
  57. }
  58. // XLSXRow directly maps the row element in the namespace
  59. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  60. // currently I have not checked it for completeness - it does as much
  61. // as I need.
  62. type XLSXRow struct {
  63. R string `xml:"r,attr"`
  64. Spans string `xml:"spans,attr"`
  65. C []XLSXC `xml:"c"`
  66. }
  67. // XLSXC directly maps the c element in the namespace
  68. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  69. // currently I have not checked it for completeness - it does as much
  70. // as I need.
  71. type XLSXC struct {
  72. R string `xml:"r,attr"`
  73. T string `xml:"t,attr"`
  74. V string `xml:"v"`
  75. }
  76. // XLSXV directly maps the v element in the namespace
  77. // http://schemas.openxmlformats.org/spreadsheetml/2006/main -
  78. // currently I have not checked it for completeness - it does as much
  79. // as I need.
  80. // type XLSXV struct {
  81. // Data string `xml:"chardata"`
  82. // }