rubyXL 3.4.24 → 3.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +96 -0
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +66 -37
  6. data/README.rdoc +7 -3
  7. data/Rakefile +6 -8
  8. data/VERSION +1 -1
  9. data/lib/rubyXL/cell.rb +2 -2
  10. data/lib/rubyXL/convenience_methods/cell.rb +16 -18
  11. data/lib/rubyXL/convenience_methods/worksheet.rb +1 -1
  12. data/lib/rubyXL/objects/chartsheet.rb +1 -2
  13. data/lib/rubyXL/objects/external_links.rb +8 -0
  14. data/lib/rubyXL/objects/reference.rb +11 -4
  15. data/lib/rubyXL/objects/storage.rb +5 -0
  16. data/lib/rubyXL/objects/workbook.rb +4 -4
  17. data/lib/rubyXL/worksheet.rb +1 -1
  18. data/rdoc/README_rdoc.html +103 -47
  19. data/rdoc/RubyXL/AExtension.html +15 -11
  20. data/rdoc/RubyXL/AExtensionStorageArea.html +3 -3
  21. data/rdoc/RubyXL/ActiveX.html +10 -8
  22. data/rdoc/RubyXL/ActiveXBinary.html +3 -3
  23. data/rdoc/RubyXL/AdjustHandleList.html +3 -3
  24. data/rdoc/RubyXL/Alignment.html +3 -3
  25. data/rdoc/RubyXL/AlternateContent.html +3 -3
  26. data/rdoc/RubyXL/AlternateUrls.html +99 -0
  27. data/rdoc/RubyXL/Authors.html +3 -3
  28. data/rdoc/RubyXL/AutoFilter.html +3 -3
  29. data/rdoc/RubyXL/AutoFilterColumn.html +3 -3
  30. data/rdoc/RubyXL/BinaryImageFile.html +3 -3
  31. data/rdoc/RubyXL/BodyProperties.html +3 -3
  32. data/rdoc/RubyXL/BooleanNode.html +3 -3
  33. data/rdoc/RubyXL/BooleanValue.html +3 -3
  34. data/rdoc/RubyXL/Border.html +27 -19
  35. data/rdoc/RubyXL/BorderEdge.html +15 -11
  36. data/rdoc/RubyXL/Borders.html +9 -7
  37. data/rdoc/RubyXL/Break.html +3 -3
  38. data/rdoc/RubyXL/BreakList.html +3 -3
  39. data/rdoc/RubyXL/CT_AdjPoint2D.html +3 -3
  40. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +3 -3
  41. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +3 -3
  42. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +3 -3
  43. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +3 -3
  44. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +3 -3
  45. data/rdoc/RubyXL/CT_Backdrop.html +3 -3
  46. data/rdoc/RubyXL/CT_Bevel.html +3 -3
  47. data/rdoc/RubyXL/CT_BiLevelEffect.html +3 -3
  48. data/rdoc/RubyXL/CT_BlendEffect.html +3 -3
  49. data/rdoc/RubyXL/CT_Blip.html +3 -3
  50. data/rdoc/RubyXL/CT_BlipFillProperties.html +3 -3
  51. data/rdoc/RubyXL/CT_BlurEffect.html +3 -3
  52. data/rdoc/RubyXL/CT_Camera.html +3 -3
  53. data/rdoc/RubyXL/CT_Color.html +3 -3
  54. data/rdoc/RubyXL/CT_ColorChangeEffect.html +3 -3
  55. data/rdoc/RubyXL/CT_ColorMapping.html +3 -3
  56. data/rdoc/RubyXL/CT_ColorScheme.html +3 -3
  57. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +3 -3
  58. data/rdoc/RubyXL/CT_ConnectionSite.html +3 -3
  59. data/rdoc/RubyXL/CT_ConnectionSiteList.html +3 -3
  60. data/rdoc/RubyXL/CT_DashStop.html +3 -3
  61. data/rdoc/RubyXL/CT_DashStopList.html +3 -3
  62. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +3 -3
  63. data/rdoc/RubyXL/CT_DuotoneEffect.html +3 -3
  64. data/rdoc/RubyXL/CT_EffectContainer.html +3 -3
  65. data/rdoc/RubyXL/CT_EffectList.html +3 -3
  66. data/rdoc/RubyXL/CT_EffectReference.html +3 -3
  67. data/rdoc/RubyXL/CT_EffectStyleItem.html +3 -3
  68. data/rdoc/RubyXL/CT_EffectStyleList.html +3 -3
  69. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +3 -3
  70. data/rdoc/RubyXL/CT_FillEffect.html +3 -3
  71. data/rdoc/RubyXL/CT_FillOverlayEffect.html +3 -3
  72. data/rdoc/RubyXL/CT_FillStyleList.html +3 -3
  73. data/rdoc/RubyXL/CT_FlatText.html +3 -3
  74. data/rdoc/RubyXL/CT_FontCollection.html +3 -3
  75. data/rdoc/RubyXL/CT_FontReference.html +3 -3
  76. data/rdoc/RubyXL/CT_GeomGuideList.html +3 -3
  77. data/rdoc/RubyXL/CT_GlowEffect.html +3 -3
  78. data/rdoc/RubyXL/CT_GradientFillProperties.html +3 -3
  79. data/rdoc/RubyXL/CT_GradientStop.html +3 -3
  80. data/rdoc/RubyXL/CT_GradientStopList.html +3 -3
  81. data/rdoc/RubyXL/CT_HSLEffect.html +3 -3
  82. data/rdoc/RubyXL/CT_HslColor.html +3 -3
  83. data/rdoc/RubyXL/CT_Hyperlink.html +3 -3
  84. data/rdoc/RubyXL/CT_InnerShadowEffect.html +3 -3
  85. data/rdoc/RubyXL/CT_LightRig.html +3 -3
  86. data/rdoc/RubyXL/CT_LineEndProperties.html +3 -3
  87. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +3 -3
  88. data/rdoc/RubyXL/CT_LineProperties.html +3 -3
  89. data/rdoc/RubyXL/CT_LineStyleList.html +3 -3
  90. data/rdoc/RubyXL/CT_LinearShadeProperties.html +3 -3
  91. data/rdoc/RubyXL/CT_LuminanceEffect.html +3 -3
  92. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +3 -3
  93. data/rdoc/RubyXL/CT_OuterShadowEffect.html +3 -3
  94. data/rdoc/RubyXL/CT_Path2D.html +3 -3
  95. data/rdoc/RubyXL/CT_Path2DArcTo.html +3 -3
  96. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +3 -3
  97. data/rdoc/RubyXL/CT_Path2DList.html +3 -3
  98. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +3 -3
  99. data/rdoc/RubyXL/CT_Path2DTo.html +3 -3
  100. data/rdoc/RubyXL/CT_PathShadeProperties.html +3 -3
  101. data/rdoc/RubyXL/CT_PatternFillProperties.html +3 -3
  102. data/rdoc/RubyXL/CT_Point3D.html +3 -3
  103. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +3 -3
  104. data/rdoc/RubyXL/CT_PresetColor.html +3 -3
  105. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +3 -3
  106. data/rdoc/RubyXL/CT_PresetShadowEffect.html +3 -3
  107. data/rdoc/RubyXL/CT_PresetTextShape.html +3 -3
  108. data/rdoc/RubyXL/CT_ReflectionEffect.html +3 -3
  109. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +3 -3
  110. data/rdoc/RubyXL/CT_RelativeRect.html +3 -3
  111. data/rdoc/RubyXL/CT_SRgbColor.html +3 -3
  112. data/rdoc/RubyXL/CT_ScRgbColor.html +3 -3
  113. data/rdoc/RubyXL/CT_Scene3D.html +3 -3
  114. data/rdoc/RubyXL/CT_SchemeColor.html +3 -3
  115. data/rdoc/RubyXL/CT_Shape3D.html +3 -3
  116. data/rdoc/RubyXL/CT_ShapeStyle.html +3 -3
  117. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +3 -3
  118. data/rdoc/RubyXL/CT_SphereCoords.html +3 -3
  119. data/rdoc/RubyXL/CT_StretchInfoProperties.html +3 -3
  120. data/rdoc/RubyXL/CT_StyleMatrix.html +3 -3
  121. data/rdoc/RubyXL/CT_StyleMatrixReference.html +3 -3
  122. data/rdoc/RubyXL/CT_SupplementalFont.html +3 -3
  123. data/rdoc/RubyXL/CT_SystemColor.html +3 -3
  124. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +3 -3
  125. data/rdoc/RubyXL/CT_TextBlipBullet.html +3 -3
  126. data/rdoc/RubyXL/CT_TextCharBullet.html +3 -3
  127. data/rdoc/RubyXL/CT_TextCharacterProperties.html +3 -3
  128. data/rdoc/RubyXL/CT_TextFont.html +3 -3
  129. data/rdoc/RubyXL/CT_TextListStyle.html +3 -3
  130. data/rdoc/RubyXL/CT_TextNormalAutofit.html +3 -3
  131. data/rdoc/RubyXL/CT_TextParagraphProperties.html +3 -3
  132. data/rdoc/RubyXL/CT_TextSpacing.html +3 -3
  133. data/rdoc/RubyXL/CT_TextTabStop.html +3 -3
  134. data/rdoc/RubyXL/CT_TextTabStopList.html +3 -3
  135. data/rdoc/RubyXL/CT_TileInfoProperties.html +3 -3
  136. data/rdoc/RubyXL/CT_TintEffect.html +3 -3
  137. data/rdoc/RubyXL/CT_Transform2D.html +3 -3
  138. data/rdoc/RubyXL/CT_TransformEffect.html +3 -3
  139. data/rdoc/RubyXL/CT_Vector3D.html +3 -3
  140. data/rdoc/RubyXL/CT_XYAdjustHandle.html +3 -3
  141. data/rdoc/RubyXL/CalculationChain.html +9 -7
  142. data/rdoc/RubyXL/CalculationChainCell.html +3 -3
  143. data/rdoc/RubyXL/CalculationProperties.html +3 -3
  144. data/rdoc/RubyXL/Cell.html +87 -59
  145. data/rdoc/RubyXL/CellConvenienceMethods.html +231 -159
  146. data/rdoc/RubyXL/CellExt.html +3 -3
  147. data/rdoc/RubyXL/CellSmartTag.html +3 -3
  148. data/rdoc/RubyXL/CellSmartTagProperty.html +3 -3
  149. data/rdoc/RubyXL/CellSmartTags.html +3 -3
  150. data/rdoc/RubyXL/CellStyle.html +3 -3
  151. data/rdoc/RubyXL/CellStyleXFs.html +9 -7
  152. data/rdoc/RubyXL/CellStyles.html +9 -7
  153. data/rdoc/RubyXL/CellValue.html +9 -7
  154. data/rdoc/RubyXL/CellWatch.html +3 -3
  155. data/rdoc/RubyXL/CellWatches.html +3 -3
  156. data/rdoc/RubyXL/CellXFs.html +9 -7
  157. data/rdoc/RubyXL/ChartColorsFile.html +3 -3
  158. data/rdoc/RubyXL/ChartFile.html +9 -7
  159. data/rdoc/RubyXL/ChartStyleFile.html +3 -3
  160. data/rdoc/RubyXL/ChartUserShapesFile.html +3 -3
  161. data/rdoc/RubyXL/Chartsheet.html +10 -8
  162. data/rdoc/RubyXL/ChartsheetPageSetup.html +3 -3
  163. data/rdoc/RubyXL/ChartsheetProperties.html +3 -3
  164. data/rdoc/RubyXL/ChartsheetProtection.html +3 -3
  165. data/rdoc/RubyXL/ChartsheetView.html +3 -3
  166. data/rdoc/RubyXL/ChartsheetViews.html +3 -3
  167. data/rdoc/RubyXL/Color.html +9 -7
  168. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +15 -11
  169. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +21 -15
  170. data/rdoc/RubyXL/ColorConvenienceClasses.html +3 -3
  171. data/rdoc/RubyXL/ColorConvenienceMethods.html +9 -7
  172. data/rdoc/RubyXL/ColorFilter.html +3 -3
  173. data/rdoc/RubyXL/ColorScale.html +3 -3
  174. data/rdoc/RubyXL/ColorSet.html +3 -3
  175. data/rdoc/RubyXL/Colors.html +3 -3
  176. data/rdoc/RubyXL/ColumnRange.html +21 -15
  177. data/rdoc/RubyXL/ColumnRanges.html +27 -19
  178. data/rdoc/RubyXL/Comment.html +3 -3
  179. data/rdoc/RubyXL/CommentList.html +3 -3
  180. data/rdoc/RubyXL/CommentsFile.html +9 -7
  181. data/rdoc/RubyXL/ConditionalFormatValue.html +3 -3
  182. data/rdoc/RubyXL/ConditionalFormatting.html +3 -3
  183. data/rdoc/RubyXL/ConditionalFormattingRule.html +3 -3
  184. data/rdoc/RubyXL/Connection.html +3 -3
  185. data/rdoc/RubyXL/ConnectionTable.html +3 -3
  186. data/rdoc/RubyXL/ConnectionTables.html +3 -3
  187. data/rdoc/RubyXL/ConnectionTextField.html +3 -3
  188. data/rdoc/RubyXL/ConnectionTextFields.html +3 -3
  189. data/rdoc/RubyXL/Connections.html +9 -7
  190. data/rdoc/RubyXL/ContentTypeDefault.html +3 -3
  191. data/rdoc/RubyXL/ContentTypeOverride.html +3 -3
  192. data/rdoc/RubyXL/ContentTypes.html +15 -11
  193. data/rdoc/RubyXL/ControlPropertiesFile.html +3 -3
  194. data/rdoc/RubyXL/CorePropertiesFile.html +57 -39
  195. data/rdoc/RubyXL/CustomColor.html +3 -3
  196. data/rdoc/RubyXL/CustomColorList.html +3 -3
  197. data/rdoc/RubyXL/CustomFilter.html +3 -3
  198. data/rdoc/RubyXL/CustomFilters.html +3 -3
  199. data/rdoc/RubyXL/CustomGeometry.html +3 -3
  200. data/rdoc/RubyXL/CustomProperties.html +3 -3
  201. data/rdoc/RubyXL/CustomPropertiesFile.html +3 -3
  202. data/rdoc/RubyXL/CustomProperty.html +3 -3
  203. data/rdoc/RubyXL/CustomPropertyFile.html +3 -3
  204. data/rdoc/RubyXL/CustomSheetView.html +3 -3
  205. data/rdoc/RubyXL/CustomSheetViews.html +3 -3
  206. data/rdoc/RubyXL/CustomWorkbookView.html +3 -3
  207. data/rdoc/RubyXL/CustomWorkbookViews.html +3 -3
  208. data/rdoc/RubyXL/CustomXMLFile.html +3 -3
  209. data/rdoc/RubyXL/DXF.html +3 -3
  210. data/rdoc/RubyXL/DXFs.html +3 -3
  211. data/rdoc/RubyXL/DataBar.html +3 -3
  212. data/rdoc/RubyXL/DataConsolidate.html +3 -3
  213. data/rdoc/RubyXL/DataConsolidationReference.html +3 -3
  214. data/rdoc/RubyXL/DataConsolidationReferences.html +3 -3
  215. data/rdoc/RubyXL/DataType.html +3 -3
  216. data/rdoc/RubyXL/DataValidation.html +3 -3
  217. data/rdoc/RubyXL/DataValidations.html +3 -3
  218. data/rdoc/RubyXL/DateGroupItem.html +3 -3
  219. data/rdoc/RubyXL/DefinedName.html +3 -3
  220. data/rdoc/RubyXL/DefinedNameExt.html +3 -3
  221. data/rdoc/RubyXL/DefinedNames.html +3 -3
  222. data/rdoc/RubyXL/DefinedNamesExt.html +3 -3
  223. data/rdoc/RubyXL/DocumentPropertiesFile.html +15 -11
  224. data/rdoc/RubyXL/DrawingFile.html +9 -7
  225. data/rdoc/RubyXL/DynamicFilter.html +3 -3
  226. data/rdoc/RubyXL/EmbeddedControl.html +3 -3
  227. data/rdoc/RubyXL/EmbeddedControls.html +3 -3
  228. data/rdoc/RubyXL/Extension.html +3 -3
  229. data/rdoc/RubyXL/ExtensionStorageArea.html +3 -3
  230. data/rdoc/RubyXL/Extents.html +3 -3
  231. data/rdoc/RubyXL/ExternalBook.html +3 -3
  232. data/rdoc/RubyXL/ExternalLinksFile.html +10 -8
  233. data/rdoc/RubyXL/ExternalReference.html +3 -3
  234. data/rdoc/RubyXL/ExternalReferences.html +3 -3
  235. data/rdoc/RubyXL/ExtraColorSchemeList.html +3 -3
  236. data/rdoc/RubyXL/FieldItem.html +3 -3
  237. data/rdoc/RubyXL/FileRecoveryProperties.html +3 -3
  238. data/rdoc/RubyXL/FileSharing.html +3 -3
  239. data/rdoc/RubyXL/FileVersion.html +3 -3
  240. data/rdoc/RubyXL/Fill.html +9 -7
  241. data/rdoc/RubyXL/Fills.html +9 -7
  242. data/rdoc/RubyXL/FilterContainer.html +3 -3
  243. data/rdoc/RubyXL/FloatNode.html +3 -3
  244. data/rdoc/RubyXL/FloatValue.html +3 -3
  245. data/rdoc/RubyXL/Font.html +9 -7
  246. data/rdoc/RubyXL/FontConvenienceMethods.html +87 -59
  247. data/rdoc/RubyXL/FontScheme.html +3 -3
  248. data/rdoc/RubyXL/Fonts.html +9 -7
  249. data/rdoc/RubyXL/Formula.html +3 -3
  250. data/rdoc/RubyXL/FunctionGroup.html +3 -3
  251. data/rdoc/RubyXL/FunctionGroups.html +3 -3
  252. data/rdoc/RubyXL/GenericStorageObject.html +21 -15
  253. data/rdoc/RubyXL/GradientFill.html +3 -3
  254. data/rdoc/RubyXL/HeaderFooterSettings.html +3 -3
  255. data/rdoc/RubyXL/Hyperlink.html +3 -3
  256. data/rdoc/RubyXL/HyperlinkRelFile.html +3 -3
  257. data/rdoc/RubyXL/Hyperlinks.html +3 -3
  258. data/rdoc/RubyXL/IconFilter.html +3 -3
  259. data/rdoc/RubyXL/IconSet.html +3 -3
  260. data/rdoc/RubyXL/IgnoredError.html +3 -3
  261. data/rdoc/RubyXL/IgnoredErrors.html +3 -3
  262. data/rdoc/RubyXL/IndexedColors.html +3 -3
  263. data/rdoc/RubyXL/InputCells.html +3 -3
  264. data/rdoc/RubyXL/IntegerNode.html +3 -3
  265. data/rdoc/RubyXL/IntegerValue.html +3 -3
  266. data/rdoc/RubyXL/LegacyCell.html +9 -7
  267. data/rdoc/RubyXL/LegacyWorksheet.html +33 -23
  268. data/rdoc/RubyXL/MRUColors.html +3 -3
  269. data/rdoc/RubyXL/MacrosFile.html +3 -3
  270. data/rdoc/RubyXL/MergedCell.html +3 -3
  271. data/rdoc/RubyXL/MergedCells.html +3 -3
  272. data/rdoc/RubyXL/NumFmt.html +3 -3
  273. data/rdoc/RubyXL/NumberFormat.html +9 -7
  274. data/rdoc/RubyXL/NumberFormats.html +9 -7
  275. data/rdoc/RubyXL/OLEObject.html +3 -3
  276. data/rdoc/RubyXL/OLEObjectFile.html +3 -3
  277. data/rdoc/RubyXL/OLEObjects.html +3 -3
  278. data/rdoc/RubyXL/OLESize.html +3 -3
  279. data/rdoc/RubyXL/OOXMLContainerObject.html +39 -27
  280. data/rdoc/RubyXL/OOXMLIgnored.html +15 -11
  281. data/rdoc/RubyXL/OOXMLObject.html +3 -3
  282. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +39 -27
  283. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +51 -35
  284. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +63 -43
  285. data/rdoc/RubyXL/OOXMLTopLevelObject.html +33 -23
  286. data/rdoc/RubyXL/OdbcOleDbProperties.html +3 -3
  287. data/rdoc/RubyXL/Offset.html +3 -3
  288. data/rdoc/RubyXL/OlapProperties.html +3 -3
  289. data/rdoc/RubyXL/OleItem.html +3 -3
  290. data/rdoc/RubyXL/OleItems.html +3 -3
  291. data/rdoc/RubyXL/OleLink.html +3 -3
  292. data/rdoc/RubyXL/OutlineProperties.html +3 -3
  293. data/rdoc/RubyXL/PageMargins.html +3 -3
  294. data/rdoc/RubyXL/PageSetup.html +3 -3
  295. data/rdoc/RubyXL/PageSetupProperties.html +3 -3
  296. data/rdoc/RubyXL/Pane.html +3 -3
  297. data/rdoc/RubyXL/Parser.html +15 -11
  298. data/rdoc/RubyXL/PatternFill.html +3 -3
  299. data/rdoc/RubyXL/PersonMetadata.html +108 -0
  300. data/rdoc/RubyXL/PhoneticProperties.html +3 -3
  301. data/rdoc/RubyXL/PhoneticRun.html +3 -3
  302. data/rdoc/RubyXL/PivotArea.html +3 -3
  303. data/rdoc/RubyXL/PivotCache.html +3 -3
  304. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +3 -3
  305. data/rdoc/RubyXL/PivotCacheRecordsFile.html +3 -3
  306. data/rdoc/RubyXL/PivotCaches.html +3 -3
  307. data/rdoc/RubyXL/PivotReference.html +3 -3
  308. data/rdoc/RubyXL/PivotReferences.html +3 -3
  309. data/rdoc/RubyXL/PivotTableFile.html +3 -3
  310. data/rdoc/RubyXL/PivotTableSelection.html +3 -3
  311. data/rdoc/RubyXL/PresetGeometry.html +3 -3
  312. data/rdoc/RubyXL/PrintOptions.html +3 -3
  313. data/rdoc/RubyXL/PrinterSettingsFile.html +3 -3
  314. data/rdoc/RubyXL/ProtectedRange.html +3 -3
  315. data/rdoc/RubyXL/ProtectedRanges.html +3 -3
  316. data/rdoc/RubyXL/Protection.html +3 -3
  317. data/rdoc/RubyXL/QueryParameter.html +3 -3
  318. data/rdoc/RubyXL/QueryParameters.html +3 -3
  319. data/rdoc/RubyXL/QueryTable.html +9 -7
  320. data/rdoc/RubyXL/QueryTableDeletedField.html +3 -3
  321. data/rdoc/RubyXL/QueryTableDeletedFields.html +3 -3
  322. data/rdoc/RubyXL/QueryTableField.html +3 -3
  323. data/rdoc/RubyXL/QueryTableFields.html +3 -3
  324. data/rdoc/RubyXL/QueryTableRefresh.html +3 -3
  325. data/rdoc/RubyXL/RID.html +3 -3
  326. data/rdoc/RubyXL/RawOOXML.html +15 -11
  327. data/rdoc/RubyXL/Reference.html +105 -73
  328. data/rdoc/RubyXL/Relationship.html +3 -3
  329. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +9 -7
  330. data/rdoc/RubyXL/RelationshipSupport.html +39 -27
  331. data/rdoc/RubyXL/RevisionPointer.html +3 -3
  332. data/rdoc/RubyXL/RichText.html +9 -7
  333. data/rdoc/RubyXL/RichTextRun.html +9 -7
  334. data/rdoc/RubyXL/Row.html +57 -39
  335. data/rdoc/RubyXL/RowExt.html +3 -3
  336. data/rdoc/RubyXL/RunProperties.html +3 -3
  337. data/rdoc/RubyXL/Scenario.html +3 -3
  338. data/rdoc/RubyXL/Scenarios.html +3 -3
  339. data/rdoc/RubyXL/Selection.html +9 -7
  340. data/rdoc/RubyXL/ShapeGuide.html +3 -3
  341. data/rdoc/RubyXL/ShapeTextRectangle.html +3 -3
  342. data/rdoc/RubyXL/SharedStringsTable.html +45 -31
  343. data/rdoc/RubyXL/Sheet.html +3 -3
  344. data/rdoc/RubyXL/SheetCalculationProperties.html +3 -3
  345. data/rdoc/RubyXL/SheetData.html +15 -11
  346. data/rdoc/RubyXL/SheetDataExt.html +3 -3
  347. data/rdoc/RubyXL/SheetDataSet.html +3 -3
  348. data/rdoc/RubyXL/SheetMetadata.html +3 -3
  349. data/rdoc/RubyXL/SheetName.html +3 -3
  350. data/rdoc/RubyXL/SheetNames.html +3 -3
  351. data/rdoc/RubyXL/Sheets.html +3 -3
  352. data/rdoc/RubyXL/SlicerCacheFile.html +3 -3
  353. data/rdoc/RubyXL/SlicerFile.html +3 -3
  354. data/rdoc/RubyXL/SmartTagProperties.html +3 -3
  355. data/rdoc/RubyXL/SmartTagType.html +3 -3
  356. data/rdoc/RubyXL/SmartTagTypes.html +3 -3
  357. data/rdoc/RubyXL/SmartTags.html +3 -3
  358. data/rdoc/RubyXL/SortCondition.html +3 -3
  359. data/rdoc/RubyXL/SortState.html +3 -3
  360. data/rdoc/RubyXL/Sqref.html +17 -13
  361. data/rdoc/RubyXL/Stop.html +3 -3
  362. data/rdoc/RubyXL/StringNode.html +3 -3
  363. data/rdoc/RubyXL/StringNodeW3C.html +15 -11
  364. data/rdoc/RubyXL/StringValue.html +3 -3
  365. data/rdoc/RubyXL/Stylesheet.html +33 -23
  366. data/rdoc/RubyXL/TableFile.html +3 -3
  367. data/rdoc/RubyXL/TableParts.html +3 -3
  368. data/rdoc/RubyXL/TableStyle.html +3 -3
  369. data/rdoc/RubyXL/TableStyles.html +3 -3
  370. data/rdoc/RubyXL/Text.html +15 -11
  371. data/rdoc/RubyXL/TextImportSettings.html +3 -3
  372. data/rdoc/RubyXL/Theme.html +21 -15
  373. data/rdoc/RubyXL/ThemeElements.html +3 -3
  374. data/rdoc/RubyXL/ThumbnailFile.html +3 -3
  375. data/rdoc/RubyXL/Top10.html +3 -3
  376. data/rdoc/RubyXL/VMLDrawingFile.html +3 -3
  377. data/rdoc/RubyXL/Variant.html +3 -3
  378. data/rdoc/RubyXL/Vector.html +9 -7
  379. data/rdoc/RubyXL/VectorValue.html +3 -3
  380. data/rdoc/RubyXL/VisualProperties.html +3 -3
  381. data/rdoc/RubyXL/WebPublishObject.html +3 -3
  382. data/rdoc/RubyXL/WebPublishObjects.html +3 -3
  383. data/rdoc/RubyXL/WebPublishingItem.html +3 -3
  384. data/rdoc/RubyXL/WebPublishingItems.html +3 -3
  385. data/rdoc/RubyXL/WebPublishingProperties.html +3 -3
  386. data/rdoc/RubyXL/WebQueryProperties.html +3 -3
  387. data/rdoc/RubyXL/Workbook.html +172 -116
  388. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +111 -75
  389. data/rdoc/RubyXL/WorkbookProperties.html +3 -3
  390. data/rdoc/RubyXL/WorkbookProtection.html +3 -3
  391. data/rdoc/RubyXL/WorkbookRoot.html +33 -23
  392. data/rdoc/RubyXL/WorkbookView.html +3 -3
  393. data/rdoc/RubyXL/WorkbookViews.html +3 -3
  394. data/rdoc/RubyXL/Worksheet.html +45 -31
  395. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +418 -280
  396. data/rdoc/RubyXL/WorksheetDimensions.html +3 -3
  397. data/rdoc/RubyXL/WorksheetFormatProperties.html +3 -3
  398. data/rdoc/RubyXL/WorksheetProperties.html +3 -3
  399. data/rdoc/RubyXL/WorksheetProtection.html +3 -3
  400. data/rdoc/RubyXL/WorksheetView.html +3 -3
  401. data/rdoc/RubyXL/WorksheetViews.html +3 -3
  402. data/rdoc/RubyXL/XF.html +3 -3
  403. data/rdoc/RubyXL.html +9 -7
  404. data/rdoc/created.rid +35 -35
  405. data/rdoc/css/rdoc.css +55 -7
  406. data/rdoc/index.html +395 -388
  407. data/rdoc/js/darkfish.js +14 -1
  408. data/rdoc/js/navigation.js +8 -8
  409. data/rdoc/js/navigation.js.gz +0 -0
  410. data/rdoc/js/search.js +4 -4
  411. data/rdoc/js/search_index.js +1 -1
  412. data/rdoc/js/search_index.js.gz +0 -0
  413. data/rdoc/js/searcher.js.gz +0 -0
  414. data/rdoc/table_of_contents.html +9 -3
  415. data/rubyXL.gemspec +10 -4
  416. data/spec/lib/cell_spec.rb +2 -2
  417. data/spec/lib/color_spec.rb +1 -1
  418. data/spec/lib/parser_spec.rb +3 -2
  419. data/spec/lib/reference_spec.rb +35 -6
  420. data/spec/lib/rgb_color_spec.rb +1 -1
  421. data/spec/lib/stylesheet_spec.rb +7 -5
  422. data/spec/lib/workbook_spec.rb +4 -4
  423. data/spec/lib/worksheet_spec.rb +2 -2
  424. metadata +21 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d174a06e6a9c7cb4c88d59e54381b4f2a110b9781bf7adab38f787cb99cbd2e8
