xmlWorksheet.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. package excelize
  2. import "encoding/xml"
  3. // xlsxWorksheet directly maps the worksheet element in the namespace
  4. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  5. // not checked it for completeness - it does as much as I need.
  6. type xlsxWorksheet struct {
  7. XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main worksheet"`
  8. SheetPr *xlsxSheetPr `xml:"sheetPr"`
  9. Dimension xlsxDimension `xml:"dimension"`
  10. SheetViews xlsxSheetViews `xml:"sheetViews,omitempty"`
  11. SheetFormatPr *xlsxSheetFormatPr `xml:"sheetFormatPr"`
  12. Cols *xlsxCols `xml:"cols,omitempty"`
  13. SheetData xlsxSheetData `xml:"sheetData"`
  14. SheetProtection *xlsxSheetProtection `xml:"sheetProtection"`
  15. AutoFilter *xlsxAutoFilter `xml:"autoFilter"`
  16. MergeCells *xlsxMergeCells `xml:"mergeCells,omitempty"`
  17. ConditionalFormatting []*xlsxConditionalFormatting `xml:"conditionalFormatting"`
  18. DataValidations *xlsxDataValidations `xml:"dataValidations"`
  19. Hyperlinks *xlsxHyperlinks `xml:"hyperlinks"`
  20. PrintOptions *xlsxPrintOptions `xml:"printOptions"`
  21. PageMargins *xlsxPageMargins `xml:"pageMargins"`
  22. PageSetUp *xlsxPageSetUp `xml:"pageSetup"`
  23. HeaderFooter *xlsxHeaderFooter `xml:"headerFooter"`
  24. Drawing *xlsxDrawing `xml:"drawing"`
  25. LegacyDrawing *xlsxLegacyDrawing `xml:"legacyDrawing"`
  26. Picture *xlsxPicture `xml:"picture"`
  27. TableParts *xlsxTableParts `xml:"tableParts"`
  28. ExtLst *xlsxExtLst `xml:"extLst"`
  29. }
  30. // xlsxDrawing change r:id to rid in the namespace.
  31. type xlsxDrawing struct {
  32. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  33. }
  34. // xlsxHeaderFooter directly maps the headerFooter element in the namespace
  35. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - When printed or
  36. // viewed in page layout view (§18.18.69), each page of a worksheet can have a
  37. // page header, a page footer, or both. The headers and footers on odd-numbered
  38. // pages can differ from those on even-numbered pages, and the headers and
  39. // footers on the first page can differ from those on odd- and even-numbered
  40. // pages. In the latter case, the first page is not considered an odd page.
  41. type xlsxHeaderFooter struct {
  42. DifferentFirst bool `xml:"differentFirst,attr,omitempty"`
  43. DifferentOddEven bool `xml:"differentOddEven,attr,omitempty"`
  44. OddHeader []*xlsxOddHeader `xml:"oddHeader"`
  45. OddFooter []*xlsxOddFooter `xml:"oddFooter"`
  46. }
  47. // xlsxOddHeader directly maps the oddHeader element in the namespace
  48. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  49. // not checked it for completeness - it does as much as I need.
  50. type xlsxOddHeader struct {
  51. Content string `xml:",chardata"`
  52. }
  53. // xlsxOddFooter directly maps the oddFooter element in the namespace
  54. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  55. // not checked it for completeness - it does as much as I need.
  56. type xlsxOddFooter struct {
  57. Content string `xml:",chardata"`
  58. }
  59. // xlsxPageSetUp directly maps the pageSetup element in the namespace
  60. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Page setup
  61. // settings for the worksheet.
  62. type xlsxPageSetUp struct {
  63. BlackAndWhite bool `xml:"blackAndWhite,attr,omitempty"`
  64. CellComments string `xml:"cellComments,attr,omitempty"`
  65. Copies int `xml:"copies,attr,omitempty"`
  66. Draft bool `xml:"draft,attr,omitempty"`
  67. Errors string `xml:"errors,attr,omitempty"`
  68. FirstPageNumber int `xml:"firstPageNumber,attr,omitempty"`
  69. FitToHeight int `xml:"fitToHeight,attr,omitempty"`
  70. FitToWidth int `xml:"fitToWidth,attr,omitempty"`
  71. HorizontalDPI float32 `xml:"horizontalDpi,attr,omitempty"`
  72. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  73. Orientation string `xml:"orientation,attr,omitempty"`
  74. PageOrder string `xml:"pageOrder,attr,omitempty"`
  75. PaperHeight string `xml:"paperHeight,attr,omitempty"`
  76. PaperSize string `xml:"paperSize,attr,omitempty"`
  77. PaperWidth string `xml:"paperWidth,attr,omitempty"`
  78. Scale int `xml:"scale,attr,omitempty"`
  79. UseFirstPageNumber bool `xml:"useFirstPageNumber,attr,omitempty"`
  80. UsePrinterDefaults bool `xml:"usePrinterDefaults,attr,omitempty"`
  81. VerticalDPI float32 `xml:"verticalDpi,attr,omitempty"`
  82. }
  83. // xlsxPrintOptions directly maps the printOptions element in the namespace
  84. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Print options for
  85. // the sheet. Printer-specific settings are stored separately in the Printer
  86. // Settings part.
  87. type xlsxPrintOptions struct {
  88. GridLines bool `xml:"gridLines,attr,omitempty"`
  89. GridLinesSet bool `xml:"gridLinesSet,attr,omitempty"`
  90. Headings bool `xml:"headings,attr,omitempty"`
  91. HorizontalCentered bool `xml:"horizontalCentered,attr,omitempty"`
  92. VerticalCentered bool `xml:"verticalCentered,attr,omitempty"`
  93. }
  94. // xlsxPageMargins directly maps the pageMargins element in the namespace
  95. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Page margins for
  96. // a sheet or a custom sheet view.
  97. type xlsxPageMargins struct {
  98. Bottom float64 `xml:"bottom,attr"`
  99. Footer float64 `xml:"footer,attr"`
  100. Header float64 `xml:"header,attr"`
  101. Left float64 `xml:"left,attr"`
  102. Right float64 `xml:"right,attr"`
  103. Top float64 `xml:"top,attr"`
  104. }
  105. // xlsxSheetFormatPr directly maps the sheetFormatPr element in the namespace
  106. // http://schemas.openxmlformats.org/spreadsheetml/2006/main. This element
  107. // specifies the sheet formatting properties.
  108. type xlsxSheetFormatPr struct {
  109. BaseColWidth uint8 `xml:"baseColWidth,attr,omitempty"`
  110. CustomHeight float64 `xml:"customHeight,attr,omitempty"`
  111. DefaultColWidth float64 `xml:"defaultColWidth,attr,omitempty"`
  112. DefaultRowHeight float64 `xml:"defaultRowHeight,attr"`
  113. ThickTop bool `xml:"thickTop,attr,omitempty"`
  114. OutlineLevelCol uint8 `xml:"outlineLevelCol,attr,omitempty"`
  115. OutlineLevelRow uint8 `xml:"outlineLevelRow,attr,omitempty"`
  116. ZeroHeight float64 `xml:"zeroHeight,attr,omitempty"`
  117. }
  118. // xlsxSheetViews directly maps the sheetViews element in the namespace
  119. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Worksheet views
  120. // collection.
  121. type xlsxSheetViews struct {
  122. SheetView []xlsxSheetView `xml:"sheetView"`
  123. }
  124. // xlsxSheetView directly maps the sheetView element in the namespace
  125. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  126. // not checked it for completeness - it does as much as I need. A single sheet
  127. // view definition. When more than one sheet view is defined in the file, it
  128. // means that when opening the workbook, each sheet view corresponds to a
  129. // separate window within the spreadsheet application, where each window is
  130. // showing the particular sheet containing the same workbookViewId value, the
  131. // last sheetView definition is loaded, and the others are discarded. When
  132. // multiple windows are viewing the same sheet, multiple sheetView elements
  133. // (with corresponding workbookView entries) are saved.
  134. type xlsxSheetView struct {
  135. WindowProtection bool `xml:"windowProtection,attr,omitempty"`
  136. ShowFormulas bool `xml:"showFormulas,attr,omitempty"`
  137. ShowGridLines string `xml:"showGridLines,attr,omitempty"`
  138. ShowRowColHeaders bool `xml:"showRowColHeaders,attr,omitempty"`
  139. ShowZeros bool `xml:"showZeros,attr,omitempty"`
  140. RightToLeft bool `xml:"rightToLeft,attr,omitempty"`
  141. TabSelected bool `xml:"tabSelected,attr,omitempty"`
  142. ShowOutlineSymbols bool `xml:"showOutlineSymbols,attr,omitempty"`
  143. DefaultGridColor bool `xml:"defaultGridColor,attr"`
  144. View string `xml:"view,attr,omitempty"`
  145. TopLeftCell string `xml:"topLeftCell,attr,omitempty"`
  146. ColorID int `xml:"colorId,attr,omitempty"`
  147. ZoomScale float64 `xml:"zoomScale,attr,omitempty"`
  148. ZoomScaleNormal float64 `xml:"zoomScaleNormal,attr,omitempty"`
  149. ZoomScalePageLayoutView float64 `xml:"zoomScalePageLayoutView,attr,omitempty"`
  150. WorkbookViewID int `xml:"workbookViewId,attr"`
  151. Pane *xlsxPane `xml:"pane,omitempty"`
  152. Selection []*xlsxSelection `xml:"selection"`
  153. }
  154. // xlsxSelection directly maps the selection element in the namespace
  155. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Worksheet view
  156. // selection.
  157. type xlsxSelection struct {
  158. ActiveCell string `xml:"activeCell,attr,omitempty"`
  159. ActiveCellID int `xml:"activeCellId,attr"`
  160. Pane string `xml:"pane,attr,omitempty"`
  161. SQRef string `xml:"sqref,attr,omitempty"`
  162. }
  163. // xlsxSelection directly maps the selection element. Worksheet view pane.
  164. type xlsxPane struct {
  165. ActivePane string `xml:"activePane,attr,omitempty"`
  166. State string `xml:"state,attr,omitempty"` // Either "split" or "frozen"
  167. TopLeftCell string `xml:"topLeftCell,attr,omitempty"`
  168. XSplit float64 `xml:"xSplit,attr,omitempty"`
  169. YSplit float64 `xml:"ySplit,attr,omitempty"`
  170. }
  171. // xlsxSheetPr directly maps the sheetPr element in the namespace
  172. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Sheet-level
  173. // properties.
  174. type xlsxSheetPr struct {
  175. XMLName xml.Name `xml:"sheetPr"`
  176. CodeName string `xml:"codeName,attr,omitempty"`
  177. EnableFormatConditionsCalculation bool `xml:"enableFormatConditionsCalculation,attr,omitempty"`
  178. FilterMode bool `xml:"filterMode,attr,omitempty"`
  179. Published bool `xml:"published,attr,omitempty"`
  180. SyncHorizontal bool `xml:"syncHorizontal,attr,omitempty"`
  181. SyncVertical bool `xml:"syncVertical,attr,omitempty"`
  182. TransitionEntry bool `xml:"transitionEntry,attr,omitempty"`
  183. TabColor *xlsxTabColor `xml:"tabColor,omitempty"`
  184. PageSetUpPr *xlsxPageSetUpPr `xml:"pageSetUpPr,omitempty"`
  185. }
  186. // xlsxPageSetUpPr directly maps the pageSetupPr element in the namespace
  187. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Page setup
  188. // properties of the worksheet.
  189. type xlsxPageSetUpPr struct {
  190. AutoPageBreaks bool `xml:"autoPageBreaks,attr,omitempty"`
  191. FitToPage bool `xml:"fitToPage,attr,omitempty"` // Flag indicating whether the Fit to Page print option is enabled.
  192. }
  193. // xlsxTabColor directly maps the tabColor element in the namespace currently I
  194. // have not checked it for completeness - it does as much as I need.
  195. type xlsxTabColor struct {
  196. Theme int `xml:"theme,attr,omitempty"`
  197. Tint float64 `xml:"tint,attr,omitempty"`
  198. }
  199. // xlsxCols directly maps the cols element in the namespace
  200. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  201. // not checked it for completeness - it does as much as I need.
  202. type xlsxCols struct {
  203. Col []xlsxCol `xml:"col"`
  204. }
  205. // xlsxCol directly maps the col (Column Width & Formatting). Defines column
  206. // width and column formatting for one or more columns of the worksheet.
  207. type xlsxCol struct {
  208. BestFit bool `xml:"bestFit,attr,omitempty"`
  209. Collapsed bool `xml:"collapsed,attr"`
  210. CustomWidth bool `xml:"customWidth,attr,omitempty"`
  211. Hidden bool `xml:"hidden,attr"`
  212. Max int `xml:"max,attr"`
  213. Min int `xml:"min,attr"`
  214. OutlineLevel uint8 `xml:"outlineLevel,attr,omitempty"`
  215. Phonetic bool `xml:"phonetic,attr,omitempty"`
  216. Style int `xml:"style,attr"`
  217. Width float64 `xml:"width,attr"`
  218. }
  219. // xlsxDimension directly maps the dimension element in the namespace
  220. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - This element
  221. // specifies the used range of the worksheet. It specifies the row and column
  222. // bounds of used cells in the worksheet. This is optional and is not required.
  223. // Used cells include cells with formulas, text content, and cell formatting.
  224. // When an entire column is formatted, only the first cell in that column is
  225. // considered used.
  226. type xlsxDimension struct {
  227. Ref string `xml:"ref,attr"`
  228. }
  229. // xlsxSheetData directly maps the sheetData element in the namespace
  230. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  231. // not checked it for completeness - it does as much as I need.
  232. type xlsxSheetData struct {
  233. XMLName xml.Name `xml:"sheetData"`
  234. Row []xlsxRow `xml:"row"`
  235. }
  236. // xlsxRow directly maps the row element. The element expresses information
  237. // about an entire row of a worksheet, and contains all cell definitions for a
  238. // particular row in the worksheet.
  239. type xlsxRow struct {
  240. Collapsed bool `xml:"collapsed,attr,omitempty"`
  241. CustomFormat bool `xml:"customFormat,attr,omitempty"`
  242. CustomHeight bool `xml:"customHeight,attr,omitempty"`
  243. Hidden bool `xml:"hidden,attr,omitempty"`
  244. Ht float64 `xml:"ht,attr,omitempty"`
  245. OutlineLevel uint8 `xml:"outlineLevel,attr,omitempty"`
  246. Ph bool `xml:"ph,attr,omitempty"`
  247. R int `xml:"r,attr,omitempty"`
  248. S int `xml:"s,attr,omitempty"`
  249. Spans string `xml:"spans,attr,omitempty"`
  250. ThickBot bool `xml:"thickBot,attr,omitempty"`
  251. ThickTop bool `xml:"thickTop,attr,omitempty"`
  252. C []xlsxC `xml:"c"`
  253. }
  254. // xlsxMergeCell directly maps the mergeCell element. A single merged cell.
  255. type xlsxMergeCell struct {
  256. Ref string `xml:"ref,attr,omitempty"`
  257. }
  258. // xlsxMergeCells directly maps the mergeCells element. This collection
  259. // expresses all the merged cells in the sheet.
  260. type xlsxMergeCells struct {
  261. Count int `xml:"count,attr,omitempty"`
  262. Cells []*xlsxMergeCell `xml:"mergeCell,omitempty"`
  263. }
  264. // xlsxDataValidations expresses all data validation information for cells in a
  265. // sheet which have data validation features applied.
  266. type xlsxDataValidations struct {
  267. Count int `xml:"count,attr,omitempty"`
  268. DisablePrompts bool `xml:"disablePrompts,attr,omitempty"`
  269. XWindow int `xml:"xWindow,attr,omitempty"`
  270. YWindow int `xml:"yWindow,attr,omitempty"`
  271. DataValidation string `xml:",innerxml"`
  272. }
  273. // xlsxC directly maps the c element in the namespace
  274. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  275. // not checked it for completeness - it does as much as I need.
  276. type xlsxC struct {
  277. R string `xml:"r,attr"` // Cell ID, e.g. A1
  278. S int `xml:"s,attr,omitempty"` // Style reference.
  279. // Str string `xml:"str,attr,omitempty"` // Style reference.
  280. T string `xml:"t,attr,omitempty"` // Type.
  281. F *xlsxF `xml:"f,omitempty"` // Formula
  282. V string `xml:"v,omitempty"` // Value
  283. XMLSpace xml.Attr `xml:"space,attr,omitempty"`
  284. }
  285. // xlsxF directly maps the f element in the namespace
  286. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
  287. // not checked it for completeness - it does as much as I need.
  288. type xlsxF struct {
  289. Content string `xml:",chardata"`
  290. T string `xml:"t,attr,omitempty"` // Formula type
  291. Ref string `xml:"ref,attr,omitempty"` // Shared formula ref
  292. Si string `xml:"si,attr,omitempty"` // Shared formula index
  293. }
  294. // xlsxSheetProtection collection expresses the sheet protection options to
  295. // enforce when the sheet is protected.
  296. type xlsxSheetProtection struct {
  297. AlgorithmName string `xml:"algorithmName,attr,omitempty"`
  298. AutoFilter int `xml:"autoFilter,attr,omitempty"`
  299. DeleteColumns int `xml:"deleteColumns,attr,omitempty"`
  300. DeleteRows int `xml:"deleteRows,attr,omitempty"`
  301. FormatCells int `xml:"formatCells,attr,omitempty"`
  302. FormatColumns int `xml:"formatColumns,attr,omitempty"`
  303. FormatRows int `xml:"formatRows,attr,omitempty"`
  304. HashValue string `xml:"hashValue,attr,omitempty"`
  305. InsertColumns int `xml:"insertColumns,attr,omitempty"`
  306. InsertHyperlinks int `xml:"insertHyperlinks,attr,omitempty"`
  307. InsertRows int `xml:"insertRows,attr,omitempty"`
  308. Objects int `xml:"objects,attr,omitempty"`
  309. PivotTables int `xml:"pivotTables,attr,omitempty"`
  310. SaltValue string `xml:"saltValue,attr,omitempty"`
  311. Scenarios int `xml:"scenarios,attr,omitempty"`
  312. SelectLockedCells int `xml:"selectLockedCells,attr,omitempty"`
  313. SelectUnlockedCell int `xml:"selectUnlockedCell,attr,omitempty"`
  314. Sheet int `xml:"sheet,attr,omitempty"`
  315. Sort int `xml:"sort,attr,omitempty"`
  316. SpinCount int `xml:"spinCount,attr,omitempty"`
  317. }
  318. // A Conditional Format is a format, such as cell shading or font color, that a
  319. // spreadsheet application can automatically apply to cells if a specified
  320. // condition is true. This collection expresses conditional formatting rules
  321. // applied to a particular cell or range.
  322. type xlsxConditionalFormatting struct {
  323. SQRef string `xml:"sqref,attr,omitempty"`
  324. CfRule string `xml:",innerxml"`
  325. }
  326. // xlsxHyperlinks directly maps the hyperlinks element in the namespace
  327. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - A hyperlink can
  328. // be stored in a package as a relationship. Hyperlinks shall be identified by
  329. // containing a target which specifies the destination of the given hyperlink.
  330. type xlsxHyperlinks struct {
  331. Hyperlink []xlsxHyperlink `xml:"hyperlink"`
  332. }
  333. // xlsxHyperlink directly maps the hyperlink element in the namespace
  334. // http://schemas.openxmlformats.org/spreadsheetml/2006/main
  335. type xlsxHyperlink struct {
  336. Ref string `xml:"ref,attr"`
  337. Location string `xml:"location,attr,omitempty"`
  338. Display string `xml:"display,attr,omitempty"`
  339. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  340. }
  341. // xlsxTableParts directly maps the tableParts element in the namespace
  342. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - The table element
  343. // has several attributes applied to identify the table and the data range it
  344. // covers. The table id attribute needs to be unique across all table parts, the
  345. // same goes for the name and displayName. The displayName has the further
  346. // restriction that it must be unique across all defined names in the workbook.
  347. // Later on we will see that you can define names for many elements, such as
  348. // cells or formulas. The name value is used for the object model in Microsoft
  349. // Office Excel. The displayName is used for references in formulas. The ref
  350. // attribute is used to identify the cell range that the table covers. This
  351. // includes not only the table data, but also the table header containing column
  352. // names.
  353. // To add columns to your table you add new tableColumn elements to the
  354. // tableColumns container. Similar to the shared string table the collection
  355. // keeps a count attribute identifying the number of columns. Besides the table
  356. // definition in the table part there is also the need to identify which tables
  357. // are displayed in the worksheet. The worksheet part has a separate element
  358. // tableParts to store this information. Each table part is referenced through
  359. // the relationship ID and again a count of the number of table parts is
  360. // maintained. The following markup sample is taken from the documents
  361. // accompanying this book. The sheet data element has been removed to reduce the
  362. // size of the sample. To reference the table, just add the tableParts element,
  363. // of course after having created and stored the table part. For example:
  364. //
  365. // <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  366. // ...
  367. // <tableParts count="1">
  368. // <tablePart r:id="rId1" />
  369. // </tableParts>
  370. // </worksheet>
  371. //
  372. type xlsxTableParts struct {
  373. Count int `xml:"count,attr,omitempty"`
  374. TableParts []*xlsxTablePart `xml:"tablePart"`
  375. }
  376. // xlsxTablePart directly maps the tablePart element in the namespace
  377. // http://schemas.openxmlformats.org/spreadsheetml/2006/main
  378. type xlsxTablePart struct {
  379. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  380. }
  381. // xlsxPicture directly maps the picture element in the namespace
  382. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - Background sheet
  383. // image. For example:
  384. //
  385. // <picture r:id="rId1"/>
  386. //
  387. type xlsxPicture struct {
  388. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  389. }
  390. // xlsxLegacyDrawing directly maps the legacyDrawing element in the namespace
  391. // http://schemas.openxmlformats.org/spreadsheetml/2006/main - A comment is a
  392. // rich text note that is attached to, and associated with, a cell, separate
  393. // from other cell content. Comment content is stored separate from the cell,
  394. // and is displayed in a drawing object (like a text box) that is separate from,
  395. // but associated with, a cell. Comments are used as reminders, such as noting
  396. // how a complex formula works, or to provide feedback to other users. Comments
  397. // can also be used to explain assumptions made in a formula or to call out
  398. // something special about the cell.
  399. type xlsxLegacyDrawing struct {
  400. RID string `xml:"http://schemas.openxmlformats.org/officeDocument/2006/relationships id,attr,omitempty"`
  401. }