xmlPivotCache.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. package excelize
  2. import "encoding/xml"
  3. // pivotCacheDefinition represents the pivotCacheDefinition part. This part
  4. // defines each field in the source data, including the name, the string
  5. // resources of the instance data (for shared items), and information about
  6. // the type of data that appears in the field.
  7. type xmlPivotCacheDefinition struct {
  8. XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main pivotCacheDefinition"`
  9. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  10. Invalid bool `xml:"invalid,attr,omitempty"`
  11. SaveData bool `xml:"saveData,attr,omitempty"`
  12. RefreshOnLoad bool `xml:"refreshOnLoad,attr,omitempty"`
  13. OptimizeMemory bool `xml:"optimizeMemory,attr,omitempty"`
  14. EnableRefresh bool `xml:"enableRefresh,attr,omitempty"`
  15. RefreshedBy string `xml:"refreshedBy,attr,omitempty"`
  16. RefreshedDate float64 `xml:"refreshedDate,attr,omitempty"`
  17. RefreshedDateIso float64 `xml:"refreshedDateIso,attr,omitempty"`
  18. BackgroundQuery bool `xml:"backgroundQuery,attr"`
  19. MissingItemsLimit int `xml:"missingItemsLimit,attr,omitempty"`
  20. CreatedVersion int `xml:"createdVersion,attr,omitempty"`
  21. RefreshedVersion int `xml:"refreshedVersion,attr,omitempty"`
  22. MinRefreshableVersion int `xml:"minRefreshableVersion,attr,omitempty"`
  23. RecordCount int `xml:"recordCount,attr,omitempty"`
  24. UpgradeOnRefresh bool `xml:"upgradeOnRefresh,attr,omitempty"`
  25. TupleCacheAttr bool `xml:"tupleCache,attr,omitempty"`
  26. SupportSubquery bool `xml:"supportSubquery,attr,omitempty"`
  27. SupportAdvancedDrill bool `xml:"supportAdvancedDrill,attr,omitempty"`
  28. CacheSource *xlsxCacheSource `xml:"cacheSource"`
  29. CacheFields *xlsxCacheFields `xml:"cacheFields"`
  30. CacheHierarchies *xlsxCacheHierarchies `xml:"cacheHierarchies"`
  31. Kpis *xlsxKpis `xml:"kpis"`
  32. TupleCache *xlsxTupleCache `xml:"tupleCache"`
  33. CalculatedItems *xlsxCalculatedItems `xml:"calculatedItems"`
  34. CalculatedMembers *xlsxCalculatedMembers `xml:"calculatedMembers"`
  35. Dimensions *xlsxDimensions `xml:"dimensions"`
  36. MeasureGroups *xlsxMeasureGroups `xml:"measureGroups"`
  37. Maps *xlsxMaps `xml:"maps"`
  38. ExtLst *xlsxExtLst `xml:"extLst"`
  39. }
  40. // xlsxCacheSource represents the description of data source whose data is
  41. // stored in the pivot cache. The data source refers to the underlying rows or
  42. // database records that provide the data for a PivotTable. You can create a
  43. // PivotTable report from a SpreadsheetML table, an external database
  44. // (including OLAP cubes), multiple SpreadsheetML worksheets, or another
  45. // PivotTable.
  46. type xlsxCacheSource struct {
  47. }
  48. // xlsxCacheFields represents the collection of field definitions in the
  49. // source data.
  50. type xlsxCacheFields struct {
  51. Count int `xml:"count,attr"`
  52. CacheField []*xlsxCacheField `xml:"cacheField"`
  53. }
  54. // xlsxCacheField represent a single field in the PivotCache. This definition
  55. // contains information about the field, such as its source, data type, and
  56. // location within a level or hierarchy. The sharedItems element stores
  57. // additional information about the data in this field. If there are no shared
  58. // items, then values are stored directly in the pivotCacheRecords part.
  59. type xlsxCacheField struct {
  60. Name string `xml:"name,attr"`
  61. Caption string `xml:"caption,attr,omitempty"`
  62. PropertyName string `xml:"propertyName,attr,omitempty"`
  63. ServerField bool `xml:"serverField,attr,omitempty"`
  64. UniqueList bool `xml:"uniqueList,attr,omitempty"`
  65. NumFmtId string `xml:"numFmtId,attr,omitempty"`
  66. Formula string `xml:"formula,attr,omitempty"`
  67. SQLType int `xml:"sqlType,attr,omitempty"`
  68. Hierarchy int `xml:"hierarchy,attr,omitempty"`
  69. Level int `xml:"level,attr,omitempty"`
  70. DatabaseField bool `xml:"databaseField,attr"`
  71. MappingCount int `xml:"mappingCount,attr,omitempty"`
  72. MemberPropertyField bool `xml:"memberPropertyField,attr,omitempty"`
  73. SharedItems *xlsxSharedItems `xml:"sharedItems"`
  74. FieldGroup *xlsxFieldGroup `xml:"fieldGroup"`
  75. MpMap *xlsxX `xml:"map"`
  76. ExtLst *xlsxExtLst `xml:"exrLst"`
  77. }
  78. // xlsxSharedItems represents the collection of unique items for a field in
  79. // the PivotCacheDefinition. The sharedItems complex type stores data type and
  80. // formatting information about the data in a field. Items in the
  81. // PivotCacheDefinition can be shared in order to reduce the redundancy of
  82. // those values that are referenced in multiple places across all the
  83. // PivotTable parts.
  84. type xlsxSharedItems struct {
  85. ContainsSemiMixedTypes bool `xml:"containsSemiMixedTypes,attr,omitempty"`
  86. ContainsNonDate bool `xml:"containsNonDate,attr,omitempty"`
  87. ContainsDate bool `xml:"containsDate,attr,omitempty"`
  88. ContainsString bool `xml:"containsString,attr,omitempty"`
  89. ContainsBlank bool `xml:"containsBlank,attr,omitempty"`
  90. ContainsMixedTypes bool `xml:"containsMixedTypes,attr,omitempty"`
  91. ContainsNumber bool `xml:"containsNumber,attr,omitempty"`
  92. ContainsInteger bool `xml:"containsInteger,attr,omitempty"`
  93. MinValue float64 `xml:"minValue,attr,omitempty"`
  94. MaxValue float64 `xml:"maxValue,attr,omitempty"`
  95. MinDate string `xml:"minDate,attr,omitempty"`
  96. MaxDate string `xml:"maxDate,attr,omitempty"`
  97. Count int `xml:"count,attr,omitempty"`
  98. LongText bool `xml:"longText,attr,omitempty"`
  99. M *xlsxMissing `xml:"m"`
  100. N *xlsxNumber `xml:"n"`
  101. B *xlsxBoolean `xml:"b"`
  102. E *xlsxError `xml:"e"`
  103. S *xlsxString `xml:"s"`
  104. D *xlsxDateTime `xml:"d"`
  105. }
  106. // xlsxMissing represents a value that was not specified.
  107. type xlsxMissing struct {
  108. }
  109. // xlsxNumber represents a numeric value in the PivotTable.
  110. type xlsxNumber struct {
  111. V float64 `xml:"v,attr"`
  112. U bool `xml:"u,attr,omitempty"`
  113. F bool `xml:"f,attr,omitempty"`
  114. C string `xml:"c,attr,omitempty"`
  115. Cp int `xml:"cp,attr,omitempty"`
  116. In int `xml:"in,attr,omitempty"`
  117. Bc string `xml:"bc,attr,omitempty"`
  118. Fc string `xml:"fc,attr,omitempty"`
  119. I bool `xml:"i,attr,omitempty"`
  120. Un bool `xml:"un,attr,omitempty"`
  121. St bool `xml:"st,attr,omitempty"`
  122. B bool `xml:"b,attr,omitempty"`
  123. Tpls *xlsxTuples `xml:"tpls"`
  124. X *attrValInt `xml:"x"`
  125. }
  126. // xlsxTuples represents members for the OLAP sheet data entry, also known as
  127. // a tuple.
  128. type xlsxTuples struct {
  129. }
  130. // xlsxBoolean represents a boolean value for an item in the PivotTable.
  131. type xlsxBoolean struct {
  132. }
  133. // xlsxError represents an error value. The use of this item indicates that an
  134. // error value is present in the PivotTable source. The error is recorded in
  135. // the value attribute.
  136. type xlsxError struct {
  137. }
  138. // xlsxString represents a character value in a PivotTable.
  139. type xlsxString struct {
  140. }
  141. // xlsxDateTime represents a date-time value in the PivotTable.
  142. type xlsxDateTime struct {
  143. }
  144. // xlsxFieldGroup represents the collection of properties for a field group.
  145. type xlsxFieldGroup struct {
  146. }
  147. // xlsxCacheHierarchies represents the collection of OLAP hierarchies in the
  148. // PivotCache.
  149. type xlsxCacheHierarchies struct {
  150. }
  151. // xlsxKpis represents the collection of Key Performance Indicators (KPIs)
  152. // defined on the OLAP server and stored in the PivotCache.
  153. type xlsxKpis struct {
  154. }
  155. // xlsxTupleCache represents the cache of OLAP sheet data members, or tuples.
  156. type xlsxTupleCache struct {
  157. }
  158. // xlsxCalculatedItems represents the collection of calculated items.
  159. type xlsxCalculatedItems struct {
  160. }
  161. // xlsxCalculatedMembers represents the collection of calculated members in an
  162. // OLAP PivotTable.
  163. type xlsxCalculatedMembers struct {
  164. }
  165. // xlsxDimensions represents the collection of PivotTable OLAP dimensions.
  166. type xlsxDimensions struct {
  167. }
  168. // xlsxMeasureGroups represents the collection of PivotTable OLAP measure
  169. // groups.
  170. type xlsxMeasureGroups struct {
  171. }
  172. // xlsxMaps represents the PivotTable OLAP measure group - Dimension maps.
  173. type xlsxMaps struct {
  174. }