4
- data.tar.gz: d0114d7bc184ffc82bc3143ae2f8b843fd1c980299fa302e78211b588b1e23f6
3
+ metadata.gz: b11583265e2c20fd90e4edea3102a50467957be9c7934dc80bd1d33b029e030c
4
+ data.tar.gz: 390623df463b75a35b0fa626052cb6e330779763b653eecc95169ddf97c8b6c7
5
5
  SHA512:
6
- metadata.gz: 7e9dd0dceb2fcd27376ff8c97440f98d7e7bc6d37d68dd514ff4d3c629d2ef18acc7c9c585afe840657a0805c867e4884ab3510ab0d0f08bf489df56bf68ea50
7
- data.tar.gz: '096d1ef36c7025887d9b07cf511cc45b39a0965b3fe2831627899ee25b1cb22e28f49f770c2b4dea64f3ad01006ce88e9ee0ff2ba391d66140989a1211b98421'
6
+ metadata.gz: b0c34a5bed00017b79286ac01c03d8318fe847bd01e19d7456f625e567cf76a763fb02039f7a5215193e57dcefe6b107de5bfbbf75e29c0915447bb650896d38
7
+ data.tar.gz: 994c6df51513c61da7781d9a35fe68ba7ae274437cda4ce6d195a5f8e447f33f34d9fe9599c7688067c5d9fa94cfbb55879005519fcc9bf2ddc13c23b8b7c09c
data/.rubocop.yml ADDED
@@ -0,0 +1,96 @@
1
+ #inherit_from: .rubocop_todo.yml
2
+
3
+ #require:
4
+ # - rubocop-rspec
5
+
6
+ AllCops:
7
+ NewCops: enable
8
+ SuggestExtensions: false
9
+ TargetRubyVersion: 2.6
10
+ DisplayCopNames: true
11
+ DisplayStyleGuide: true
12
+ Exclude:
13
+ - test/**/*
14
+ - tmp/*
15
+ - vendor/**/*
16
+ - Gemfile
17
+ - rubyXL.gemspec
18
+
19
+ Style/BlockDelimiters:
20
+ Enabled: false
21
+
22
+ Style/HashSyntax:
23
+ Enabled: false
24
+
25
+ Style/MultilineIfThen:
26
+ Enabled: false
27
+
28
+ Style/ParenthesesAroundCondition:
29
+ Enabled: false
30
+
31
+ Style/MultilineWhenThen:
32
+ Enabled: false
33
+
34
+ Style/RedundantPercentQ:
35
+ Enabled: false
36
+
37
+ Style/PercentLiteralDelimiters:
38
+ Enabled: false
39
+
40
+ Style/NumericLiterals:
41
+ Enabled: false
42
+
43
+ Style/ExponentialNotation:
44
+ Enabled: false
45
+
46
+ Layout/SpaceInsideArrayLiteralBrackets:
47
+ EnforcedStyle: space
48
+ Enabled: false
49
+
50
+ Layout/SpaceBeforeBlockBraces:
51
+ Enabled: false
52
+
53
+ Layout/EmptyLineAfterGuardClause:
54
+ Enabled: false
55
+
56
+ Naming/MethodParameterName:
57
+ Enabled: false
58
+
59
+ Naming/ClassAndModuleCamelCase:
60
+ Enabled: false
61
+
62
+ Naming/ConstantName:
63
+ Enabled: false
64
+
65
+
66
+
67
+ Layout/HashAlignment:
68
+ EnforcedHashRocketStyle: table
69
+
70
+ Layout/SpaceInsidePercentLiteralDelimiters:
71
+ Enabled: false
72
+
73
+
74
+
75
+ Metrics/BlockLength:
76
+ Enabled: false
77
+
78
+ Metrics/ClassLength:
79
+ Enabled: false
80
+
81
+ Metrics/MethodLength:
82
+ Enabled: false
83
+
84
+
85
+
86
+ Metrics/PerceivedComplexity:
87
+ Enabled: false
88
+
89
+ Metrics/ParameterLists:
90
+ Enabled: false
91
+
92
+ Metrics/CyclomaticComplexity:
93
+ Enabled: false
94
+
95
+ Metrics/ModuleLength:
96
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # v3.4.25 (May 19, 2022)
2
+
3
+ * Improve code style and consistently (@weshatheleopard)
4
+ * Update `Gemfile.lock`, dependency versions used when developing the gem (@weshatheleopard)
5
+
6
+ # v3.4.24 (May 16, 2022)
7
+
8
+ * Add `Cell#add_hyperlink` for adding a hyperlink to a cell (@weshatheleopard)
9
+ * Add `Reference#valid?` for checking if a cell reference is valid (@weshatheleopard)
10
+ * Add `Worksheet#cell_at` for finding a cell by its Excel-style reference (@weshatheleopard)
11
+ * Prevent creation of sheets with reserved names (specifically, `History`) (@weshatheleopard)
12
+ * Update `Gemfile.lock`, dependency versions used when developing the gem (@weshatheleopard)
data/Gemfile CHANGED
@@ -15,4 +15,6 @@ group :development, :test do
15
15
  # gem 'stackprof'
