xmlApp.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2016 - 2023 The excelize Authors. All rights reserved. Use of
  2. // this source code is governed by a BSD-style license that can be found in
  3. // the LICENSE file.
  4. //
  5. // Package excelize providing a set of functions that allow you to write to and
  6. // read from XLAM / XLSM / XLSX / XLTM / XLTX files. Supports reading and
  7. // writing spreadsheet documents generated by Microsoft Excel™ 2007 and later.
  8. // Supports complex components by high compatibility, and provided streaming
  9. // API for generating or reading data from a worksheet with huge amounts of
  10. // data. This library needs Go version 1.16 or later.
  11. package excelize
  12. import "encoding/xml"
  13. // AppProperties directly maps the document application properties.
  14. type AppProperties struct {
  15. Application string
  16. ScaleCrop bool
  17. DocSecurity int
  18. Company string
  19. LinksUpToDate bool
  20. HyperlinksChanged bool
  21. AppVersion string
  22. }
  23. // xlsxProperties specifies to an OOXML document properties such as the
  24. // template used, the number of pages and words, and the application name and
  25. // version.
  26. type xlsxProperties struct {
  27. XMLName xml.Name `xml:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties Properties"`
  28. Vt string `xml:"xmlns:vt,attr"`
  29. Template string `xml:",omitempty"`
  30. Manager string `xml:",omitempty"`
  31. Company string `xml:",omitempty"`
  32. Pages int `xml:",omitempty"`
  33. Words int `xml:",omitempty"`
  34. Characters int `xml:",omitempty"`
  35. PresentationFormat string `xml:",omitempty"`
  36. Lines int `xml:",omitempty"`
  37. Paragraphs int `xml:",omitempty"`
  38. Slides int `xml:",omitempty"`
  39. Notes int `xml:",omitempty"`
  40. TotalTime int `xml:",omitempty"`
  41. HiddenSlides int `xml:",omitempty"`
  42. MMClips int `xml:",omitempty"`
  43. ScaleCrop bool `xml:",omitempty"`
  44. HeadingPairs *xlsxVectorVariant
  45. TitlesOfParts *xlsxVectorLpstr
  46. LinksUpToDate bool `xml:",omitempty"`
  47. CharactersWithSpaces int `xml:",omitempty"`
  48. SharedDoc bool `xml:",omitempty"`
  49. HyperlinkBase string `xml:",omitempty"`
  50. HLinks *xlsxVectorVariant
  51. HyperlinksChanged bool `xml:",omitempty"`
  52. DigSig *xlsxDigSig
  53. Application string `xml:",omitempty"`
  54. AppVersion string `xml:",omitempty"`
  55. DocSecurity int `xml:",omitempty"`
  56. }
  57. // xlsxVectorVariant specifies the set of hyperlinks that were in this
  58. // document when last saved.
  59. type xlsxVectorVariant struct {
  60. Content string `xml:",innerxml"`
  61. }
  62. type xlsxVectorLpstr struct {
  63. Content string `xml:",innerxml"`
  64. }
  65. // xlsxDigSig contains the signature of a digitally signed document.
  66. type xlsxDigSig struct {
  67. Content string `xml:",innerxml"`
  68. }