rubyXL 3.3.22 → 3.4.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +60 -0
  3. data/.codeclimate.yml +3 -0
  4. data/Gemfile +9 -8
  5. data/Gemfile.lock +124 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.rdoc +54 -18
  8. data/Rakefile +29 -29
  9. data/VERSION +1 -1
  10. data/lib/rubyXL/cell.rb +3 -30
  11. data/lib/rubyXL/convenience_methods/cell.rb +276 -0
  12. data/lib/rubyXL/convenience_methods/color.rb +156 -0
  13. data/lib/rubyXL/convenience_methods/font.rb +63 -0
  14. data/lib/rubyXL/convenience_methods/workbook.rb +141 -0
  15. data/lib/rubyXL/convenience_methods/worksheet.rb +714 -0
  16. data/lib/rubyXL/convenience_methods.rb +5 -1045
  17. data/lib/rubyXL/objects/border.rb +2 -5
  18. data/lib/rubyXL/objects/calculation_chain.rb +4 -4
  19. data/lib/rubyXL/objects/cell_style.rb +9 -11
  20. data/lib/rubyXL/objects/chartsheet.rb +15 -19
  21. data/lib/rubyXL/objects/color.rb +7 -7
  22. data/lib/rubyXL/objects/column_range.rb +10 -13
  23. data/lib/rubyXL/objects/comments.rb +5 -8
  24. data/lib/rubyXL/objects/connection.rb +175 -0
  25. data/lib/rubyXL/objects/container_nodes.rb +3 -7
  26. data/lib/rubyXL/objects/content_types.rb +5 -8
  27. data/lib/rubyXL/objects/data_validation.rb +4 -4
  28. data/lib/rubyXL/objects/document_properties.rb +12 -16
  29. data/lib/rubyXL/objects/extensions.rb +19 -4
  30. data/lib/rubyXL/objects/external_links.rb +30 -8
  31. data/lib/rubyXL/objects/fill.rb +6 -9
  32. data/lib/rubyXL/objects/filters.rb +17 -19
  33. data/lib/rubyXL/objects/font.rb +4 -64
  34. data/lib/rubyXL/objects/formula.rb +4 -6
  35. data/lib/rubyXL/objects/ooxml_object.rb +25 -18
  36. data/lib/rubyXL/objects/query_table.rb +104 -0
  37. data/lib/rubyXL/objects/reference.rb +6 -8
  38. data/lib/rubyXL/objects/relationships.rb +13 -13
  39. data/lib/rubyXL/objects/root.rb +0 -2
  40. data/lib/rubyXL/objects/shared_strings.rb +4 -7
  41. data/lib/rubyXL/objects/sheet_common.rb +5 -7
  42. data/lib/rubyXL/objects/sheet_data.rb +50 -16
  43. data/lib/rubyXL/objects/simple_types.rb +21 -1
  44. data/lib/rubyXL/objects/storage.rb +67 -43
  45. data/lib/rubyXL/objects/stylesheet.rb +22 -29
  46. data/lib/rubyXL/objects/text.rb +12 -14
  47. data/lib/rubyXL/objects/theme.rb +142 -126
  48. data/lib/rubyXL/objects/workbook.rb +172 -64
  49. data/lib/rubyXL/objects/worksheet.rb +143 -128
  50. data/lib/rubyXL/parser.rb +1 -3
  51. data/lib/rubyXL/worksheet.rb +83 -78
  52. data/lib/rubyXL.rb +1 -1
  53. data/rdoc/README_rdoc.html +122 -114
  54. data/rdoc/RubyXL/AExtension.html +21 -60
  55. data/rdoc/RubyXL/AExtensionStorageArea.html +12 -17
  56. data/rdoc/RubyXL/ActiveX.html +154 -0
  57. data/rdoc/RubyXL/ActiveXBinary.html +106 -0
  58. data/rdoc/RubyXL/AdjustHandleList.html +13 -19
  59. data/rdoc/RubyXL/Alignment.html +13 -19
  60. data/rdoc/RubyXL/AlternateContent.html +12 -17
  61. data/rdoc/RubyXL/Authors.html +13 -19
  62. data/rdoc/RubyXL/AutoFilter.html +13 -19
  63. data/rdoc/RubyXL/AutoFilterColumn.html +13 -19
  64. data/rdoc/RubyXL/BinaryImageFile.html +12 -25
  65. data/rdoc/RubyXL/BodyProperties.html +13 -19
  66. data/rdoc/RubyXL/BooleanNode.html +12 -17
  67. data/rdoc/RubyXL/BooleanValue.html +12 -17
  68. data/rdoc/RubyXL/Border.html +25 -84
  69. data/rdoc/RubyXL/BorderEdge.html +20 -52
  70. data/rdoc/RubyXL/Borders.html +19 -39
  71. data/rdoc/RubyXL/Break.html +13 -19
  72. data/rdoc/RubyXL/BreakList.html +13 -19
  73. data/rdoc/RubyXL/CT_AdjPoint2D.html +13 -19
  74. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +13 -19
  75. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +13 -19
  76. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +13 -19
  77. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +13 -19
  78. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +13 -19
  79. data/rdoc/RubyXL/CT_Backdrop.html +13 -19
  80. data/rdoc/RubyXL/CT_Bevel.html +13 -19
  81. data/rdoc/RubyXL/CT_BiLevelEffect.html +13 -19
  82. data/rdoc/RubyXL/CT_BlendEffect.html +13 -19
  83. data/rdoc/RubyXL/CT_Blip.html +13 -19
  84. data/rdoc/RubyXL/CT_BlipFillProperties.html +13 -19
  85. data/rdoc/RubyXL/CT_BlurEffect.html +13 -19
  86. data/rdoc/RubyXL/CT_Camera.html +13 -19
  87. data/rdoc/RubyXL/CT_Color.html +13 -19
  88. data/rdoc/RubyXL/CT_ColorChangeEffect.html +13 -19
  89. data/rdoc/RubyXL/CT_ColorMapping.html +13 -19
  90. data/rdoc/RubyXL/CT_ColorScheme.html +13 -19
  91. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +13 -19
  92. data/rdoc/RubyXL/CT_ConnectionSite.html +13 -19
  93. data/rdoc/RubyXL/CT_ConnectionSiteList.html +13 -19
  94. data/rdoc/RubyXL/CT_DashStop.html +13 -19
  95. data/rdoc/RubyXL/CT_DashStopList.html +13 -19
  96. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +13 -19
  97. data/rdoc/RubyXL/CT_DuotoneEffect.html +13 -19
  98. data/rdoc/RubyXL/CT_EffectContainer.html +13 -19
  99. data/rdoc/RubyXL/CT_EffectList.html +13 -19
  100. data/rdoc/RubyXL/CT_EffectReference.html +13 -19
  101. data/rdoc/RubyXL/CT_EffectStyleItem.html +13 -19
  102. data/rdoc/RubyXL/CT_EffectStyleList.html +13 -19
  103. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +13 -19
  104. data/rdoc/RubyXL/CT_FillEffect.html +13 -19
  105. data/rdoc/RubyXL/CT_FillOverlayEffect.html +13 -19
  106. data/rdoc/RubyXL/CT_FillStyleList.html +13 -19
  107. data/rdoc/RubyXL/CT_FlatText.html +13 -19
  108. data/rdoc/RubyXL/CT_FontCollection.html +13 -19
  109. data/rdoc/RubyXL/CT_FontReference.html +13 -19
  110. data/rdoc/RubyXL/CT_GeomGuideList.html +13 -19
  111. data/rdoc/RubyXL/CT_GlowEffect.html +13 -19
  112. data/rdoc/RubyXL/CT_GradientFillProperties.html +13 -19
  113. data/rdoc/RubyXL/CT_GradientStop.html +13 -19
  114. data/rdoc/RubyXL/CT_GradientStopList.html +13 -19
  115. data/rdoc/RubyXL/CT_HSLEffect.html +13 -19
  116. data/rdoc/RubyXL/CT_HslColor.html +13 -19
  117. data/rdoc/RubyXL/CT_Hyperlink.html +13 -19
  118. data/rdoc/RubyXL/CT_InnerShadowEffect.html +13 -19
  119. data/rdoc/RubyXL/CT_LightRig.html +13 -19
  120. data/rdoc/RubyXL/CT_LineEndProperties.html +13 -19
  121. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +13 -19
  122. data/rdoc/RubyXL/CT_LineProperties.html +13 -19
  123. data/rdoc/RubyXL/CT_LineStyleList.html +13 -19
  124. data/rdoc/RubyXL/CT_LinearShadeProperties.html +13 -19
  125. data/rdoc/RubyXL/CT_LuminanceEffect.html +13 -19
  126. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +13 -19
  127. data/rdoc/RubyXL/CT_OuterShadowEffect.html +13 -19
  128. data/rdoc/RubyXL/CT_Path2D.html +13 -19
  129. data/rdoc/RubyXL/CT_Path2DArcTo.html +13 -19
  130. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +13 -19
  131. data/rdoc/RubyXL/CT_Path2DList.html +13 -19
  132. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +13 -19
  133. data/rdoc/RubyXL/CT_Path2DTo.html +13 -19
  134. data/rdoc/RubyXL/CT_PathShadeProperties.html +13 -19
  135. data/rdoc/RubyXL/CT_PatternFillProperties.html +13 -19
  136. data/rdoc/RubyXL/CT_Point3D.html +13 -19
  137. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +13 -19
  138. data/rdoc/RubyXL/CT_PresetColor.html +13 -19
  139. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +13 -19
  140. data/rdoc/RubyXL/CT_PresetShadowEffect.html +13 -19
  141. data/rdoc/RubyXL/CT_PresetTextShape.html +13 -19
  142. data/rdoc/RubyXL/CT_ReflectionEffect.html +13 -19
  143. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +13 -19
  144. data/rdoc/RubyXL/CT_RelativeRect.html +13 -19
  145. data/rdoc/RubyXL/CT_SRgbColor.html +13 -19
  146. data/rdoc/RubyXL/CT_ScRgbColor.html +13 -19
  147. data/rdoc/RubyXL/CT_Scene3D.html +13 -19
  148. data/rdoc/RubyXL/CT_SchemeColor.html +13 -19
  149. data/rdoc/RubyXL/CT_Shape3D.html +13 -19
  150. data/rdoc/RubyXL/CT_ShapeStyle.html +13 -19
  151. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +13 -19
  152. data/rdoc/RubyXL/CT_SphereCoords.html +13 -19
  153. data/rdoc/RubyXL/CT_StretchInfoProperties.html +13 -19
  154. data/rdoc/RubyXL/CT_StyleMatrix.html +13 -19
  155. data/rdoc/RubyXL/CT_StyleMatrixReference.html +13 -19
  156. data/rdoc/RubyXL/CT_SupplementalFont.html +13 -19
  157. data/rdoc/RubyXL/CT_SystemColor.html +13 -19
  158. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +13 -19
  159. data/rdoc/RubyXL/CT_TextBlipBullet.html +13 -19
  160. data/rdoc/RubyXL/CT_TextCharBullet.html +13 -19
  161. data/rdoc/RubyXL/CT_TextCharacterProperties.html +13 -19
  162. data/rdoc/RubyXL/CT_TextFont.html +13 -19
  163. data/rdoc/RubyXL/CT_TextListStyle.html +13 -19
  164. data/rdoc/RubyXL/CT_TextNormalAutofit.html +13 -19
  165. data/rdoc/RubyXL/CT_TextParagraphProperties.html +13 -19
  166. data/rdoc/RubyXL/CT_TextSpacing.html +13 -19
  167. data/rdoc/RubyXL/CT_TextTabStop.html +13 -19
  168. data/rdoc/RubyXL/CT_TextTabStopList.html +13 -19
  169. data/rdoc/RubyXL/CT_TileInfoProperties.html +13 -19
  170. data/rdoc/RubyXL/CT_TintEffect.html +13 -19
  171. data/rdoc/RubyXL/CT_Transform2D.html +13 -19
  172. data/rdoc/RubyXL/CT_TransformEffect.html +13 -19
  173. data/rdoc/RubyXL/CT_Vector3D.html +13 -19
  174. data/rdoc/RubyXL/CT_XYAdjustHandle.html +13 -19
  175. data/rdoc/RubyXL/CalculationChain.html +17 -45
  176. data/rdoc/RubyXL/CalculationChainCell.html +13 -19
  177. data/rdoc/RubyXL/CalculationProperties.html +13 -19
  178. data/rdoc/RubyXL/Cell.html +145 -205
  179. data/rdoc/RubyXL/CellConvenienceMethods.html +255 -460
  180. data/rdoc/RubyXL/CellExt.html +13 -19
  181. data/rdoc/RubyXL/CellSmartTag.html +13 -19
  182. data/rdoc/RubyXL/CellSmartTagProperty.html +13 -19
  183. data/rdoc/RubyXL/CellSmartTags.html +13 -19
  184. data/rdoc/RubyXL/CellStyle.html +13 -19
  185. data/rdoc/RubyXL/CellStyleXFs.html +19 -39
  186. data/rdoc/RubyXL/CellStyles.html +19 -39
  187. data/rdoc/RubyXL/CellValue.html +18 -38
  188. data/rdoc/RubyXL/CellWatch.html +13 -19
  189. data/rdoc/RubyXL/CellWatches.html +13 -19
  190. data/rdoc/RubyXL/CellXFs.html +20 -42
  191. data/rdoc/RubyXL/ChartColorsFile.html +12 -25
  192. data/rdoc/RubyXL/ChartFile.html +19 -49
  193. data/rdoc/RubyXL/ChartStyleFile.html +12 -25
  194. data/rdoc/RubyXL/ChartUserShapesFile.html +12 -25
  195. data/rdoc/RubyXL/Chartsheet.html +20 -68
  196. data/rdoc/RubyXL/ChartsheetPageSetup.html +13 -19
  197. data/rdoc/RubyXL/ChartsheetProperties.html +13 -19
  198. data/rdoc/RubyXL/ChartsheetProtection.html +13 -19
  199. data/rdoc/RubyXL/ChartsheetView.html +13 -19
  200. data/rdoc/RubyXL/ChartsheetViews.html +13 -19
  201. data/rdoc/RubyXL/Color.html +29 -40
  202. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +242 -0
  203. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +279 -0
  204. data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
  205. data/rdoc/RubyXL/ColorConvenienceMethods.html +137 -0
  206. data/rdoc/RubyXL/ColorFilter.html +13 -19
  207. data/rdoc/RubyXL/ColorScale.html +13 -19
  208. data/rdoc/RubyXL/ColorSet.html +13 -19
  209. data/rdoc/RubyXL/Colors.html +13 -19
  210. data/rdoc/RubyXL/ColumnRange.html +23 -74
  211. data/rdoc/RubyXL/ColumnRanges.html +24 -83
  212. data/rdoc/RubyXL/Comment.html +13 -19
  213. data/rdoc/RubyXL/CommentList.html +13 -19
  214. data/rdoc/RubyXL/CommentsFile.html +18 -51
  215. data/rdoc/RubyXL/ConditionalFormatValue.html +13 -19
  216. data/rdoc/RubyXL/ConditionalFormatting.html +13 -19
  217. data/rdoc/RubyXL/ConditionalFormattingRule.html +13 -19
  218. data/rdoc/RubyXL/Connection.html +99 -0
  219. data/rdoc/RubyXL/ConnectionTable.html +99 -0
  220. data/rdoc/RubyXL/ConnectionTables.html +99 -0
  221. data/rdoc/RubyXL/ConnectionTextField.html +99 -0
  222. data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
  223. data/rdoc/RubyXL/Connections.html +147 -0
  224. data/rdoc/RubyXL/ContentTypeDefault.html +12 -17
  225. data/rdoc/RubyXL/ContentTypeOverride.html +12 -17
  226. data/rdoc/RubyXL/ContentTypes.html +25 -65
  227. data/rdoc/RubyXL/ControlPropertiesFile.html +14 -22
  228. data/rdoc/RubyXL/CorePropertiesFile.html +35 -171
  229. data/rdoc/RubyXL/CustomColor.html +13 -19
  230. data/rdoc/RubyXL/CustomColorList.html +13 -19
  231. data/rdoc/RubyXL/CustomFilter.html +13 -19
  232. data/rdoc/RubyXL/CustomFilters.html +13 -19
  233. data/rdoc/RubyXL/CustomGeometry.html +13 -19
  234. data/rdoc/RubyXL/CustomProperties.html +13 -19
  235. data/rdoc/RubyXL/CustomPropertiesFile.html +12 -25
  236. data/rdoc/RubyXL/CustomProperty.html +13 -19
  237. data/rdoc/RubyXL/CustomPropertyFile.html +108 -0
  238. data/rdoc/RubyXL/CustomSheetView.html +13 -19
  239. data/rdoc/RubyXL/CustomSheetViews.html +13 -19
  240. data/rdoc/RubyXL/CustomWorkbookView.html +13 -19
  241. data/rdoc/RubyXL/CustomWorkbookViews.html +13 -19
  242. data/rdoc/RubyXL/CustomXMLFile.html +12 -22
  243. data/rdoc/RubyXL/DXF.html +13 -19
  244. data/rdoc/RubyXL/DXFs.html +13 -19
  245. data/rdoc/RubyXL/DataBar.html +13 -19
  246. data/rdoc/RubyXL/DataConsolidate.html +13 -19
  247. data/rdoc/RubyXL/DataConsolidationReference.html +13 -19
  248. data/rdoc/RubyXL/DataConsolidationReferences.html +13 -19
  249. data/rdoc/RubyXL/DataType.html +11 -39
  250. data/rdoc/RubyXL/DataValidation.html +13 -19
  251. data/rdoc/RubyXL/DataValidations.html +13 -19
  252. data/rdoc/RubyXL/DateGroupItem.html +13 -19
  253. data/rdoc/RubyXL/DefinedName.html +13 -19
  254. data/rdoc/RubyXL/DefinedNameExt.html +13 -19
  255. data/rdoc/RubyXL/DefinedNames.html +13 -19
  256. data/rdoc/RubyXL/DefinedNamesExt.html +13 -19
  257. data/rdoc/RubyXL/DocumentPropertiesFile.html +22 -68
  258. data/rdoc/RubyXL/DrawingFile.html +19 -49
  259. data/rdoc/RubyXL/DynamicFilter.html +13 -19
  260. data/rdoc/RubyXL/EmbeddedControl.html +13 -19
  261. data/rdoc/RubyXL/EmbeddedControls.html +13 -19
  262. data/rdoc/RubyXL/Extension.html +13 -19
  263. data/rdoc/RubyXL/ExtensionStorageArea.html +13 -19
  264. data/rdoc/RubyXL/Extents.html +13 -19
  265. data/rdoc/RubyXL/ExternalBook.html +13 -19
  266. data/rdoc/RubyXL/ExternalLinksFile.html +19 -49
  267. data/rdoc/RubyXL/ExternalReference.html +13 -19
  268. data/rdoc/RubyXL/ExternalReferences.html +13 -19
  269. data/rdoc/RubyXL/ExtraColorSchemeList.html +13 -19
  270. data/rdoc/RubyXL/FieldItem.html +13 -19
  271. data/rdoc/RubyXL/FileRecoveryProperties.html +13 -19
  272. data/rdoc/RubyXL/FileSharing.html +13 -19
  273. data/rdoc/RubyXL/FileVersion.html +13 -19
  274. data/rdoc/RubyXL/Fill.html +19 -39
  275. data/rdoc/RubyXL/Fills.html +19 -39
  276. data/rdoc/RubyXL/FilterContainer.html +13 -19
  277. data/rdoc/RubyXL/FloatNode.html +12 -17
  278. data/rdoc/RubyXL/FloatValue.html +12 -17
  279. data/rdoc/RubyXL/Font.html +20 -544
  280. data/rdoc/RubyXL/FontConvenienceMethods.html +414 -0
  281. data/rdoc/RubyXL/FontScheme.html +13 -19
  282. data/rdoc/RubyXL/Fonts.html +19 -39
  283. data/rdoc/RubyXL/Formula.html +13 -19
  284. data/rdoc/RubyXL/FunctionGroup.html +13 -19
  285. data/rdoc/RubyXL/FunctionGroups.html +13 -19
  286. data/rdoc/RubyXL/GenericStorageObject.html +22 -84
  287. data/rdoc/RubyXL/GradientFill.html +13 -19
  288. data/rdoc/RubyXL/HeaderFooterSettings.html +13 -19
  289. data/rdoc/RubyXL/Hyperlink.html +13 -19
  290. data/rdoc/RubyXL/HyperlinkRelFile.html +12 -22
  291. data/rdoc/RubyXL/Hyperlinks.html +13 -19
  292. data/rdoc/RubyXL/IconFilter.html +13 -19
  293. data/rdoc/RubyXL/IconSet.html +13 -19
  294. data/rdoc/RubyXL/IgnoredError.html +13 -19
  295. data/rdoc/RubyXL/IgnoredErrors.html +13 -19
  296. data/rdoc/RubyXL/IndexedColors.html +13 -19
  297. data/rdoc/RubyXL/InputCells.html +13 -19
  298. data/rdoc/RubyXL/IntegerNode.html +12 -17
  299. data/rdoc/RubyXL/IntegerValue.html +12 -17
  300. data/rdoc/RubyXL/LegacyCell.html +14 -66
  301. data/rdoc/RubyXL/LegacyWorksheet.html +40 -100
  302. data/rdoc/RubyXL/MRUColors.html +13 -19
  303. data/rdoc/RubyXL/MacrosFile.html +12 -25
  304. data/rdoc/RubyXL/MergedCell.html +13 -19
  305. data/rdoc/RubyXL/MergedCells.html +13 -19
  306. data/rdoc/RubyXL/NumFmt.html +13 -19
  307. data/rdoc/RubyXL/NumberFormat.html +19 -39
  308. data/rdoc/RubyXL/NumberFormats.html +19 -45
  309. data/rdoc/RubyXL/OLEObject.html +13 -19
  310. data/rdoc/RubyXL/OLEObjectFile.html +12 -25
  311. data/rdoc/RubyXL/OLEObjects.html +13 -19
  312. data/rdoc/RubyXL/OLESize.html +13 -19
  313. data/rdoc/RubyXL/OOXMLContainerObject.html +36 -132
  314. data/rdoc/RubyXL/OOXMLIgnored.html +163 -0
  315. data/rdoc/RubyXL/OOXMLObject.html +15 -25
  316. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +92 -183
  317. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +49 -185
  318. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +48 -200
  319. data/rdoc/RubyXL/OOXMLTopLevelObject.html +37 -133
  320. data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
  321. data/rdoc/RubyXL/Offset.html +13 -19
  322. data/rdoc/RubyXL/OlapProperties.html +99 -0
  323. data/rdoc/RubyXL/OleItem.html +99 -0
  324. data/rdoc/RubyXL/OleItems.html +99 -0
  325. data/rdoc/RubyXL/OleLink.html +99 -0
  326. data/rdoc/RubyXL/OutlineProperties.html +13 -19
  327. data/rdoc/RubyXL/PageMargins.html +13 -19
  328. data/rdoc/RubyXL/PageSetup.html +13 -19
  329. data/rdoc/RubyXL/PageSetupProperties.html +13 -19
  330. data/rdoc/RubyXL/Pane.html +13 -19
  331. data/rdoc/RubyXL/Parser.html +23 -56
  332. data/rdoc/RubyXL/PatternFill.html +13 -19
  333. data/rdoc/RubyXL/PhoneticProperties.html +13 -19
  334. data/rdoc/RubyXL/PhoneticRun.html +13 -19
  335. data/rdoc/RubyXL/PivotArea.html +13 -19
  336. data/rdoc/RubyXL/PivotCache.html +13 -19
  337. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +14 -30
  338. data/rdoc/RubyXL/PivotCacheRecordsFile.html +12 -25
  339. data/rdoc/RubyXL/PivotCaches.html +13 -19
  340. data/rdoc/RubyXL/PivotReference.html +13 -19
  341. data/rdoc/RubyXL/PivotReferences.html +13 -19
  342. data/rdoc/RubyXL/PivotTableFile.html +14 -30
  343. data/rdoc/RubyXL/PivotTableSelection.html +13 -19
  344. data/rdoc/RubyXL/PresetGeometry.html +13 -19
  345. data/rdoc/RubyXL/PrintOptions.html +13 -19
  346. data/rdoc/RubyXL/PrinterSettingsFile.html +12 -25
  347. data/rdoc/RubyXL/ProtectedRange.html +13 -19
  348. data/rdoc/RubyXL/ProtectedRanges.html +13 -19
  349. data/rdoc/RubyXL/Protection.html +13 -19
  350. data/rdoc/RubyXL/QueryParameter.html +99 -0
  351. data/rdoc/RubyXL/QueryParameters.html +99 -0
  352. data/rdoc/RubyXL/QueryTable.html +155 -0
  353. data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
  354. data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
  355. data/rdoc/RubyXL/QueryTableField.html +99 -0
  356. data/rdoc/RubyXL/QueryTableFields.html +99 -0
  357. data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
  358. data/rdoc/RubyXL/RID.html +12 -17
  359. data/rdoc/RubyXL/RawOOXML.html +21 -60
  360. data/rdoc/RubyXL/Reference.html +63 -228
  361. data/rdoc/RubyXL/Relationship.html +12 -17
  362. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +14 -32
  363. data/rdoc/RubyXL/RelationshipSupport.html +26 -120
  364. data/rdoc/RubyXL/RevisionPointer.html +99 -0
  365. data/rdoc/RubyXL/RichText.html +20 -39
  366. data/rdoc/RubyXL/RichTextRun.html +18 -38
  367. data/rdoc/RubyXL/Row.html +53 -152
  368. data/rdoc/RubyXL/RowExt.html +13 -19
  369. data/rdoc/RubyXL/RunProperties.html +13 -19
  370. data/rdoc/RubyXL/Scenario.html +13 -19
  371. data/rdoc/RubyXL/Scenarios.html +13 -19
  372. data/rdoc/RubyXL/Selection.html +19 -39
  373. data/rdoc/RubyXL/ShapeGuide.html +13 -19
  374. data/rdoc/RubyXL/ShapeTextRectangle.html +13 -19
  375. data/rdoc/RubyXL/SharedStringsTable.html +38 -147
  376. data/rdoc/RubyXL/Sheet.html +13 -19
  377. data/rdoc/RubyXL/SheetCalculationProperties.html +13 -19
  378. data/rdoc/RubyXL/SheetData.html +20 -53
  379. data/rdoc/RubyXL/SheetDataExt.html +13 -19
  380. data/rdoc/RubyXL/SheetDataSet.html +13 -19
  381. data/rdoc/RubyXL/SheetMetadata.html +108 -0
  382. data/rdoc/RubyXL/SheetName.html +13 -19
  383. data/rdoc/RubyXL/SheetNames.html +13 -19
  384. data/rdoc/RubyXL/Sheets.html +13 -19
  385. data/rdoc/RubyXL/SlicerCacheFile.html +12 -25
  386. data/rdoc/RubyXL/SlicerFile.html +12 -25
  387. data/rdoc/RubyXL/SmartTagProperties.html +13 -19
  388. data/rdoc/RubyXL/SmartTagType.html +13 -19
  389. data/rdoc/RubyXL/SmartTagTypes.html +13 -19
  390. data/rdoc/RubyXL/SmartTags.html +13 -19
  391. data/rdoc/RubyXL/SortCondition.html +13 -19
  392. data/rdoc/RubyXL/SortState.html +13 -19
  393. data/rdoc/RubyXL/Sqref.html +20 -53
  394. data/rdoc/RubyXL/Stop.html +13 -19
  395. data/rdoc/RubyXL/StringNode.html +12 -17
  396. data/rdoc/RubyXL/StringNodeW3C.html +21 -54
  397. data/rdoc/RubyXL/StringValue.html +12 -17
  398. data/rdoc/RubyXL/Stylesheet.html +35 -117
  399. data/rdoc/RubyXL/TableFile.html +12 -25
  400. data/rdoc/RubyXL/TableParts.html +12 -17
  401. data/rdoc/RubyXL/TableStyle.html +13 -19
  402. data/rdoc/RubyXL/TableStyles.html +13 -19
  403. data/rdoc/RubyXL/Text.html +23 -67
  404. data/rdoc/RubyXL/TextImportSettings.html +99 -0
  405. data/rdoc/RubyXL/Theme.html +57 -62
  406. data/rdoc/RubyXL/ThemeElements.html +13 -19
  407. data/rdoc/RubyXL/ThumbnailFile.html +12 -25
  408. data/rdoc/RubyXL/Top10.html +13 -19
  409. data/rdoc/RubyXL/VMLDrawingFile.html +15 -32
  410. data/rdoc/RubyXL/Variant.html +13 -19
  411. data/rdoc/RubyXL/Vector.html +18 -38
  412. data/rdoc/RubyXL/VectorValue.html +12 -17
  413. data/rdoc/RubyXL/VisualProperties.html +13 -19
  414. data/rdoc/RubyXL/WebPublishObject.html +13 -19
  415. data/rdoc/RubyXL/WebPublishObjects.html +13 -19
  416. data/rdoc/RubyXL/WebPublishingItem.html +13 -19
  417. data/rdoc/RubyXL/WebPublishingItems.html +13 -19
  418. data/rdoc/RubyXL/WebPublishingProperties.html +13 -19
  419. data/rdoc/RubyXL/WebQueryProperties.html +99 -0
  420. data/rdoc/RubyXL/Workbook.html +487 -227
  421. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +163 -871
  422. data/rdoc/RubyXL/WorkbookProperties.html +13 -19
  423. data/rdoc/RubyXL/WorkbookProtection.html +13 -19
  424. data/rdoc/RubyXL/WorkbookRoot.html +28 -114
  425. data/rdoc/RubyXL/WorkbookView.html +13 -19
  426. data/rdoc/RubyXL/WorkbookViews.html +13 -19
  427. data/rdoc/RubyXL/Worksheet.html +93 -121
  428. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +299 -1109
  429. data/rdoc/RubyXL/WorksheetDimensions.html +13 -19
  430. data/rdoc/RubyXL/WorksheetFormatProperties.html +12 -17
  431. data/rdoc/RubyXL/WorksheetProperties.html +13 -19
  432. data/rdoc/RubyXL/WorksheetProtection.html +13 -19
  433. data/rdoc/RubyXL/WorksheetView.html +13 -19
  434. data/rdoc/RubyXL/WorksheetViews.html +13 -19
  435. data/rdoc/RubyXL/XF.html +13 -19
  436. data/rdoc/RubyXL.html +41 -296
  437. data/rdoc/created.rid +45 -38
  438. data/rdoc/css/fonts.css +6 -6
  439. data/rdoc/css/rdoc.css +55 -6
  440. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  441. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  442. data/rdoc/index.html +44 -363
  443. data/rdoc/js/darkfish.js +23 -100
  444. data/rdoc/js/navigation.js +4 -41
  445. data/rdoc/js/navigation.js.gz +0 -0
  446. data/rdoc/js/search.js +32 -31
  447. data/rdoc/js/search_index.js +1 -1
  448. data/rdoc/js/search_index.js.gz +0 -0
  449. data/rdoc/js/searcher.js +7 -6
  450. data/rdoc/js/searcher.js.gz +0 -0
  451. data/rdoc/table_of_contents.html +347 -75
  452. data/rubyXL.gemspec +78 -43
  453. data/spec/lib/cell_spec.rb +115 -4
  454. data/spec/lib/color_spec.rb +2 -1
  455. data/spec/lib/parser_spec.rb +24 -27
  456. data/spec/lib/reference_spec.rb +9 -3
  457. data/spec/lib/rgb_color_spec.rb +27 -0
  458. data/spec/lib/stylesheet_spec.rb +8 -11
  459. data/spec/lib/text_spec.rb +8 -4
  460. data/spec/lib/workbook_spec.rb +26 -5
  461. data/spec/lib/worksheet_spec.rb +873 -479
  462. data/spec/spec_helper.rb +2 -0
  463. data/test/test_parse_write.rb +15 -15
  464. metadata +65 -10
  465. data/rdoc/js/jquery.js +0 -4