16
16
  gem 'ruby-prof'
17
17
  gem 'rspec_junit_formatter'
18
+
19
+ gem 'rubocop'
18
20
  end
data/Gemfile.lock CHANGED
@@ -1,14 +1,16 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.8.0)
5
- public_suffix (>= 2.0.2, < 5.0)
4
+ addressable (2.8.6)
5
+ public_suffix (>= 2.0.2, < 6.0)
6
+ ast (2.4.2)
7
+ base64 (0.2.0)
6
8
  builder (3.2.4)
7
9
  descendants_tracker (0.0.4)
8
10
  thread_safe (~> 0.3, >= 0.3.1)
9
- diff-lcs (1.5.0)
11
+ diff-lcs (1.5.1)
10
12
  docile (1.4.0)
11
- faraday (1.10.0)
13
+ faraday (1.10.3)
12
14
  faraday-em_http (~> 1.0)
13
15
  faraday-em_synchrony (~> 1.0)
14
16
  faraday-excon (~> 1.1)
@@ -24,14 +26,15 @@ GEM
24
26
  faraday-em_synchrony (1.0.0)
25
27
  faraday-excon (1.1.0)
26
28
  faraday-httpclient (1.0.1)
27
- faraday-multipart (1.0.3)
28
- multipart-post (>= 1.2, < 3)
29
+ faraday-multipart (1.0.4)
30
+ multipart-post (~> 2)
29
31
  faraday-net_http (1.0.1)