@@ -10,14 +10,14 @@ require 'rubyXL/objects/column_range'
10
10
  require 'rubyXL/objects/filters'
11
11
  require 'rubyXL/objects/data_validation'
12
12
  require 'rubyXL/objects/comments'
13
+ require 'rubyXL/objects/connection'
14
+ require 'rubyXL/objects/query_table'
13
15
  require 'rubyXL/worksheet'
14
- require 'rubyXL/convenience_methods'
15
16
 
16
17
  module RubyXL
17
-
18
18
  # Eventually, the entire code for Worksheet will be moved here. One small step at a time!
19
19
 
20
- # http://www.schemacentral.com/sc/ooxml/e-ssml_outlinePr-1.html
20
+ # http://www.datypic.com/sc/ooxml/e-ssml_outlinePr-1.html
21
21
  class OutlineProperties < OOXMLObject
22
22
  define_attribute(:applyStyles, :bool, :default => false)
23
23
  define_attribute(:summaryBelow, :bool, :default => true)
@@ -26,14 +26,14 @@ module RubyXL
26
26
  define_element_name 'outlinePr'
27
27
  end
28
28
 
29
- # http://www.schemacentral.com/sc/ooxml/e-ssml_pageSetUpPr-1.html
29
+ # http://www.datypic.com/sc/ooxml/e-ssml_pageSetUpPr-1.html
30
30
  class PageSetupProperties < OOXMLObject
31
31
  define_attribute(:autoPageBreaks, :bool, :default => true)
32
32
  define_attribute(:fitToPage, :bool, :default => false)
33
33
  define_element_name 'pageSetUpPr'
34
34
  end
35
35
 
36
- # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetPr-3.html
36
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetPr-3.html
37
37
  class WorksheetProperties < OOXMLObject
38
38
  define_attribute(:syncHorizontal, :bool, :default => false)
39
39
  define_attribute(:syncVertical, :bool, :default => false)
@@ -50,14 +50,14 @@ module RubyXL
50
50
  define_element_name 'sheetPr'
51
51
  end
52
52
 
53
- # http://www.schemacentral.com/sc/ooxml/e-ssml_dimension-3.html
53
+ # http://www.datypic.com/sc/ooxml/e-ssml_dimension-3.html
54
54
  class WorksheetDimensions < OOXMLObject
55
55
  define_attribute(:ref, :ref)
56
56
  define_element_name 'dimension'
57
57
  end
58
58
 
59
59
  class WorksheetFormatProperties < OOXMLObject
60
- define_attribute(:baseColWidth, :int, :default => 8)
60
+ define_attribute(:baseColWidth, :int, :default => 8)
61
61
  define_attribute(:defaultColWidth, :double)
62
62
  define_attribute(:defaultRowHeight, :double, :required => true)