30
32
  faraday-net_http_persistent (1.2.0)
31
33
  faraday-patron (1.0.0)
32
34
  faraday-rack (1.0.0)
33
35
  faraday-retry (1.0.3)
34
- git (1.11.0)
36
+ git (1.19.1)
37
+ addressable (~> 2.8)
35
38
  rchardet (~> 1.8)
36
39
  github_api (0.19.0)
37
40
  addressable (~> 2.4)
@@ -40,7 +43,8 @@ GEM
40
43
  hashie (~> 3.5, >= 3.5.2)
41
44
  oauth2 (~> 1.0)
42
45
  hashie (3.6.0)
43
- highline (2.0.3)
46
+ highline (2.1.0)
47
+ json (2.7.1)
44
48
  juwelier (2.4.9)
45
49
  builder
46
50
  bundler
@@ -53,58 +57,82 @@ GEM
53
57
  rake
54
58
  rdoc
55
59
  semver2
56
- jwt (2.3.0)
60
+ jwt (2.8.1)
61
+ base64
57
62
  kamelcase (0.0.2)
58
63
  semver2 (~> 3)
59
- mini_portile2 (2.8.0)
64
+ language_server-protocol (3.17.0.3)
65
+ mini_portile2 (2.8.5)
60
66
  multi_json (1.15.0)
61
67
  multi_xml (0.6.0)
62
- multipart-post (2.1.1)
63
- nokogiri (1.13.4)
64
- mini_portile2 (~> 2.8.0)
68
+ multipart-post (2.4.0)
69
+ nokogiri (1.15.6)
70
+ mini_portile2 (~> 2.8.2)
65
71
  racc (~> 1.4)
66
- oauth2 (1.4.9)
72
+ oauth2 (1.4.11)
67
73
  faraday (>= 0.17.3, < 3.0)
68
74
  jwt (>= 1.0, < 3.0)
69
75
  multi_json (~> 1.3)
70
76
  multi_xml (~> 0.5)
71
- rack (>= 1.2, < 3)
72
- psych (4.0.3)
77
+ rack (>= 1.2, < 4)
78
+ parallel (1.24.0)
79
+ parser (3.3.0.5)
80
+ ast (~> 2.4.1)
81
+ racc
82
+ psych (5.1.2)
73
83
  stringio
74
- public_suffix (4.0.7)
75
- racc (1.6.0)
76
- rack (2.2.3)
77
- rake (13.0.6)
84
+ public_suffix (5.0.4)
85
+ racc (1.7.3)
86
+ rack (3.0.10)
87
+ rainbow (3.1.1)
88
+ rake (13.1.0)
78
89
  rchardet (1.8.0)