63
63
  define_attribute(:customHeight, :bool, :default => false)
@@ -69,7 +69,7 @@ module RubyXL
69
69
  define_element_name 'sheetFormatPr'
70
70
  end
71
71
 
72
- # http://www.schemacentral.com/sc/ooxml/e-ssml_pageSetup-1.html
72
+ # http://www.datypic.com/sc/ooxml/e-ssml_pageSetup-1.html
73
73
  class PageSetup < OOXMLObject
74
74
  define_attribute(:paperSize, :int, :default => 1)
75
75
  define_attribute(:scale, :int, :default => 100)
@@ -82,12 +82,12 @@ module RubyXL
82
82
  define_attribute(:blackAndWhite, :bool, :default => false)
83
83
  define_attribute(:draft, :bool, :default => false)
84
84
  define_attribute(:cellComments, RubyXL::ST_CellComments, :default => 'none')
85
- define_attribute(:useFirstPageNumber, :bool, :default => false)
85
+ define_attribute(:useFirstPageNumber, :bool, :default => false)
86
86
  define_attribute(:errors, RubyXL::ST_PrintError, :default => 'displayed')
87
87
  define_attribute(:horizontalDpi, :int, :default => 600)
88
88
  define_attribute(:verticalDpi, :int, :default => 600)