79
- rdoc (6.4.0)
90
+ rdoc (6.6.3.1)
80
91
  psych (>= 4.0.0)
81
- rspec (3.11.0)
82
- rspec-core (~> 3.11.0)
83
- rspec-expectations (~> 3.11.0)
84
- rspec-mocks (~> 3.11.0)
85
- rspec-core (3.11.0)
86
- rspec-support (~> 3.11.0)
87
- rspec-expectations (3.11.0)
92
+ regexp_parser (2.9.0)
93
+ rexml (3.2.6)
94
+ rspec (3.13.0)
95
+ rspec-core (~> 3.13.0)
96
+ rspec-expectations (~> 3.13.0)
97
+ rspec-mocks (~> 3.13.0)
98
+ rspec-core (3.13.0)
99
+ rspec-support (~> 3.13.0)
100
+ rspec-expectations (3.13.0)
88
101
  diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.11.0)
90
- rspec-mocks (3.11.1)
102
+ rspec-support (~> 3.13.0)
103
+ rspec-mocks (3.13.0)
91
104
  diff-lcs (>= 1.2.0, < 2.0)
92
- rspec-support (~> 3.11.0)
93
- rspec-support (3.11.0)
94
- rspec_junit_formatter (0.5.1)
105
+ rspec-support (~> 3.13.0)
106
+ rspec-support (3.13.1)
107
+ rspec_junit_formatter (0.6.0)
95
108
  rspec-core (>= 2, < 4, != 2.12.0)
96
- ruby-prof (1.4.3)
109
+ rubocop (1.62.1)
110
+ json (~> 2.3)
111
+ language_server-protocol (>= 3.17.0)
112
+ parallel (~> 1.10)
113
+ parser (>= 3.3.0.2)
114
+ rainbow (>= 2.2.2, < 4.0)
115
+ regexp_parser (>= 1.8, < 3.0)
116
+ rexml (>= 3.2.5, < 4.0)
117
+ rubocop-ast (>= 1.31.1, < 2.0)
118
+ ruby-progressbar (~> 1.7)
119
+ unicode-display_width (>= 2.4.0, < 3.0)
120
+ rubocop-ast (1.31.2)
121
+ parser (>= 3.3.0.4)
122
+ ruby-prof (1.6.3)
123
+ ruby-progressbar (1.13.0)
97
124
  ruby2_keywords (0.0.5)
98
125
  rubyzip (2.3.2)
99
126
  semver2 (3.4.2)
100
- simplecov (0.21.2)
127
+ simplecov (0.22.0)
101
128
  docile (~> 1.1)
102
129
  simplecov-html (~> 0.11)
103
130
  simplecov_json_formatter (~> 0.1)
104
131
  simplecov-html (0.12.3)
105
132
  simplecov_json_formatter (0.1.4)
106
- stringio (3.0.1)
133
+ stringio (3.1.0)
107
134
  thread_safe (0.3.6)
135
+ unicode-display_width (2.5.0)
108
136
 
109
137
  PLATFORMS
110
138
  ruby
@@ -116,9 +144,10 @@ DEPENDENCIES
116
144
  rake
117
145
  rspec
118
146
  rspec_junit_formatter
147
+ rubocop
119
148
  ruby-prof