89
89
  define_attribute(:copies, :int, :default => 1)
90
- define_attribute(:'r:id', :string)
90
+ define_relationship
91
91
  define_element_name 'pageSetup'
92
92
  end
93
93
 
@@ -96,19 +96,19 @@ module RubyXL
96
96
  define_element_name 'tableParts'
97
97
  end
98
98
 
99
- # http://www.schemacentral.com/sc/ooxml/e-ssml_mergeCell-1.html
99
+ # http://www.datypic.com/sc/ooxml/e-ssml_mergeCell-1.html
100
100
  class MergedCell < OOXMLObject
101
101
  define_attribute(:ref, :ref)
102
102
  define_element_name 'mergeCell'
103
103
  end
104
104
 
105
- # http://www.schemacentral.com/sc/ooxml/e-ssml_mergeCells-1.html
105
+ # http://www.datypic.com/sc/ooxml/e-ssml_mergeCells-1.html
106
106
  class MergedCells < OOXMLContainerObject
107
107
  define_child_node(RubyXL::MergedCell, :collection => :with_count)
108
108
  define_element_name 'mergeCells'
109
109
  end
110
110
 
111
- # http://www.schemacentral.com/sc/ooxml/e-ssml_printOptions-1.html
111
+ # http://www.datypic.com/sc/ooxml/e-ssml_printOptions-1.html
112
112
  class PrintOptions < OOXMLObject
113
113
  define_attribute(:horizontalCentered, :bool, :default => false)
114
114
  define_attribute(:verticalCentered, :bool, :default => false)
@@ -118,30 +118,30 @@ module RubyXL
118
118
  define_element_name 'printOptions'
119
119
  end
120
120
 
121
- # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetCalcPr-1.html
121
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetCalcPr-1.html
122
122
  class SheetCalculationProperties < OOXMLObject
123
123
  define_attribute(:fullCalcOnLoad, :bool, :default => false)
124
124
  define_element_name 'sheetCalcPr'
125
125
  end
126
126
 
127
- # http://www.schemacentral.com/sc/ooxml/e-ssml_protectedRange-1.html
127
+ # http://www.datypic.com/sc/ooxml/e-ssml_protectedRange-1.html
128
128
  class ProtectedRange < OOXMLObject
129
- define_attribute(:password, :string)
129
+ define_attribute(:password, RubyXL::ST_UnsignedShortHex)
130
130
  define_attribute(:sqref, :sqref, :required => true)
131
131
  define_attribute(:name, :string, :required => true)
132
132
  define_attribute(:securityDescriptor, :string)
133
133
  define_element_name 'protectedRange'
134
134
  end
135
135
 
136
- # http://www.schemacentral.com/sc/ooxml/e-ssml_protectedRanges-1.html
136
+ # http://www.datypic.com/sc/ooxml/e-ssml_protectedRanges-1.html
137
137
  class ProtectedRanges < OOXMLContainerObject
138
138
  define_child_node(RubyXL::ProtectedRange, :collection => true)
139
139
  define_element_name 'protectedRanges'
140
140
  end
141
141
 
142
- # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetProtection-1.html
142
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetProtection-1.html
143
143
  class WorksheetProtection < OOXMLObject
144
- define_attribute(:password, :string)
144
+ define_attribute(:password, RubyXL::ST_UnsignedShortHex)
145
145
  define_attribute(:sheet, :bool, :default => false)
146
146
  define_attribute(:objects, :bool, :default => false)
147
147
  define_attribute(:scenarios, :bool, :default => false)
@@ -161,23 +161,23 @@ module RubyXL
161
161
  define_element_name 'sheetProtection'
162
162
  end
163
163
 
164
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cfvo-1.html
164
+ # http://www.datypic.com/sc/ooxml/e-ssml_cfvo-1.html
165
165
  class ConditionalFormatValue < OOXMLObject
166
166
  define_attribute(:type, RubyXL::ST_CfvoType, :required => true)
167
167
  define_attribute(:val, :string)
168
- define_attribute(:gte, :bool, :default => true)
168
+ define_attribute(:gte, :bool, :default => true)
169
169
  define_child_node(RubyXL::ExtensionStorageArea)
170
170
  define_element_name 'cfvo'
171
171
  end
172
172
 
173
- # http://www.schemacentral.com/sc/ooxml/e-ssml_colorScale-1.html
173
+ # http://www.datypic.com/sc/ooxml/e-ssml_colorScale-1.html
174
174
  class ColorScale < OOXMLObject
175
175
  define_child_node(RubyXL::ConditionalFormatValue, :collection => true, :accessor => :cfvo)
176
176
  define_child_node(RubyXL::Color)
177
177
  define_element_name 'colorScale'
178
178
  end
179
179
 
180
- # http://www.schemacentral.com/sc/ooxml/e-ssml_dataBar-1.html
180
+ # http://www.datypic.com/sc/ooxml/e-ssml_dataBar-1.html
181
181
  class DataBar < OOXMLObject
182
182
  define_attribute(:minLength, :int, :default => 10)
183
183
  define_attribute(:maxLength, :int, :default => 90)
@@ -187,7 +187,7 @@ module RubyXL
187
187
  define_element_name 'dataBar'
188
188
  end
189
189
 
190
- # http://www.schemacentral.com/sc/ooxml/e-ssml_iconSet-1.html
190
+ # http://www.datypic.com/sc/ooxml/e-ssml_iconSet-1.html
191
191
  class IconSet < OOXMLObject
192
192
  define_attribute(:iconSet, RubyXL::ST_IconSetType, :default => '3TrafficLights1')
193
193
  define_attribute(:showValue, :bool, :default => true)
@@ -197,7 +197,7 @@ module RubyXL
197
197
  define_element_name 'iconSet'
198
198
  end
199
199
 
200
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cfRule-1.html
200
+ # http://www.datypic.com/sc/ooxml/e-ssml_cfRule-1.html
201
201
  class ConditionalFormattingRule < OOXMLObject
202
202
  define_attribute(:type, RubyXL::ST_CfType)
203
203
  define_attribute(:dxfId, :int)
@@ -211,7 +211,7 @@ module RubyXL
211
211
  define_attribute(:timePeriod, RubyXL::ST_TimePeriod)
212
212
  define_attribute(:rank, :int)
213
213
  define_attribute(:stdDev, :int)
214
- define_attribute(:equalAverage, :bool, :default => false)
214
+ define_attribute(:equalAverage, :bool, :default => false)
215
215
  define_child_node(RubyXL::Formula, :collection => true, :node_name => :formula, :accessor => :formulas)
216
216
  define_child_node(RubyXL::ColorScale)
217
217
  define_child_node(RubyXL::DataBar)
@@ -220,7 +220,7 @@ module RubyXL
220
220
  define_element_name 'cfRule'
221
221
  end
222
222
 
223
- # http://www.schemacentral.com/sc/ooxml/e-ssml_brk-1.html
223
+ # http://www.datypic.com/sc/ooxml/e-ssml_brk-1.html
224
224
  class Break < OOXMLObject
225
225
  define_attribute(:id, :int, :default => 0)
226
226
  define_attribute(:min, :int, :default => 0)
@@ -230,13 +230,13 @@ module RubyXL
230
230
  define_element_name 'brk'
231
231
  end
232
232
 
233
- # http://www.schemacentral.com/sc/ooxml/e-ssml_rowBreaks-1.html
233
+ # http://www.datypic.com/sc/ooxml/e-ssml_rowBreaks-1.html
234
234
  class BreakList < OOXMLContainerObject
235
235
  define_attribute(:manualBreakCount, :int, :default => 0)
236
236
  define_child_node(RubyXL::Break, :collection => :with_count)