120
149
  rubyzip (>= 1.3.0)
121
150
  simplecov
122
151
 
123
152
  BUNDLED WITH
124
- 2.3.5
153
+ 2.4.21
data/README.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = rubyXL
2
- {<img src="https://badge.fury.io/rb/rubyXL.svg" alt="Gem Version" />}[http://badge.fury.io/rb/rubyXL]
3
- {<img src="https://codeclimate.com/github/weshatheleopard/rubyXL.png" alt="Code Climate" />}[https://codeclimate.com/github/weshatheleopard/rubyXL]
4
- {<img src="https://circleci.com/gh/weshatheleopard/rubyXL.svg?style=svg" alt="CircleCI" />}[https://circleci.com/gh/weshatheleopard/rubyXL]
2
+ {rdoc-image:https://badge.fury.io/rb/rubyXL.svg}[http://badge.fury.io/rb/rubyXL]
3
+ {rdoc-image:https://codeclimate.com/github/weshatheleopard/rubyXL.png}[https://codeclimate.com/github/weshatheleopard/rubyXL]
4
+ {rdoc-image:https://circleci.com/gh/weshatheleopard/rubyXL.svg?style=svg}[https://circleci.com/gh/weshatheleopard/rubyXL]
5
5
 
6
6
  This gem supports operating on +xlsx+ files (Open XML format). While it is capable
7
7
  of properly parsing the entire OOXML structure, its current main emphasis is on
@@ -59,6 +59,10 @@ Please note that row is a _sparse_ array of cells. Your code *must* expect that
59
59
  cell.value # Returns a properly converted value in the cell (if the file claims that the cell
60
60
  # is holding a number, returns a respective Integer or Float, and so on).
61
61
 
62
+ Or, if you prefer Excel-style references (single-cell only!)
63
+
64
+ cell = worksheet.cell_at('B11')
65
+
62
66
  ==== Wrappers for accessing Cell properties
63
67
  cell = workbook[0][0][0]
64
68
  cell.is_struckthrough # Returns +true+ if the cell is struckthrough, other boolean properties have same syntax
data/Rakefile CHANGED
@@ -1,13 +1,11 @@
1
- # encoding: utf-8
2
-
3
1
  require 'rubygems'
4
2
 
5
3
  require 'bundler'
6
4
  begin
7
5
  Bundler.setup(:default, :development)
8
6
  rescue Bundler::BundlerError => e
9
- $stderr.puts e.message
10
- $stderr.puts 'Run `bundle install` to install missing gems'
7
+ warn e.message
8
+ warn 'Run `bundle install` to install missing gems'
11
9
  exit e.status_code
12
10
  end
13
11
 
@@ -17,8 +15,8 @@ Juwelier::Tasks.new do |gem|
17
15
  gem.name = 'rubyXL'
18
16
  gem.homepage = 'http://github.com/gilt/rubyXL'
19
17
  gem.license = 'MIT'
20
- gem.summary = %Q{rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents}
21
- gem.description = %Q{rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents}
18
+ gem.summary = %q{rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents}
19
+ gem.description = %q{rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents}
22
20
  gem.email = 'bhagwat.vivek@gmail.com'
23
21
  gem.authors = ['Vivek Bhagwat', 'Wesha']
24
22
  # gem.required_ruby_version = '>2.1'
@@ -53,7 +51,7 @@ task :stackprof do
53
51
  require 'benchmark'
54
52
  require 'stackprof'
55
53
 
56
- $:.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
54
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
57
55
  require './lib/rubyXL'
58
56
 
59
57
  spreadsheets = Dir.glob(File.join('test', 'input', '*.xls?')).sort!
@@ -80,7 +78,7 @@ task :rubyprof do
80
78
  require 'benchmark'
81
79
  require 'ruby-prof'
82
80
 
83
- $:.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
81
+ $LOAD_PATH.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
84
82
  require './lib/rubyXL'
85
83
 
86
84
  spreadsheets = Dir.glob(File.join('test', 'input', '*.xls?')).sort!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.4.24
1
+ 3.4.26
data/lib/rubyXL/cell.rb CHANGED
@@ -6,7 +6,7 @@ module RubyXL
6
6
 
7
7
  private
8
8
 
9
- def validate_workbook()
9
+ def validate_workbook
10
10
  unless workbook.nil? || workbook.worksheets.nil?
11
11
  workbook.worksheets.each { |sheet|
12
12
  unless sheet.nil? || sheet.sheet_data.nil? || sheet.sheet_data[row].nil?
@@ -19,7 +19,7 @@ module RubyXL
19
19
  raise "This cell #{self} is not in workbook #{workbook}"
20
20
  end
21
21
 
22
- def validate_worksheet()
22
+ def validate_worksheet
23
23
  return if @worksheet && @worksheet[row] && @worksheet[row][column].equal?(self)
24
24
  raise "Cell #{self} is not in worksheet #{worksheet}"
25
25
  end
@@ -79,61 +79,61 @@ module RubyXL
79
79
  self.style_index = workbook.modify_border_color(self.style_index, direction, color)
80
80
  end
81
81
 
82
- def is_italicized()
82
+ def is_italicized
83
83
  validate_worksheet
84
84
  get_cell_font.is_italic
85
85
  end
86
86
 
87
- def is_bolded()
87
+ def is_bolded
88
88
  validate_worksheet
89
89
  get_cell_font.is_bold
90
90
  end
91
91
 
92
- def is_underlined()
92
+ def is_underlined
93
93
  validate_worksheet
94
94
  get_cell_font.is_underlined
95
95
  end
96
96
 
97
- def is_struckthrough()
97
+ def is_struckthrough
98
98
  validate_worksheet
99
99
  get_cell_font.is_strikethrough
100
100
  end
101
101
 
102
- def font_name()
102
+ def font_name
103
103
  validate_worksheet
104
104
  get_cell_font.get_name
105
105
  end
106
106
 
107
- def font_size()
107
+ def font_size
108
108
  validate_worksheet
109
109
  get_cell_font.get_size
110
110
  end
111
111
 
112
- def font_color()
112
+ def font_color
113
113
  validate_worksheet
114
114
  get_cell_font.get_rgb_color || '000000'
115
115
  end
116
116
 
117
- def fill_color()
117
+ def fill_color
118
118
  validate_worksheet
119
119
  return workbook.get_fill_color(get_cell_xf)
120
120
  end
121
121
 
122
- def horizontal_alignment()
122
+ def horizontal_alignment
123
123
  validate_worksheet
124
124
  xf_obj = get_cell_xf
125
125
  return nil if xf_obj.alignment.nil?
126
126
  xf_obj.alignment.horizontal
127
127
  end
128
128
 
129
- def vertical_alignment()
129
+ def vertical_alignment
130
130
  validate_worksheet
131
131
  xf_obj = get_cell_xf
132
132
  return nil if xf_obj.alignment.nil?
133
133
  xf_obj.alignment.vertical
134
134
  end
135
135
 
136
- def text_wrap()
136
+ def text_wrap
137
137
  validate_worksheet
138
138
  xf_obj = get_cell_xf
139
139
  return nil if xf_obj.alignment.nil?
@@ -147,7 +147,7 @@ module RubyXL
147
147
  xf_obj.alignment.text_rotation
148
148
  end
149
149
 
150
- def text_indent()
150
+ def text_indent
151
151
  validate_worksheet
152
152
  xf_obj = get_cell_xf
153
153
  return nil if xf_obj.alignment.nil?
@@ -266,12 +266,10 @@ module RubyXL
266
266
  worksheet.hyperlinks << hyperlink
267
267
  end
268
268
 
269
- =begin
270
- def add_shared_string(str)
271
- self.datatype = RubyXL::DataType::SHARED_STRING
272
- self.raw_value = @workbook.shared_strings_container.add(str)
273
- end
274
- =end
269
+ # def add_shared_string(str)
270
+ # self.datatype = RubyXL::DataType::SHARED_STRING
271
+ # self.raw_value = @workbook.shared_strings_container.add(str)
272
+ # end
275
273
  end
276
274
 
277
275
  RubyXL::Cell.send(:include, RubyXL::CellConvenienceMethods) # ruby 2.1 compat
@@ -701,7 +701,7 @@ module RubyXL
701
701
  # "Any double quote characters in the value should be escaped with another double quote.
702
702
  # If the value does not contain a comma, newline or double quote, then the String value should be returned unchanged.
703
703
  # If the value contains a comma, newline or double quote, then the String value should be returned enclosed in double quotes."
704
- expr = '"' + list_arr.collect{|str| str.gsub('"', '""')}.join(',') + '"'
704
+ expr = '"' + list_arr.collect{ |str| str.gsub('"', '""') }.join(',') + '"'
705
705
  self.data_validations ||= RubyXL::DataValidations.new
706
706
  self.data_validations <<
707
707
  RubyXL::DataValidation.new({:sqref => RubyXL::Reference.new(ref),
@@ -62,8 +62,7 @@ module RubyXL
62
62
  include RubyXL::RelationshipSupport
63
63
  define_relationship(RubyXL::DrawingFile)
64
64
 
65
- attr_accessor :state, :rels
66
- attr_accessor :workbook, :sheet_name, :sheet_id
65
+ attr_accessor :state, :rels, :workbook, :sheet_name, :sheet_id
67
66
 
68
67
  define_child_node(RubyXL::ChartsheetProperties)
69
68
  define_child_node(RubyXL::ChartsheetViews)
@@ -55,11 +55,19 @@ module RubyXL
55
55
  define_element_name 'sheetDataSet'
56
56
  end
57
57
 
58
+ # https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/452524b4-b22f-45a9-aac1-81fdd1f1db6c
59
+ class AlternateUrls < OOXMLObject
60
+ define_attribute(:absoluteUrl, :string, :required => false)
61
+ define_attribute(:relativeUrl, :string, :required => false)
62
+ define_element_name 'xxl21:alternateUrls'
63
+ end
64
+
58
65
  # http://www.datypic.com/sc/ooxml/e-ssml_externalBook-1.html
59
66
  class ExternalBook < OOXMLObject
60
67
  define_child_node(RubyXL::SheetNames)
61
68
  define_child_node(RubyXL::DefinedNamesExt)
62
69
  define_child_node(RubyXL::SheetDataSet)
70
+ define_child_node(RubyXL::AlternateUrls)
63
71
  define_relationship(:required => true)
64
72
  define_element_name 'externalBook'
65
73
  end
@@ -8,6 +8,7 @@ module RubyXL
8
8
  # RubyXL::Reference.new(row, col)
9
9
  # RubyXL::Reference.new(row_from, row_to, col_from, col_to)
10
10
  # RubyXL::Reference.new(reference_string)
11
+ # RubyXL::Reference.new(row_from:, row_to:, col_from:, col_to:)
11
12
  def initialize(*params)
12
13
  row_from = row_to = col_from = col_to = nil
13
14
 
@@ -15,10 +16,16 @@ module RubyXL
15
16
  when 4 then row_from, row_to, col_from, col_to = params
16
17
  when 2 then row_from, col_from = params
17
18
  when 1 then
18
- raise ArgumentError.new("invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
19
- from, to = params[0].split(':')
20
- row_from, col_from = self.class.ref2ind(from)
21
- row_to, col_to = self.class.ref2ind(to) unless to.nil?
19
+ case params.first
20
+ when Hash then
21
+ row_from, row_to, col_from, col_to = params.first.fetch_values(:row_from, :row_to, :col_from, :col_to)
22
+ when String then
23
+ from, to = params[0].split(':')
24
+ row_from, col_from = self.class.ref2ind(from)
25
+ row_to, col_to = self.class.ref2ind(to) unless to.nil?
26
+ else
27
+ raise ArgumentError.new("invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
28
+ end
22
29
  end
23
30
 
24
31
  @row_range = Range.new(row_from || 0, row_to || row_from || ROW_MAX)
@@ -169,6 +169,11 @@ module RubyXL
169
169
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata'.freeze
170
170
  end
171
171
 
172
+ class PersonMetadata < GenericStorageObject
173
+ CONTENT_TYPE = 'application/vnd.ms-excel.person+xml'.freeze
174
+ REL_TYPE = 'http://schemas.microsoft.com/office/2017/10/relationships/person'.freeze
175
+ end
176
+
172
177
  class ActiveX < GenericStorageObject
173
178
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/control'.freeze
174
179
 
@@ -334,6 +334,7 @@ module RubyXL
334
334
  define_relationship(RubyXL::CustomXMLFile)
335
335
  define_relationship(RubyXL::MacrosFile, :macros)
336
336
  define_relationship(RubyXL::SlicerCacheFile)
337
+ define_relationship(RubyXL::PersonMetadata)
337
338
 
338
339
  define_child_node(RubyXL::FileVersion)
339
340
  define_child_node(RubyXL::FileSharing)
@@ -363,8 +364,7 @@ module RubyXL
363
364
  'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
364
365
  'http://schemas.microsoft.com/office/spreadsheetml/2010/11/main' => 'x15')
365
366
 
366
- attr_accessor :worksheets
367
- attr_accessor :is_template
367
+ attr_accessor :worksheets, :is_template
368
368
 
369
369
  def before_write_xml
370
370
  max_sheet_id = worksheets.collect(&:sheet_id).compact.max || 0
@@ -422,8 +422,8 @@ module RubyXL
422
422
 
423
423
  def date_to_num(date)
424
424
  case date
425
- when Date, DateTime then (date.ajd - base_date().ajd).to_f
426
- when Time then ((date.to_r - base_date().to_time.to_r) / 86400).to_f
425
+ when Date, DateTime then (date.ajd - base_date.ajd).to_f
426
+ when Time then ((date.to_r - base_date.to_time.to_r) / 86400).to_f
427
427
  end
428
428
  end
429
429
 
@@ -72,7 +72,7 @@ module RubyXL
72
72
  private
73
73
 
74
74
  # validates Workbook, ensures that this worksheet is in @workbook
75
- def validate_workbook()
75
+ def validate_workbook
76
76
  unless @workbook.nil? || @workbook.worksheets.nil?
77
77
  return if @workbook.worksheets.any? { |sheet| sheet.equal?(self) }
78
78
  end