237
237
  end
238
238
 
239
- # http://www.schemacentral.com/sc/ooxml/e-ssml_conditionalFormatting-1.html
239
+ # http://www.datypic.com/sc/ooxml/e-ssml_conditionalFormatting-1.html
240
240
  class ConditionalFormatting < OOXMLObject
241
241
  define_attribute(:pivot, :bool, :default => false)
242
242
  define_attribute(:sqref, :sqref)
@@ -245,7 +245,7 @@ module RubyXL
245
245
  define_element_name 'conditionalFormatting'
246
246
  end
247
247
 
248
- # http://www.schemacentral.com/sc/ooxml/e-ssml_inputCells-1.html
248
+ # http://www.datypic.com/sc/ooxml/e-ssml_inputCells-1.html
249
249
  class InputCells < OOXMLObject
250
250
  define_attribute(:r, :ref, :required => true)
251
251
  define_attribute(:deleted, :bool, :default => false)
@@ -255,7 +255,7 @@ module RubyXL
255
255
  define_element_name 'inputCells'
256
256
  end
257
257
 
258
- # http://www.schemacentral.com/sc/ooxml/e-ssml_scenario-1.html
258
+ # http://www.datypic.com/sc/ooxml/e-ssml_scenario-1.html
259
259
  class Scenario < OOXMLContainerObject
260
260
  define_attribute(:name, :string)
261
261
  define_attribute(:locked, :bool, :default => false)
@@ -266,7 +266,7 @@ module RubyXL
266
266
  define_element_name 'scenario'
267
267
  end
268
268
 
269
- # http://www.schemacentral.com/sc/ooxml/e-ssml_scenarios-1.html
269
+ # http://www.datypic.com/sc/ooxml/e-ssml_scenarios-1.html
270
270
  class Scenarios < OOXMLContainerObject
271
271
  define_attribute(:current, :int)
272
272
  define_attribute(:show, :int)
@@ -275,7 +275,7 @@ module RubyXL
275
275
  define_element_name 'scenarios'
276
276
  end
277
277
 
278
- # http://www.schemacentral.com/sc/ooxml/e-ssml_ignoredError-1.html
278
+ # http://www.datypic.com/sc/ooxml/e-ssml_ignoredError-1.html
279
279
  class IgnoredError < OOXMLObject
280
280
  define_attribute(:sqref, :sqref, :required => true)
281
281
  define_attribute(:pivot, :bool, :default => false)
@@ -291,30 +291,30 @@ module RubyXL
291
291
  define_element_name 'ignoredError'
292
292
  end
293
293
 
294
- # http://www.schemacentral.com/sc/ooxml/e-ssml_ignoredErrors-1.html
294
+ # http://www.datypic.com/sc/ooxml/e-ssml_ignoredErrors-1.html
295
295
  class IgnoredErrors < OOXMLContainerObject
296
296
  define_child_node(RubyXL::IgnoredError, :collection => true)
297
297
  define_child_node(RubyXL::ExtensionStorageArea)
298
298
  define_element_name 'ignoredErrors'
299
299
  end
300
300
 
301
- # http://www.schemacentral.com/sc/ooxml/e-ssml_hyperlink-1.html
301
+ # http://www.datypic.com/sc/ooxml/e-ssml_hyperlink-1.html
302
302
  class Hyperlink < OOXMLObject
303
- define_attribute(:ref, :ref, :required => true)
304
- define_attribute(:'r:id', :string)
303
+ define_attribute(:ref, :ref, :required => true)
304
+ define_relationship
305
305
  define_attribute(:location, :string)
306
306
  define_attribute(:tooltip, :string)
307
307
  define_attribute(:display, :string)
308
308
  define_element_name 'hyperlink'
309
309
  end
310
310
 
311
- # http://www.schemacentral.com/sc/ooxml/e-ssml_hyperlinks-1.html
311
+ # http://www.datypic.com/sc/ooxml/e-ssml_hyperlinks-1.html
312
312
  class Hyperlinks < OOXMLContainerObject
313
313
  define_child_node(RubyXL::Hyperlink, :collection => true)
314
314
  define_element_name 'hyperlinks'
315
315
  end
316
316
 
317
- # http://www.schemacentral.com/sc/ooxml/e-ssml_oleObject-1.html
317
+ # http://www.datypic.com/sc/ooxml/e-ssml_oleObject-1.html
318
318
  class OLEObject < OOXMLObject
319
319
  define_attribute(:progId, :string)
320
320
  define_attribute(:dvAspect, RubyXL::ST_DvAspect, :default => 'DVASPECT_CONTENT')
@@ -322,33 +322,33 @@ module RubyXL
322
322
  define_attribute(:oleUpdate, RubyXL::ST_OleUpdate)
323
323
  define_attribute(:autoLoad, :bool, :default => false)
324
324
  define_attribute(:shapeId, :int, :required => true)
325
- define_attribute(:'r:id', :string)
325
+ define_relationship
326
326
  define_element_name 'oleObject'
327
327
  end
328
328
 
329
- # http://www.schemacentral.com/sc/ooxml/e-ssml_oleObjects-1.html
329
+ # http://www.datypic.com/sc/ooxml/e-ssml_oleObjects-1.html
330
330
  class OLEObjects < OOXMLContainerObject
331
331
  define_child_node(RubyXL::OLEObject, :collection => true)
332
332
  define_child_node(RubyXL::AlternateContent)
333
333
  define_element_name 'oleObjects'
334
334
  end
335
335
 
336
- # http://www.schemacentral.com/sc/ooxml/e-ssml_dataRef-1.html
336
+ # http://www.datypic.com/sc/ooxml/e-ssml_dataRef-1.html
337
337
  class DataConsolidationReference < OOXMLObject
338
338
  define_attribute(:ref, :ref)
339
339
  define_attribute(:name, :string)
340
340
  define_attribute(:sheet, :string)
341
- define_attribute(:'r:id', :string)
341
+ define_relationship
342
342
  define_element_name 'dataRef'
343
343
  end
344
344
 
345
- # http://www.schemacentral.com/sc/ooxml/e-ssml_dataRefs-1.html
345
+ # http://www.datypic.com/sc/ooxml/e-ssml_dataRefs-1.html
346
346
  class DataConsolidationReferences < OOXMLContainerObject
347
347
  define_child_node(RubyXL::DataConsolidationReference, :collection => :with_count)
348
348
  define_element_name 'dataRefs'
349
349
  end
350
350
 
351
- # http://www.schemacentral.com/sc/ooxml/e-ssml_dataConsolidate-1.html
351
+ # http://www.datypic.com/sc/ooxml/e-ssml_dataConsolidate-1.html
352
352
  class DataConsolidate < OOXMLObject
353
353
  define_attribute(:function, RubyXL::ST_DataConsolidateFunction, :default => 'sum')
354
354
  define_attribute(:leftLabels, :bool, :default => false)
@@ -358,29 +358,29 @@ module RubyXL
358
358
  define_element_name 'dataConsolidate'
359
359
  end
360
360
 
361
- # http://www.schemacentral.com/sc/ooxml/e-ssml_pane-1.html
361
+ # http://www.datypic.com/sc/ooxml/e-ssml_pane-1.html
362
362
  class Pane < OOXMLObject
363
363
  define_attribute(:xSplit, :double)
364
364
  define_attribute(:ySplit, :double)
365
- define_attribute(:topLeftCell, :string)
366
- define_attribute(:activePane, RubyXL::ST_Pane, :default => 'topLeft', )
367
- define_attribute(:state, RubyXL::ST_PaneState, :default=> 'split')
365
+ define_attribute(:topLeftCell, :ref)
366
+ define_attribute(:activePane, RubyXL::ST_Pane, :default => 'topLeft')
367
+ define_attribute(:state, RubyXL::ST_PaneState, :default => 'split')
368
368
  define_element_name 'pane'
369
369
  end
370
370
 
371
- # http://www.schemacentral.com/sc/ooxml/e-ssml_selection-1.html
371
+ # http://www.datypic.com/sc/ooxml/e-ssml_selection-1.html
372
372
  class Selection < OOXMLObject
373
373
  define_attribute(:pane, RubyXL::ST_Pane)
374
374
  define_attribute(:activeCell, :ref)
375
- define_attribute(:activeCellId, :int) # 0-based index of @active_cell in @sqref
375
+ define_attribute(:activeCellId, :uint) # 0-based index of @active_cell in @sqref
376
376
  define_attribute(:sqref, :sqref) # Array of references to the selected cells.
377
377
  define_element_name 'selection'
378
378
 
379
379
  def before_write_xml
380
- # Normally, rindex of activeCellId in sqref:
380
+ # Normally, +rindex+ of activeCellId in sqref:
381
381
  # <selection activeCell="E12" activeCellId="9" sqref="A4 B6 C8 D10 E12 A4 B6 C8 D10 E12"/>
382
382
  if @active_cell_id.nil? && !@active_cell.nil? && @sqref.size > 1 then
383
- # But, things can be more complex:
383
+ # But, things can get more complicated:
384
384
  # <selection activeCell="E8" activeCellId="2" sqref="A4:B4 C6:D6 E8:F8"/>
385
385
  # Not using .reverse.each here to avoid memory reallocation.
386
386
  @sqref.each_with_index { |ref, ind| @active_cell_id = ind if ref.cover?(@active_cell) }
@@ -389,7 +389,7 @@ module RubyXL
389
389
  end
390
390
  end
391
391
 
392
- # http://www.schemacentral.com/sc/ooxml/e-ssml_customSheetView-1.html
392
+ # http://www.datypic.com/sc/ooxml/e-ssml_customSheetView-1.html
393
393
  class CustomSheetView < OOXMLObject
394
394
  define_attribute(:guid, :string, :required => true)
395
395
  define_attribute(:scale, :int, :default => 100)
@@ -407,9 +407,9 @@ module RubyXL
407
407
  define_attribute(:hiddenRows, :bool, :default => false)
408
408
  define_attribute(:hiddenColumns, :bool, :default => false)
409
409
  define_attribute(:state, RubyXL::ST_Visibility, :default => 'visible')
410
- define_attribute(:filterUnique, :bool, :default => false)
410
+ define_attribute(:filterUnique, :bool, :default => false)
411
411
  define_attribute(:view, RubyXL::ST_SheetViewType, :default => 'normal')
412
- define_attribute(:showRuler, :bool, :default => true)
412
+ define_attribute(:showRuler, :bool, :default => true)
413
413
  define_attribute(:topLeftCell, :ref)
414
414
  define_child_node(RubyXL::Pane)
415
415
  define_child_node(RubyXL::Selection)
@@ -424,47 +424,47 @@ module RubyXL
424
424
  define_element_name 'customSheetView'
425
425
  end
426
426
 
427
- # http://www.schemacentral.com/sc/ooxml/e-ssml_customSheetViews-1.html
427
+ # http://www.datypic.com/sc/ooxml/e-ssml_customSheetViews-1.html
428
428
  class CustomSheetViews < OOXMLContainerObject
429
429
  define_child_node(RubyXL::CustomSheetView, :collection => true)
430
430
  define_element_name 'customSheetViews'
431
431
  end
432
432
 
433
- # http://www.schemacentral.com/sc/ooxml/e-ssml_control-1.html
433
+ # http://www.datypic.com/sc/ooxml/e-ssml_control-1.html
434
434
  class EmbeddedControl < OOXMLObject
435
- define_attribute(:shapeId, :int, :required => true)
436
- define_attribute(:'r:id', :string, :required => true)
437
- define_attribute(:name, :string)
435
+ define_attribute(:shapeId, :int, :required => true)
436
+ define_relationship(:required => true)
437
+ define_attribute(:name, :string)
438
438
  define_element_name 'control'
439
439
  end
440
440
 
441
- # http://www.schemacentral.com/sc/ooxml/e-ssml_controls-1.html
441
+ # http://www.datypic.com/sc/ooxml/e-ssml_controls-1.html
442
442
  class EmbeddedControls < OOXMLContainerObject
443
443
  define_child_node(RubyXL::EmbeddedControl, :collection => true)
444
444
  define_child_node(RubyXL::AlternateContent)
445
445
  define_element_name 'controls'
446
446
  end
447
447
 
448
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cellWatch-1.html
448
+ # http://www.datypic.com/sc/ooxml/e-ssml_cellWatch-1.html
449
449
  class CellWatch < OOXMLObject
450
450
  define_attribute(:r, :ref)
451
451
  define_element_name 'cellWatch'
452
452
  end
453
453
 
454
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cellWatches-1.html
454
+ # http://www.datypic.com/sc/ooxml/e-ssml_cellWatches-1.html
455
455
  class CellWatches < OOXMLContainerObject
456
456
  define_child_node(RubyXL::CellWatch, :collection => true)
457
457
  define_element_name 'cellWatches'
458
458
  end
459
459
 
460
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cellSmartTagPr-1.html
460
+ # http://www.datypic.com/sc/ooxml/e-ssml_cellSmartTagPr-1.html
461
461
  class CellSmartTagProperty < OOXMLObject
462
462
  define_attribute(:key, :string, :required => true)
463
463
  define_attribute(:val, :string, :required => true)
464
464
  define_element_name 'cellSmartTagPr'
465
465
  end
466
466
 
467
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cellSmartTag-1.html
467
+ # http://www.datypic.com/sc/ooxml/e-ssml_cellSmartTag-1.html
468
468
  class CellSmartTag < OOXMLObject
469
469
  define_attribute(:type, :int, :required => true)
470
470
  define_attribute(:deleted, :bool, :default => false)
@@ -473,27 +473,27 @@ module RubyXL
473
473
  define_element_name 'cellSmartTag'
474
474
  end
475
475
 
476
- # http://www.schemacentral.com/sc/ooxml/e-ssml_cellSmartTags-1.html
476
+ # http://www.datypic.com/sc/ooxml/e-ssml_cellSmartTags-1.html
477
477
  class CellSmartTags < OOXMLContainerObject
478
478
  define_attribute(:r, :ref, :accessor => :ref)
479
479
  define_child_node(RubyXL::CellSmartTag, :collection => true)
480
480
  define_element_name 'cellSmartTags'
481
481
  end
482
482
 
483
- # http://www.schemacentral.com/sc/ooxml/e-ssml_smartTags-1.html
483
+ # http://www.datypic.com/sc/ooxml/e-ssml_smartTags-1.html
484
484
  class SmartTags < OOXMLContainerObject
485
485
  define_child_node(RubyXL::CellSmartTags, :collection => true)
486
486
  define_element_name 'smartTags'
487
487
  end
488
488
 
489
- # http://www.schemacentral.com/sc/ooxml/e-ssml_customPr-1.html
489
+ # http://www.datypic.com/sc/ooxml/e-ssml_customPr-1.html
490
490
  class CustomProperty < OOXMLObject
491
- define_attribute(:name, :string, :required => true)
492
- define_attribute(:'r:id', :string, :required => true)
491
+ define_attribute(:name, :string, :required => true)
492
+ define_relationship(:required => true)
493
493
  define_element_name 'customPr'
494
494
  end
495
495
 
496
- # http://www.schemacentral.com/sc/ooxml/e-ssml_customProperties-1.html
496
+ # http://www.datypic.com/sc/ooxml/e-ssml_customProperties-1.html
497
497
  class CustomProperties < OOXMLContainerObject
498
498
  define_child_node(RubyXL::CustomProperty, :collection => true)
499
499
  define_element_name 'customProperties'
@@ -528,93 +528,93 @@ module RubyXL
528
528
  define_element_name 'reference'
529
529
  end
530
530
 
531
- # http://www.schemacentral.com/sc/ooxml/e-ssml_references-1.html
531
+ # http://www.datypic.com/sc/ooxml/e-ssml_references-1.html
532
532
  class PivotReferences < OOXMLContainerObject
533
533
  define_child_node(RubyXL::PivotReference, :collection => :with_count)
534
534
  define_element_name 'references'
535
535
  end
536
536
 
537
- # http://www.schemacentral.com/sc/ooxml/e-ssml_pivotArea-4.html
537
+ # http://www.datypic.com/sc/ooxml/e-ssml_pivotArea-4.html
538
538
  class PivotArea < OOXMLObject
539
539
  define_attribute(:field, :int)
540
540
  define_attribute(:type, RubyXL::ST_PivotAreaType, :default => 'normal')
541
- define_attribute(:dataOnly, :bool, :default => true)
542
- define_attribute(:labelOnly, :bool, :default => false)
543
- define_attribute(:grandRow, :bool, :default => false)
544
- define_attribute(:grandCol, :bool, :default => false)
545
- define_attribute(:cacheIndex, :bool, :default => false)
546
- define_attribute(:outline, :bool, :default => true)
541
+ define_attribute(:dataOnly, :bool, :default => true)
542
+ define_attribute(:labelOnly, :bool, :default => false)
543
+ define_attribute(:grandRow, :bool, :default => false)
544
+ define_attribute(:grandCol, :bool, :default => false)
545
+ define_attribute(:cacheIndex, :bool, :default => false)
546
+ define_attribute(:outline, :bool, :default => true)
547
547
  define_attribute(:offset, :ref)
548
- define_attribute(:collapsedLevelsAreSubtotals, :bool, :default => false)
548
+ define_attribute(:collapsedLevelsAreSubtotals, :bool, :default => false)
549
549
  define_attribute(:axis, RubyXL::ST_Axis)
550
- define_attribute(:fieldPosition, :int, :default => 0)
550
+ define_attribute(:fieldPosition, :int, :default => 0)
551
551
  define_child_node(RubyXL::PivotReferences)
552
552
  define_child_node(RubyXL::ExtensionStorageArea)
553
553
  define_element_name 'pivotArea'
554
554
  end
555
555
 
556
- # http://www.schemacentral.com/sc/ooxml/e-ssml_pivotSelection-1.html
556
+ # http://www.datypic.com/sc/ooxml/e-ssml_pivotSelection-1.html
557
557
  class PivotTableSelection < OOXMLObject
558
558
  define_attribute(:pane, RubyXL::ST_Pane, :default => 'topLeft')
559
- define_attribute(:showHeader, :bool, :default => false)
560
- define_attribute(:label, :bool, :default => false)
561
- define_attribute(:data, :bool, :default => false)
562
- define_attribute(:extendable, :bool, :default => false)
563
- define_attribute(:count, :int, :default => 0)
559
+ define_attribute(:showHeader, :bool, :default => false)
560
+ define_attribute(:label, :bool, :default => false)
561
+ define_attribute(:data, :bool, :default => false)
562
+ define_attribute(:extendable, :bool, :default => false)
563
+ define_attribute(:count, :uint, :default => 0)
564
564
  define_attribute(:axis, RubyXL::ST_Axis)
565
- define_attribute(:dimension, :int, :default => 0)
566
- define_attribute(:start, :int, :default => 0)
567
- define_attribute(:min, :int, :default => 0)
568
- define_attribute(:max, :int, :default => 0)
569
- define_attribute(:activeRow, :int, :default => 0)
570
- define_attribute(:activeCol, :int, :default => 0)
571
- define_attribute(:previousRow, :int, :default => 0)
572
- define_attribute(:previousCol, :int, :default => 0)
573
- define_attribute(:click, :int, :default => 0)
574
- define_attribute(:'r:id', :string)
565
+ define_attribute(:dimension, :uint, :default => 0)
566
+ define_attribute(:start, :uint, :default => 0)
567
+ define_attribute(:min, :uint, :default => 0)
568
+ define_attribute(:max, :uint, :default => 0)
569
+ define_attribute(:activeRow, :uint, :default => 0)
570
+ define_attribute(:activeCol, :uint, :default => 0)
571
+ define_attribute(:previousRow, :uint, :default => 0)
572
+ define_attribute(:previousCol, :uint, :default => 0)
573
+ define_attribute(:click, :uint, :default => 0)
574
+ define_relationship
575
575
  define_child_node(RubyXL::PivotArea)
576
576
  define_element_name 'pivotSelection'
577
577
  end
578
578
 
579
- # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetView-1.html
579
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetView-1.html
580
580
  class WorksheetView < OOXMLObject
581
- define_attribute(:windowProtection, :bool, :default => false)
582
- define_attribute(:showFormulas, :bool, :default => false)
583
- define_attribute(:showGridLines, :bool, :default => true)
584
- define_attribute(:showRowColHeaders, :bool, :default => true)
585
- define_attribute(:showZeros, :bool, :default => true)
586
- define_attribute(:rightToLeft, :bool, :default => false)
587
- define_attribute(:tabSelected, :bool, :default => false)
588
- define_attribute(:showRuler, :bool, :default => true)
589
- define_attribute(:showOutlineSymbols, :bool, :default => true)
590
- define_attribute(:defaultGridColor, :bool, :default => true)
591
- define_attribute(:showWhiteSpace, :bool, :default => true)
581
+ define_attribute(:windowProtection, :bool, :default => false)
582
+ define_attribute(:showFormulas, :bool, :default => false)
583
+ define_attribute(:showGridLines, :bool, :default => true)
584
+ define_attribute(:showRowColHeaders, :bool, :default => true)
585
+ define_attribute(:showZeros, :bool, :default => true)
586
+ define_attribute(:rightToLeft, :bool, :default => false)
587
+ define_attribute(:tabSelected, :bool, :default => false)
588
+ define_attribute(:showRuler, :bool, :default => true)
589
+ define_attribute(:showOutlineSymbols, :bool, :default => true)
590
+ define_attribute(:defaultGridColor, :bool, :default => true)
591
+ define_attribute(:showWhiteSpace, :bool, :default => true)
592
592
  define_attribute(:view, RubyXL::ST_SheetViewType, :default => 'normal')
593
593
  define_attribute(:topLeftCell, :ref)
594
- define_attribute(:colorId, :int, :default => 64)
595
- define_attribute(:zoomScale, :int, :default => 100)
596
- define_attribute(:zoomScaleNormal, :int, :default => 0)
597
- define_attribute(:zoomScaleSheetLayoutView, :bool, :default => 0)
598
- define_attribute(:zoomScalePageLayoutView, :bool, :default => 0)
599
- define_attribute(:workbookViewId, :int, :required => true, :default => 0 )
594
+ define_attribute(:colorId, :uint, :default => 64)
595
+ define_attribute(:zoomScale, :uint, :default => 100)
596
+ define_attribute(:zoomScaleNormal, :uint, :default => 0)
597
+ define_attribute(:zoomScaleSheetLayoutView, :uint, :default => 0)
598
+ define_attribute(:zoomScalePageLayoutView, :uint, :default => 0)
599
+ define_attribute(:workbookViewId, :uint, :required => true, :default => 0)
600
600
  define_child_node(RubyXL::Pane)
601
601
  define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections)
602
- define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections )
602
+ define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections)
603
603
  define_child_node(RubyXL::ExtensionStorageArea)
604
604
  define_element_name 'sheetView'
605
605
  end
606
606
 
607
- # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetViews-3.html
607
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetViews-3.html
608
608
  class WorksheetViews < OOXMLContainerObject
609
609
  define_child_node(RubyXL::WorksheetView, :collection => true)
610
610
  define_child_node(RubyXL::ExtensionStorageArea)
611
611
  define_element_name 'sheetViews'
612
612
  end
613
613
 
614
- # http://www.schemacentral.com/sc/ooxml/e-ssml_worksheet.html
614
+ # http://www.datypic.com/sc/ooxml/e-ssml_worksheet.html
615
615
  class Worksheet < OOXMLTopLevelObject
616
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'
617
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'
616
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'.freeze
617
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'.freeze
618
618
 
619
619
  include RubyXL::RelationshipSupport
620
620
 
@@ -630,8 +630,11 @@ module RubyXL
630
630
  define_relationship(RubyXL::PivotTableFile)
631
631
  define_relationship(RubyXL::TableFile)
632
632
  define_relationship(RubyXL::ControlPropertiesFile)
633
+ define_relationship(RubyXL::CustomPropertyFile)
633
634
  define_relationship(RubyXL::SlicerFile)
634
635
  define_relationship(RubyXL::OLEObjectFile)
636
+ define_relationship(RubyXL::ActiveX)
637
+ define_relationship(RubyXL::QueryTable)
635
638
 
636
639
  define_child_node(RubyXL::WorksheetProperties)
637
640
  define_child_node(RubyXL::WorksheetDimensions)
@@ -647,7 +650,7 @@ module RubyXL
647
650
  define_child_node(RubyXL::SortState)
648
651
  define_child_node(RubyXL::DataConsolidate)
649
652
  define_child_node(RubyXL::CustomSheetViews)
650
- define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
653
+ define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
651
654
  define_child_node(RubyXL::PhoneticProperties)
652
655
  define_child_node(RubyXL::ConditionalFormatting, :collection => [0..-1])
653
656
  define_child_node(RubyXL::DataValidations)
@@ -673,11 +676,11 @@ module RubyXL
673
676
  define_child_node(RubyXL::ExtensionStorageArea)
674
677
  define_child_node(RubyXL::AlternateContent)
675
678
  define_element_name 'worksheet'
676
- set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
679
+ set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
677
680
  'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r',
678
- 'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
679
- 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
680
- 'urn:schemas-microsoft-com:mac:vml' => 'mv')
681
+ 'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
682
+ 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
683
+ 'urn:schemas-microsoft-com:mac:vml' => 'mv')
681
684
 
682
685
  attr_accessor :workbook, :state, :sheet_name, :sheet_id, :rels
683
686
 
@@ -740,8 +743,20 @@ module RubyXL
740
743
  sheet_obj
741
744
  end
742
745
 
746
+ def get_col_xf(column_index)
747
+ workbook.stylesheet.cell_xfs[get_col_style(column_index)]
748
+ end
749
+
750
+ def get_row_xf(row)
751
+ workbook.stylesheet.cell_xfs[get_row_style(row)]
752
+ end
753
+
754
+ def cell_at(ref)
755
+ reference = RubyXL::Reference.new(ref)
756
+ raise "Invalid reference: #{ref}" unless reference.valid? && reference.single_cell?
757
+ sheet_data&.rows&.[](reference.first_row)&.cells&.[](reference.first_col)
758
+ end
759
+
743
760
  include LegacyWorksheet
744
- include WorksheetConvenienceMethods
745
761
  end
746
-
747
762
  end