rubyXL 3.3.29 → 3.4.33

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 (466) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +60 -0
  3. data/.rubocop.yml +124 -0
  4. data/CHANGELOG.md +12 -0
  5. data/Gemfile +11 -8
  6. data/LICENSE.txt +1 -1
  7. data/README.rdoc +57 -19
  8. data/Rakefile +29 -29
  9. data/VERSION +1 -1
  10. data/lib/rubyXL/cell.rb +2 -29
  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 +137 -0
  15. data/lib/rubyXL/convenience_methods/worksheet.rb +734 -0
  16. data/lib/rubyXL/convenience_methods.rb +5 -1122
  17. data/lib/rubyXL/objects/border.rb +0 -3
  18. data/lib/rubyXL/objects/calculation_chain.rb +2 -2
  19. data/lib/rubyXL/objects/cell_style.rb +4 -6
  20. data/lib/rubyXL/objects/chartsheet.rb +8 -12
  21. data/lib/rubyXL/objects/color.rb +4 -6
  22. data/lib/rubyXL/objects/column_range.rb +16 -15
  23. data/lib/rubyXL/objects/comments.rb +1 -4
  24. data/lib/rubyXL/objects/connection.rb +175 -0
  25. data/lib/rubyXL/objects/container_nodes.rb +1 -5
  26. data/lib/rubyXL/objects/content_types.rb +3 -6
  27. data/lib/rubyXL/objects/data_validation.rb +2 -2
  28. data/lib/rubyXL/objects/document_properties.rb +12 -15
  29. data/lib/rubyXL/objects/extensions.rb +0 -2
  30. data/lib/rubyXL/objects/external_links.rb +38 -8
  31. data/lib/rubyXL/objects/fill.rb +2 -5
  32. data/lib/rubyXL/objects/filters.rb +5 -7
  33. data/lib/rubyXL/objects/font.rb +2 -7
  34. data/lib/rubyXL/objects/formula.rb +3 -5
  35. data/lib/rubyXL/objects/ooxml_object.rb +40 -31
  36. data/lib/rubyXL/objects/query_table.rb +106 -0
  37. data/lib/rubyXL/objects/reference.rb +26 -17
  38. data/lib/rubyXL/objects/relationships.rb +14 -14
  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 +1 -3
  42. data/lib/rubyXL/objects/sheet_data.rb +44 -17
  43. data/lib/rubyXL/objects/simple_types.rb +19 -2
  44. data/lib/rubyXL/objects/storage.rb +60 -49
  45. data/lib/rubyXL/objects/stylesheet.rb +9 -17
  46. data/lib/rubyXL/objects/text.rb +6 -8
  47. data/lib/rubyXL/objects/theme.rb +23 -9
  48. data/lib/rubyXL/objects/workbook.rb +144 -36
  49. data/lib/rubyXL/objects/worksheet.rb +48 -34
  50. data/lib/rubyXL/parser.rb +1 -3
  51. data/lib/rubyXL/worksheet.rb +86 -86
  52. data/lib/rubyXL.rb +1 -1
  53. data/rdoc/README_rdoc.html +212 -153
  54. data/rdoc/RubyXL/AExtension.html +33 -69
  55. data/rdoc/RubyXL/AExtensionStorageArea.html +12 -18
  56. data/rdoc/RubyXL/ActiveX.html +26 -52
  57. data/rdoc/RubyXL/ActiveXBinary.html +12 -23
  58. data/rdoc/RubyXL/AdjustHandleList.html +13 -20
  59. data/rdoc/RubyXL/Alignment.html +13 -20
  60. data/rdoc/RubyXL/AlternateContent.html +12 -18
  61. data/rdoc/RubyXL/AlternateUrls.html +99 -0
  62. data/rdoc/RubyXL/Authors.html +13 -20
  63. data/rdoc/RubyXL/AutoFilter.html +13 -20
  64. data/rdoc/RubyXL/AutoFilterColumn.html +13 -20
  65. data/rdoc/RubyXL/BinaryImageFile.html +12 -26
  66. data/rdoc/RubyXL/BodyProperties.html +13 -20
  67. data/rdoc/RubyXL/BooleanNode.html +12 -18
  68. data/rdoc/RubyXL/BooleanValue.html +12 -18
  69. data/rdoc/RubyXL/Border.html +49 -101
  70. data/rdoc/RubyXL/BorderEdge.html +32 -61
  71. data/rdoc/RubyXL/Borders.html +25 -44
  72. data/rdoc/RubyXL/Break.html +13 -20
  73. data/rdoc/RubyXL/BreakList.html +13 -20
  74. data/rdoc/RubyXL/CT_AdjPoint2D.html +13 -20
  75. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +13 -20
  76. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +13 -20
  77. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +13 -20
  78. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +13 -20
  79. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +13 -20
  80. data/rdoc/RubyXL/CT_Backdrop.html +13 -20
  81. data/rdoc/RubyXL/CT_Bevel.html +13 -20
  82. data/rdoc/RubyXL/CT_BiLevelEffect.html +13 -20
  83. data/rdoc/RubyXL/CT_BlendEffect.html +13 -20
  84. data/rdoc/RubyXL/CT_Blip.html +13 -20
  85. data/rdoc/RubyXL/CT_BlipFillProperties.html +13 -20
  86. data/rdoc/RubyXL/CT_BlurEffect.html +13 -20
  87. data/rdoc/RubyXL/CT_Camera.html +13 -20
  88. data/rdoc/RubyXL/CT_Color.html +13 -20
  89. data/rdoc/RubyXL/CT_ColorChangeEffect.html +13 -20
  90. data/rdoc/RubyXL/CT_ColorMapping.html +13 -20
  91. data/rdoc/RubyXL/CT_ColorScheme.html +13 -20
  92. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +13 -20
  93. data/rdoc/RubyXL/CT_ConnectionSite.html +13 -20
  94. data/rdoc/RubyXL/CT_ConnectionSiteList.html +13 -20
  95. data/rdoc/RubyXL/CT_DashStop.html +13 -20
  96. data/rdoc/RubyXL/CT_DashStopList.html +13 -20
  97. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +13 -20
  98. data/rdoc/RubyXL/CT_DuotoneEffect.html +13 -20
  99. data/rdoc/RubyXL/CT_EffectContainer.html +13 -20
  100. data/rdoc/RubyXL/CT_EffectList.html +13 -20
  101. data/rdoc/RubyXL/CT_EffectReference.html +13 -20
  102. data/rdoc/RubyXL/CT_EffectStyleItem.html +13 -20
  103. data/rdoc/RubyXL/CT_EffectStyleList.html +13 -20
  104. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +13 -20
  105. data/rdoc/RubyXL/CT_FillEffect.html +13 -20
  106. data/rdoc/RubyXL/CT_FillOverlayEffect.html +13 -20
  107. data/rdoc/RubyXL/CT_FillStyleList.html +13 -20
  108. data/rdoc/RubyXL/CT_FlatText.html +13 -20
  109. data/rdoc/RubyXL/CT_FontCollection.html +13 -20
  110. data/rdoc/RubyXL/CT_FontReference.html +13 -20
  111. data/rdoc/RubyXL/CT_GeomGuideList.html +13 -20
  112. data/rdoc/RubyXL/CT_GlowEffect.html +13 -20
  113. data/rdoc/RubyXL/CT_GradientFillProperties.html +13 -20
  114. data/rdoc/RubyXL/CT_GradientStop.html +13 -20
  115. data/rdoc/RubyXL/CT_GradientStopList.html +13 -20
  116. data/rdoc/RubyXL/CT_HSLEffect.html +13 -20
  117. data/rdoc/RubyXL/CT_HslColor.html +13 -20
  118. data/rdoc/RubyXL/CT_Hyperlink.html +13 -20
  119. data/rdoc/RubyXL/CT_InnerShadowEffect.html +13 -20
  120. data/rdoc/RubyXL/CT_LightRig.html +13 -20
  121. data/rdoc/RubyXL/CT_LineEndProperties.html +13 -20
  122. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +13 -20
  123. data/rdoc/RubyXL/CT_LineProperties.html +13 -20
  124. data/rdoc/RubyXL/CT_LineStyleList.html +13 -20
  125. data/rdoc/RubyXL/CT_LinearShadeProperties.html +13 -20
  126. data/rdoc/RubyXL/CT_LuminanceEffect.html +13 -20
  127. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +13 -20
  128. data/rdoc/RubyXL/CT_OuterShadowEffect.html +13 -20
  129. data/rdoc/RubyXL/CT_Path2D.html +13 -20
  130. data/rdoc/RubyXL/CT_Path2DArcTo.html +13 -20
  131. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +13 -20
  132. data/rdoc/RubyXL/CT_Path2DList.html +13 -20
  133. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +13 -20
  134. data/rdoc/RubyXL/CT_Path2DTo.html +13 -20
  135. data/rdoc/RubyXL/CT_PathShadeProperties.html +13 -20
  136. data/rdoc/RubyXL/CT_PatternFillProperties.html +13 -20
  137. data/rdoc/RubyXL/CT_Point3D.html +13 -20
  138. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +13 -20
  139. data/rdoc/RubyXL/CT_PresetColor.html +13 -20
  140. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +13 -20
  141. data/rdoc/RubyXL/CT_PresetShadowEffect.html +13 -20
  142. data/rdoc/RubyXL/CT_PresetTextShape.html +13 -20
  143. data/rdoc/RubyXL/CT_ReflectionEffect.html +13 -20
  144. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +13 -20
  145. data/rdoc/RubyXL/CT_RelativeRect.html +13 -20
  146. data/rdoc/RubyXL/CT_SRgbColor.html +13 -20
  147. data/rdoc/RubyXL/CT_ScRgbColor.html +13 -20
  148. data/rdoc/RubyXL/CT_Scene3D.html +13 -20
  149. data/rdoc/RubyXL/CT_SchemeColor.html +13 -20
  150. data/rdoc/RubyXL/CT_Shape3D.html +13 -20
  151. data/rdoc/RubyXL/CT_ShapeStyle.html +13 -20
  152. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +13 -20
  153. data/rdoc/RubyXL/CT_SphereCoords.html +13 -20
  154. data/rdoc/RubyXL/CT_StretchInfoProperties.html +13 -20
  155. data/rdoc/RubyXL/CT_StyleMatrix.html +13 -20
  156. data/rdoc/RubyXL/CT_StyleMatrixReference.html +13 -20
  157. data/rdoc/RubyXL/CT_SupplementalFont.html +13 -20
  158. data/rdoc/RubyXL/CT_SystemColor.html +13 -20
  159. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +13 -20
  160. data/rdoc/RubyXL/CT_TextBlipBullet.html +13 -20
  161. data/rdoc/RubyXL/CT_TextCharBullet.html +13 -20
  162. data/rdoc/RubyXL/CT_TextCharacterProperties.html +13 -20
  163. data/rdoc/RubyXL/CT_TextFont.html +13 -20
  164. data/rdoc/RubyXL/CT_TextListStyle.html +13 -20
  165. data/rdoc/RubyXL/CT_TextNormalAutofit.html +13 -20
  166. data/rdoc/RubyXL/CT_TextParagraphProperties.html +13 -20
  167. data/rdoc/RubyXL/CT_TextSpacing.html +13 -20
  168. data/rdoc/RubyXL/CT_TextTabStop.html +13 -20
  169. data/rdoc/RubyXL/CT_TextTabStopList.html +13 -20
  170. data/rdoc/RubyXL/CT_TileInfoProperties.html +13 -20
  171. data/rdoc/RubyXL/CT_TintEffect.html +13 -20
  172. data/rdoc/RubyXL/CT_Transform2D.html +13 -20
  173. data/rdoc/RubyXL/CT_TransformEffect.html +13 -20
  174. data/rdoc/RubyXL/CT_Vector3D.html +13 -20
  175. data/rdoc/RubyXL/CT_XYAdjustHandle.html +13 -20
  176. data/rdoc/RubyXL/CalculationChain.html +23 -50
  177. data/rdoc/RubyXL/CalculationChainCell.html +13 -20
  178. data/rdoc/RubyXL/CalculationProperties.html +13 -20
  179. data/rdoc/RubyXL/Cell.html +210 -258
  180. data/rdoc/RubyXL/CellConvenienceMethods.html +438 -572
  181. data/rdoc/RubyXL/CellExt.html +13 -20
  182. data/rdoc/RubyXL/CellSmartTag.html +13 -20
  183. data/rdoc/RubyXL/CellSmartTagProperty.html +13 -20
  184. data/rdoc/RubyXL/CellSmartTags.html +13 -20
  185. data/rdoc/RubyXL/CellStyle.html +13 -20
  186. data/rdoc/RubyXL/CellStyleXFs.html +25 -44
  187. data/rdoc/RubyXL/CellStyles.html +25 -44
  188. data/rdoc/RubyXL/CellValue.html +24 -43
  189. data/rdoc/RubyXL/CellWatch.html +13 -20
  190. data/rdoc/RubyXL/CellWatches.html +13 -20
  191. data/rdoc/RubyXL/CellXFs.html +26 -48
  192. data/rdoc/RubyXL/ChartColorsFile.html +12 -26
  193. data/rdoc/RubyXL/ChartFile.html +25 -54
  194. data/rdoc/RubyXL/ChartStyleFile.html +12 -26
  195. data/rdoc/RubyXL/ChartUserShapesFile.html +12 -26
  196. data/rdoc/RubyXL/Chartsheet.html +26 -73
  197. data/rdoc/RubyXL/ChartsheetPageSetup.html +13 -20
  198. data/rdoc/RubyXL/ChartsheetProperties.html +13 -20
  199. data/rdoc/RubyXL/ChartsheetProtection.html +13 -20
  200. data/rdoc/RubyXL/ChartsheetView.html +13 -20
  201. data/rdoc/RubyXL/ChartsheetViews.html +13 -20
  202. data/rdoc/RubyXL/Color.html +24 -48
  203. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +246 -0
  204. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +285 -0
  205. data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
  206. data/rdoc/RubyXL/ColorConvenienceMethods.html +139 -0
  207. data/rdoc/RubyXL/ColorFilter.html +13 -20
  208. data/rdoc/RubyXL/ColorScale.html +13 -20
  209. data/rdoc/RubyXL/ColorSet.html +13 -20
  210. data/rdoc/RubyXL/Colors.html +13 -20
  211. data/rdoc/RubyXL/ColumnRange.html +76 -91
  212. data/rdoc/RubyXL/ColumnRanges.html +54 -106
  213. data/rdoc/RubyXL/Comment.html +13 -20
  214. data/rdoc/RubyXL/CommentList.html +13 -20
  215. data/rdoc/RubyXL/CommentsFile.html +24 -56
  216. data/rdoc/RubyXL/ConditionalFormatValue.html +13 -20
  217. data/rdoc/RubyXL/ConditionalFormatting.html +13 -20
  218. data/rdoc/RubyXL/ConditionalFormattingRule.html +13 -20
  219. data/rdoc/RubyXL/Connection.html +99 -0
  220. data/rdoc/RubyXL/ConnectionTable.html +99 -0
  221. data/rdoc/RubyXL/ConnectionTables.html +99 -0
  222. data/rdoc/RubyXL/ConnectionTextField.html +99 -0
  223. data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
  224. data/rdoc/RubyXL/Connections.html +149 -0
  225. data/rdoc/RubyXL/ContentTypeDefault.html +12 -18
  226. data/rdoc/RubyXL/ContentTypeOverride.html +12 -18
  227. data/rdoc/RubyXL/ContentTypes.html +35 -72
  228. data/rdoc/RubyXL/ControlPropertiesFile.html +14 -23
  229. data/rdoc/RubyXL/CorePropertiesFile.html +89 -208
  230. data/rdoc/RubyXL/CustomColor.html +13 -20
  231. data/rdoc/RubyXL/CustomColorList.html +13 -20
  232. data/rdoc/RubyXL/CustomFilter.html +13 -20
  233. data/rdoc/RubyXL/CustomFilters.html +13 -20
  234. data/rdoc/RubyXL/CustomGeometry.html +13 -20
  235. data/rdoc/RubyXL/CustomProperties.html +13 -20
  236. data/rdoc/RubyXL/CustomPropertiesFile.html +12 -26
  237. data/rdoc/RubyXL/CustomProperty.html +13 -20
  238. data/rdoc/RubyXL/CustomPropertyFile.html +108 -0
  239. data/rdoc/RubyXL/CustomSheetView.html +13 -20
  240. data/rdoc/RubyXL/CustomSheetViews.html +13 -20
  241. data/rdoc/RubyXL/CustomWorkbookView.html +13 -20
  242. data/rdoc/RubyXL/CustomWorkbookViews.html +13 -20
  243. data/rdoc/RubyXL/CustomXMLFile.html +12 -23
  244. data/rdoc/RubyXL/DXF.html +13 -20
  245. data/rdoc/RubyXL/DXFs.html +13 -20
  246. data/rdoc/RubyXL/DataBar.html +13 -20
  247. data/rdoc/RubyXL/DataConsolidate.html +13 -20
  248. data/rdoc/RubyXL/DataConsolidationReference.html +13 -20
  249. data/rdoc/RubyXL/DataConsolidationReferences.html +13 -20
  250. data/rdoc/RubyXL/DataType.html +11 -40
  251. data/rdoc/RubyXL/DataValidation.html +13 -20
  252. data/rdoc/RubyXL/DataValidations.html +13 -20
  253. data/rdoc/RubyXL/DateGroupItem.html +13 -20
  254. data/rdoc/RubyXL/DefinedName.html +13 -20
  255. data/rdoc/RubyXL/DefinedNameExt.html +13 -20
  256. data/rdoc/RubyXL/DefinedNames.html +13 -20
  257. data/rdoc/RubyXL/DefinedNamesExt.html +13 -20
  258. data/rdoc/RubyXL/DocumentPropertiesFile.html +34 -76
  259. data/rdoc/RubyXL/DrawingFile.html +25 -54
  260. data/rdoc/RubyXL/DynamicFilter.html +13 -20
  261. data/rdoc/RubyXL/EmbeddedControl.html +13 -20
  262. data/rdoc/RubyXL/EmbeddedControls.html +13 -20
  263. data/rdoc/RubyXL/Extension.html +13 -20
  264. data/rdoc/RubyXL/ExtensionStorageArea.html +13 -20
  265. data/rdoc/RubyXL/Extents.html +13 -20
  266. data/rdoc/RubyXL/ExternalBook.html +13 -20
  267. data/rdoc/RubyXL/ExternalLinksFile.html +25 -54
  268. data/rdoc/RubyXL/ExternalReference.html +13 -20
  269. data/rdoc/RubyXL/ExternalReferences.html +13 -20
  270. data/rdoc/RubyXL/ExtraColorSchemeList.html +13 -20
  271. data/rdoc/RubyXL/FieldItem.html +13 -20
  272. data/rdoc/RubyXL/FileRecoveryProperties.html +13 -20
  273. data/rdoc/RubyXL/FileSharing.html +13 -20
  274. data/rdoc/RubyXL/FileVersion.html +13 -20
  275. data/rdoc/RubyXL/Fill.html +25 -44
  276. data/rdoc/RubyXL/Fills.html +25 -44
  277. data/rdoc/RubyXL/FilterContainer.html +13 -20
  278. data/rdoc/RubyXL/FloatNode.html +12 -18
  279. data/rdoc/RubyXL/FloatValue.html +12 -18
  280. data/rdoc/RubyXL/Font.html +28 -64
  281. data/rdoc/RubyXL/FontConvenienceMethods.html +133 -294
  282. data/rdoc/RubyXL/FontScheme.html +13 -20
  283. data/rdoc/RubyXL/Fonts.html +25 -44
  284. data/rdoc/RubyXL/Formula.html +13 -20
  285. data/rdoc/RubyXL/FunctionGroup.html +13 -20
  286. data/rdoc/RubyXL/FunctionGroups.html +13 -20
  287. data/rdoc/RubyXL/GenericStorageObject.html +41 -98
  288. data/rdoc/RubyXL/GradientFill.html +13 -20
  289. data/rdoc/RubyXL/HeaderFooterSettings.html +13 -20
  290. data/rdoc/RubyXL/Hyperlink.html +13 -20
  291. data/rdoc/RubyXL/HyperlinkRelFile.html +12 -23
  292. data/rdoc/RubyXL/Hyperlinks.html +13 -20
  293. data/rdoc/RubyXL/IconFilter.html +13 -20
  294. data/rdoc/RubyXL/IconSet.html +13 -20
  295. data/rdoc/RubyXL/IgnoredError.html +13 -20
  296. data/rdoc/RubyXL/IgnoredErrors.html +13 -20
  297. data/rdoc/RubyXL/IndexedColors.html +13 -20
  298. data/rdoc/RubyXL/InputCells.html +13 -20
  299. data/rdoc/RubyXL/IntegerNode.html +12 -18
  300. data/rdoc/RubyXL/IntegerValue.html +12 -18
  301. data/rdoc/RubyXL/LegacyCell.html +20 -71
  302. data/rdoc/RubyXL/LegacyWorksheet.html +77 -126
  303. data/rdoc/RubyXL/MRUColors.html +13 -20
  304. data/rdoc/RubyXL/MacrosFile.html +12 -26
  305. data/rdoc/RubyXL/MergedCell.html +13 -20
  306. data/rdoc/RubyXL/MergedCells.html +13 -20
  307. data/rdoc/RubyXL/NumFmt.html +13 -20
  308. data/rdoc/RubyXL/NumberFormat.html +25 -44
  309. data/rdoc/RubyXL/NumberFormats.html +25 -50
  310. data/rdoc/RubyXL/OLEObject.html +13 -20
  311. data/rdoc/RubyXL/OLEObjectFile.html +12 -26
  312. data/rdoc/RubyXL/OLEObjects.html +13 -20
  313. data/rdoc/RubyXL/OLESize.html +13 -20
  314. data/rdoc/RubyXL/OOXMLContainerObject.html +72 -157
  315. data/rdoc/RubyXL/OOXMLIgnored.html +32 -62
  316. data/rdoc/RubyXL/OOXMLObject.html +15 -26
  317. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +126 -203
  318. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +104 -226
  319. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +109 -242
  320. data/rdoc/RubyXL/OOXMLTopLevelObject.html +67 -154
  321. data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
  322. data/rdoc/RubyXL/Offset.html +13 -20
  323. data/rdoc/RubyXL/OlapProperties.html +99 -0
  324. data/rdoc/RubyXL/OleItem.html +99 -0
  325. data/rdoc/RubyXL/OleItems.html +99 -0
  326. data/rdoc/RubyXL/OleLink.html +99 -0
  327. data/rdoc/RubyXL/OutlineProperties.html +13 -20
  328. data/rdoc/RubyXL/PageMargins.html +13 -20
  329. data/rdoc/RubyXL/PageSetup.html +13 -20
  330. data/rdoc/RubyXL/PageSetupProperties.html +13 -20
  331. data/rdoc/RubyXL/Pane.html +13 -20
  332. data/rdoc/RubyXL/Parser.html +35 -65
  333. data/rdoc/RubyXL/PatternFill.html +13 -20
  334. data/rdoc/RubyXL/PersonMetadata.html +108 -0
  335. data/rdoc/RubyXL/PhoneticProperties.html +13 -20
  336. data/rdoc/RubyXL/PhoneticRun.html +13 -20
  337. data/rdoc/RubyXL/PivotArea.html +13 -20
  338. data/rdoc/RubyXL/PivotCache.html +13 -20
  339. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +14 -31
  340. data/rdoc/RubyXL/PivotCacheRecordsFile.html +12 -26
  341. data/rdoc/RubyXL/PivotCaches.html +13 -20
  342. data/rdoc/RubyXL/PivotReference.html +13 -20
  343. data/rdoc/RubyXL/PivotReferences.html +13 -20
  344. data/rdoc/RubyXL/PivotTableFile.html +14 -31
  345. data/rdoc/RubyXL/PivotTableSelection.html +13 -20
  346. data/rdoc/RubyXL/PresetGeometry.html +13 -20
  347. data/rdoc/RubyXL/PrintOptions.html +13 -20
  348. data/rdoc/RubyXL/PrinterSettingsFile.html +12 -26
  349. data/rdoc/RubyXL/ProtectedRange.html +13 -20
  350. data/rdoc/RubyXL/ProtectedRanges.html +13 -20
  351. data/rdoc/RubyXL/Protection.html +13 -20
  352. data/rdoc/RubyXL/QueryParameter.html +99 -0
  353. data/rdoc/RubyXL/QueryParameters.html +99 -0
  354. data/rdoc/RubyXL/QueryTable.html +157 -0
  355. data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
  356. data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
  357. data/rdoc/RubyXL/QueryTableField.html +99 -0
  358. data/rdoc/RubyXL/QueryTableFields.html +99 -0
  359. data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
  360. data/rdoc/RubyXL/RID.html +12 -18
  361. data/rdoc/RubyXL/RawOOXML.html +33 -69
  362. data/rdoc/RubyXL/Reference.html +156 -286
  363. data/rdoc/RubyXL/Relationship.html +12 -18
  364. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +20 -37
  365. data/rdoc/RubyXL/RelationshipSupport.html +62 -145
  366. data/rdoc/RubyXL/RevisionPointer.html +13 -23
  367. data/rdoc/RubyXL/RichText.html +27 -45
  368. data/rdoc/RubyXL/RichTextRun.html +24 -43
  369. data/rdoc/RubyXL/Row.html +88 -205
  370. data/rdoc/RubyXL/RowExt.html +13 -20
  371. data/rdoc/RubyXL/RunProperties.html +13 -20
  372. data/rdoc/RubyXL/Scenario.html +13 -20
  373. data/rdoc/RubyXL/Scenarios.html +13 -20
  374. data/rdoc/RubyXL/Selection.html +23 -42
  375. data/rdoc/RubyXL/ShapeGuide.html +13 -20
  376. data/rdoc/RubyXL/ShapeTextRectangle.html +13 -20
  377. data/rdoc/RubyXL/SharedStringsTable.html +81 -177
  378. data/rdoc/RubyXL/Sheet.html +13 -20
  379. data/rdoc/RubyXL/SheetCalculationProperties.html +13 -20
  380. data/rdoc/RubyXL/SheetData.html +32 -62
  381. data/rdoc/RubyXL/SheetDataExt.html +13 -20
  382. data/rdoc/RubyXL/SheetDataSet.html +13 -20
  383. data/rdoc/RubyXL/SheetMetadata.html +108 -0
  384. data/rdoc/RubyXL/SheetName.html +13 -20
  385. data/rdoc/RubyXL/SheetNames.html +13 -20
  386. data/rdoc/RubyXL/Sheets.html +13 -20
  387. data/rdoc/RubyXL/SlicerCacheFile.html +12 -26
  388. data/rdoc/RubyXL/SlicerFile.html +12 -26
  389. data/rdoc/RubyXL/SmartTagProperties.html +13 -20
  390. data/rdoc/RubyXL/SmartTagType.html +13 -20
  391. data/rdoc/RubyXL/SmartTagTypes.html +13 -20
  392. data/rdoc/RubyXL/SmartTags.html +13 -20
  393. data/rdoc/RubyXL/SortCondition.html +13 -20
  394. data/rdoc/RubyXL/SortState.html +13 -20
  395. data/rdoc/RubyXL/Sqref.html +33 -63
  396. data/rdoc/RubyXL/Stop.html +13 -20
  397. data/rdoc/RubyXL/StringNode.html +12 -18
  398. data/rdoc/RubyXL/StringNodeW3C.html +33 -63
  399. data/rdoc/RubyXL/StringValue.html +12 -18
  400. data/rdoc/RubyXL/Stylesheet.html +65 -138
  401. data/rdoc/RubyXL/TableFile.html +12 -26
  402. data/rdoc/RubyXL/TableParts.html +12 -18
  403. data/rdoc/RubyXL/TableStyle.html +13 -20
  404. data/rdoc/RubyXL/TableStyles.html +13 -20
  405. data/rdoc/RubyXL/Text.html +35 -76
  406. data/rdoc/RubyXL/TextImportSettings.html +99 -0
  407. data/rdoc/RubyXL/Theme.html +72 -72
  408. data/rdoc/RubyXL/ThemeElements.html +13 -20
  409. data/rdoc/RubyXL/ThumbnailFile.html +12 -26
  410. data/rdoc/RubyXL/Top10.html +13 -20
  411. data/rdoc/RubyXL/VMLDrawingFile.html +15 -33
  412. data/rdoc/RubyXL/Variant.html +13 -20
  413. data/rdoc/RubyXL/Vector.html +24 -43
  414. data/rdoc/RubyXL/VectorValue.html +12 -18
  415. data/rdoc/RubyXL/VisualProperties.html +13 -20
  416. data/rdoc/RubyXL/WebPublishObject.html +13 -20
  417. data/rdoc/RubyXL/WebPublishObjects.html +13 -20
  418. data/rdoc/RubyXL/WebPublishingItem.html +13 -20
  419. data/rdoc/RubyXL/WebPublishingItems.html +13 -20
  420. data/rdoc/RubyXL/WebPublishingProperties.html +13 -20
  421. data/rdoc/RubyXL/WebQueryProperties.html +99 -0
  422. data/rdoc/RubyXL/Workbook.html +581 -266
  423. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +226 -951
  424. data/rdoc/RubyXL/WorkbookProperties.html +13 -20
  425. data/rdoc/RubyXL/WorkbookProtection.html +13 -20
  426. data/rdoc/RubyXL/WorkbookRoot.html +58 -135
  427. data/rdoc/RubyXL/WorkbookView.html +13 -20
  428. data/rdoc/RubyXL/WorkbookViews.html +13 -20
  429. data/rdoc/RubyXL/Worksheet.html +122 -137
  430. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +717 -1373
  431. data/rdoc/RubyXL/WorksheetDimensions.html +13 -20
  432. data/rdoc/RubyXL/WorksheetFormatProperties.html +12 -18
  433. data/rdoc/RubyXL/WorksheetProperties.html +13 -20
  434. data/rdoc/RubyXL/WorksheetProtection.html +13 -20
  435. data/rdoc/RubyXL/WorksheetView.html +13 -20
  436. data/rdoc/RubyXL/WorksheetViews.html +13 -20
  437. data/rdoc/RubyXL/XF.html +13 -20
  438. data/rdoc/RubyXL.html +46 -306
  439. data/rdoc/created.rid +45 -38
  440. data/rdoc/css/rdoc.css +109 -12
  441. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  442. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  443. data/rdoc/index.html +403 -726
  444. data/rdoc/js/darkfish.js +33 -97
  445. data/rdoc/js/navigation.js +12 -49
  446. data/rdoc/js/navigation.js.gz +0 -0
  447. data/rdoc/js/search.js +35 -34
  448. data/rdoc/js/search_index.js +1 -1
  449. data/rdoc/js/search_index.js.gz +0 -0
  450. data/rdoc/js/searcher.js +6 -6
  451. data/rdoc/js/searcher.js.gz +0 -0
  452. data/rdoc/table_of_contents.html +287 -45
  453. data/rubyXL.gemspec +77 -43
  454. data/spec/lib/cell_spec.rb +119 -6
  455. data/spec/lib/color_spec.rb +9 -1
  456. data/spec/lib/parser_spec.rb +28 -28
  457. data/spec/lib/reference_spec.rb +41 -5
  458. data/spec/lib/rgb_color_spec.rb +29 -0
  459. data/spec/lib/stylesheet_spec.rb +10 -11
  460. data/spec/lib/text_spec.rb +4 -6
  461. data/spec/lib/workbook_spec.rb +31 -8
  462. data/spec/lib/worksheet_spec.rb +886 -480
  463. data/spec/spec_helper.rb +2 -0
  464. data/test/test_parse_write.rb +15 -15
  465. metadata +76 -10
  466. data/rdoc/js/jquery.js +0 -4
data/rubyXL.gemspec CHANGED
@@ -1,25 +1,28 @@
1
- # Generated by jeweler
1
+ # Generated by juwelier
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
3
+ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: rubyXL 3.3.29 ruby lib
5
+ # stub: rubyXL 3.4.33 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
- s.name = "rubyXL"
9
- s.version = "3.3.29"
8
+ s.name = "rubyXL".freeze
9
+ s.version = "3.4.33"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Vivek Bhagwat", "Wesha"]
14
- s.date = "2018-02-26"
15
- s.description = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents"
16
- s.email = "bhagwat.vivek@gmail.com"
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Vivek Bhagwat".freeze, "Wesha".freeze]
14
+ s.date = "2024-12-20"
15
+ s.description = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents".freeze
16
+ s.email = "bhagwat.vivek@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
19
19
  "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
+ ".circleci/config.yml",
22
23
  ".codeclimate.yml",
24
+ ".rubocop.yml",
25
+ "CHANGELOG.md",
23
26
  "Gemfile",
24
27
  "LICENSE.txt",
25
28
  "README.rdoc",
@@ -28,6 +31,11 @@ Gem::Specification.new do |s|
28
31
  "lib/rubyXL.rb",
29
32
  "lib/rubyXL/cell.rb",
30
33
  "lib/rubyXL/convenience_methods.rb",
34
+ "lib/rubyXL/convenience_methods/cell.rb",
35
+ "lib/rubyXL/convenience_methods/color.rb",
36
+ "lib/rubyXL/convenience_methods/font.rb",
37
+ "lib/rubyXL/convenience_methods/workbook.rb",
38
+ "lib/rubyXL/convenience_methods/worksheet.rb",
31
39
  "lib/rubyXL/objects/border.rb",
32
40
  "lib/rubyXL/objects/calculation_chain.rb",
33
41
  "lib/rubyXL/objects/cell_style.rb",
@@ -35,6 +43,7 @@ Gem::Specification.new do |s|
35
43
  "lib/rubyXL/objects/color.rb",
36
44
  "lib/rubyXL/objects/column_range.rb",
37
45
  "lib/rubyXL/objects/comments.rb",
46
+ "lib/rubyXL/objects/connection.rb",
38
47
  "lib/rubyXL/objects/container_nodes.rb",
39
48
  "lib/rubyXL/objects/content_types.rb",
40
49
  "lib/rubyXL/objects/data_validation.rb",
@@ -46,6 +55,7 @@ Gem::Specification.new do |s|
46
55
  "lib/rubyXL/objects/font.rb",
47
56
  "lib/rubyXL/objects/formula.rb",
48
57
  "lib/rubyXL/objects/ooxml_object.rb",
58
+ "lib/rubyXL/objects/query_table.rb",
49
59
  "lib/rubyXL/objects/reference.rb",
50
60
  "lib/rubyXL/objects/relationships.rb",
51
61
  "lib/rubyXL/objects/root.rb",
@@ -70,6 +80,7 @@ Gem::Specification.new do |s|
70
80
  "rdoc/RubyXL/AdjustHandleList.html",
71
81
  "rdoc/RubyXL/Alignment.html",
72
82
  "rdoc/RubyXL/AlternateContent.html",
83
+ "rdoc/RubyXL/AlternateUrls.html",
73
84
  "rdoc/RubyXL/Authors.html",
74
85
  "rdoc/RubyXL/AutoFilter.html",
75
86
  "rdoc/RubyXL/AutoFilterColumn.html",
@@ -211,6 +222,10 @@ Gem::Specification.new do |s|
211
222
  "rdoc/RubyXL/ChartsheetView.html",
212
223
  "rdoc/RubyXL/ChartsheetViews.html",
213
224
  "rdoc/RubyXL/Color.html",
225
+ "rdoc/RubyXL/ColorConvenienceClasses.html",
226
+ "rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html",
227
+ "rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html",
228
+ "rdoc/RubyXL/ColorConvenienceMethods.html",
214
229
  "rdoc/RubyXL/ColorFilter.html",
215
230
  "rdoc/RubyXL/ColorScale.html",
216
231
  "rdoc/RubyXL/ColorSet.html",
@@ -223,6 +238,12 @@ Gem::Specification.new do |s|
223
238
  "rdoc/RubyXL/ConditionalFormatValue.html",
224
239
  "rdoc/RubyXL/ConditionalFormatting.html",
225
240
  "rdoc/RubyXL/ConditionalFormattingRule.html",
241
+ "rdoc/RubyXL/Connection.html",
242
+ "rdoc/RubyXL/ConnectionTable.html",
243
+ "rdoc/RubyXL/ConnectionTables.html",
244
+ "rdoc/RubyXL/ConnectionTextField.html",
245
+ "rdoc/RubyXL/ConnectionTextFields.html",
246
+ "rdoc/RubyXL/Connections.html",
226
247
  "rdoc/RubyXL/ContentTypeDefault.html",
227
248
  "rdoc/RubyXL/ContentTypeOverride.html",
228
249
  "rdoc/RubyXL/ContentTypes.html",
@@ -236,6 +257,7 @@ Gem::Specification.new do |s|
236
257
  "rdoc/RubyXL/CustomProperties.html",
237
258
  "rdoc/RubyXL/CustomPropertiesFile.html",
238
259
  "rdoc/RubyXL/CustomProperty.html",
260
+ "rdoc/RubyXL/CustomPropertyFile.html",
239
261
  "rdoc/RubyXL/CustomSheetView.html",
240
262
  "rdoc/RubyXL/CustomSheetViews.html",
241
263
  "rdoc/RubyXL/CustomWorkbookView.html",
@@ -318,7 +340,12 @@ Gem::Specification.new do |s|
318
340
  "rdoc/RubyXL/OOXMLObjectInstanceMethods.html",
319
341
  "rdoc/RubyXL/OOXMLRelationshipsFile.html",
320
342
  "rdoc/RubyXL/OOXMLTopLevelObject.html",
343
+ "rdoc/RubyXL/OdbcOleDbProperties.html",
321
344
  "rdoc/RubyXL/Offset.html",
345
+ "rdoc/RubyXL/OlapProperties.html",
346
+ "rdoc/RubyXL/OleItem.html",
347
+ "rdoc/RubyXL/OleItems.html",
348
+ "rdoc/RubyXL/OleLink.html",
322
349
  "rdoc/RubyXL/OutlineProperties.html",
323
350
  "rdoc/RubyXL/PageMargins.html",
324
351
  "rdoc/RubyXL/PageSetup.html",
@@ -326,6 +353,7 @@ Gem::Specification.new do |s|
326
353
  "rdoc/RubyXL/Pane.html",
327
354
  "rdoc/RubyXL/Parser.html",
328
355
  "rdoc/RubyXL/PatternFill.html",
356
+ "rdoc/RubyXL/PersonMetadata.html",
329
357
  "rdoc/RubyXL/PhoneticProperties.html",
330
358
  "rdoc/RubyXL/PhoneticRun.html",
331
359
  "rdoc/RubyXL/PivotArea.html",
@@ -343,6 +371,14 @@ Gem::Specification.new do |s|
343
371
  "rdoc/RubyXL/ProtectedRange.html",
344
372
  "rdoc/RubyXL/ProtectedRanges.html",
345
373
  "rdoc/RubyXL/Protection.html",
374
+ "rdoc/RubyXL/QueryParameter.html",
375
+ "rdoc/RubyXL/QueryParameters.html",
376
+ "rdoc/RubyXL/QueryTable.html",
377
+ "rdoc/RubyXL/QueryTableDeletedField.html",
378
+ "rdoc/RubyXL/QueryTableDeletedFields.html",
379
+ "rdoc/RubyXL/QueryTableField.html",
380
+ "rdoc/RubyXL/QueryTableFields.html",
381
+ "rdoc/RubyXL/QueryTableRefresh.html",
346
382
  "rdoc/RubyXL/RID.html",
347
383
  "rdoc/RubyXL/RawOOXML.html",
348
384
  "rdoc/RubyXL/Reference.html",
@@ -366,6 +402,7 @@ Gem::Specification.new do |s|
366
402
  "rdoc/RubyXL/SheetData.html",
367
403
  "rdoc/RubyXL/SheetDataExt.html",
368
404
  "rdoc/RubyXL/SheetDataSet.html",
405
+ "rdoc/RubyXL/SheetMetadata.html",
369
406
  "rdoc/RubyXL/SheetName.html",
370
407
  "rdoc/RubyXL/SheetNames.html",
371
408
  "rdoc/RubyXL/Sheets.html",
@@ -388,6 +425,7 @@ Gem::Specification.new do |s|
388
425
  "rdoc/RubyXL/TableStyle.html",
389
426
  "rdoc/RubyXL/TableStyles.html",
390
427
  "rdoc/RubyXL/Text.html",
428
+ "rdoc/RubyXL/TextImportSettings.html",
391
429
  "rdoc/RubyXL/Theme.html",
392
430
  "rdoc/RubyXL/ThemeElements.html",
393
431
  "rdoc/RubyXL/ThumbnailFile.html",
@@ -402,6 +440,7 @@ Gem::Specification.new do |s|
402
440
  "rdoc/RubyXL/WebPublishingItem.html",
403
441
  "rdoc/RubyXL/WebPublishingItems.html",
404
442
  "rdoc/RubyXL/WebPublishingProperties.html",
443
+ "rdoc/RubyXL/WebQueryProperties.html",
405
444
  "rdoc/RubyXL/Workbook.html",
406
445
  "rdoc/RubyXL/WorkbookConvenienceMethods.html",
407
446
  "rdoc/RubyXL/WorkbookProperties.html",
@@ -454,7 +493,6 @@ Gem::Specification.new do |s|
454
493
  "rdoc/images/zoom.png",
455
494
  "rdoc/index.html",
456
495
  "rdoc/js/darkfish.js",
457
- "rdoc/js/jquery.js",
458
496
  "rdoc/js/navigation.js",
459
497
  "rdoc/js/navigation.js.gz",
460
498
  "rdoc/js/search.js",
@@ -468,6 +506,7 @@ Gem::Specification.new do |s|
468
506
  "spec/lib/color_spec.rb",
469
507
  "spec/lib/parser_spec.rb",
470
508
  "spec/lib/reference_spec.rb",
509
+ "spec/lib/rgb_color_spec.rb",
471
510
  "spec/lib/stylesheet_spec.rb",
472
511
  "spec/lib/text_spec.rb",
473
512
  "spec/lib/workbook_spec.rb",
@@ -478,42 +517,37 @@ Gem::Specification.new do |s|
478
517
  "test/test_parse_write.rb",
479
518
  "tmp/.gitignore"
480
519
  ]
481
- s.homepage = "http://github.com/gilt/rubyXL"
482
- s.licenses = ["MIT"]
483
- s.rubygems_version = "2.5.1"
484
- s.summary = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents"
520
+ s.homepage = "http://github.com/gilt/rubyXL".freeze
521
+ s.licenses = ["MIT".freeze]
522
+ s.rubygems_version = "3.1.6".freeze
523
+ s.summary = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents".freeze
485
524
 
486
525
  if s.respond_to? :specification_version then
487
526
  s.specification_version = 4
527
+ end
488
528
 
489
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
490
- s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.4"])
491
- s.add_runtime_dependency(%q<rubyzip>, [">= 1.1.6"])
492
- s.add_development_dependency(%q<bundler>, [">= 0"])
493
- s.add_development_dependency(%q<rake>, [">= 0"])
494
- s.add_development_dependency(%q<jeweler>, [">= 0"])
495
- s.add_development_dependency(%q<rspec>, [">= 0"])
496
- s.add_development_dependency(%q<simplecov>, [">= 0"])
497
- s.add_development_dependency(%q<ruby-prof>, [">= 0"])
498
- else
499
- s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
500
- s.add_dependency(%q<rubyzip>, [">= 1.1.6"])
501
- s.add_dependency(%q<bundler>, [">= 0"])
502
- s.add_dependency(%q<rake>, [">= 0"])
503
- s.add_dependency(%q<jeweler>, [">= 0"])
504
- s.add_dependency(%q<rspec>, [">= 0"])
505
- s.add_dependency(%q<simplecov>, [">= 0"])
506
- s.add_dependency(%q<ruby-prof>, [">= 0"])
507
- end
529
+ if s.respond_to? :add_runtime_dependency then
530
+ s.add_runtime_dependency(%q<nokogiri>.freeze, [">= 1.10.8"])
531
+ s.add_runtime_dependency(%q<rubyzip>.freeze, [">= 1.3.0"])
532
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
533
+ s.add_development_dependency(%q<rake>.freeze, [">= 0"])
534
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
535
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
536
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
537
+ s.add_development_dependency(%q<ruby-prof>.freeze, [">= 0"])
538
+ s.add_development_dependency(%q<rspec_junit_formatter>.freeze, [">= 0"])
539
+ s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
508
540
  else
509
- s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
510
- s.add_dependency(%q<rubyzip>, [">= 1.1.6"])
511
- s.add_dependency(%q<bundler>, [">= 0"])
512
- s.add_dependency(%q<rake>, [">= 0"])
513
- s.add_dependency(%q<jeweler>, [">= 0"])
514
- s.add_dependency(%q<rspec>, [">= 0"])
515
- s.add_dependency(%q<simplecov>, [">= 0"])
516
- s.add_dependency(%q<ruby-prof>, [">= 0"])
541
+ s.add_dependency(%q<nokogiri>.freeze, [">= 1.10.8"])
542
+ s.add_dependency(%q<rubyzip>.freeze, [">= 1.3.0"])
543
+ s.add_dependency(%q<bundler>.freeze, [">= 0"])
544
+ s.add_dependency(%q<rake>.freeze, [">= 0"])
545
+ s.add_dependency(%q<juwelier>.freeze, [">= 0"])
546
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
547
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
548
+ s.add_dependency(%q<ruby-prof>.freeze, [">= 0"])
549
+ s.add_dependency(%q<rspec_junit_formatter>.freeze, [">= 0"])
550
+ s.add_dependency(%q<rubocop>.freeze, [">= 0"])
517
551
  end
518
552
  end
519
553
 
@@ -1,14 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'bigdecimal'
5
+ require 'rubyXL/convenience_methods/font'
6
+ require 'rubyXL/convenience_methods/cell'
3
7
 
4
8
  describe RubyXL::Cell do
5
-
6
9
  before do
7
10
  @workbook = RubyXL::Workbook.new
8
11
  @worksheet = @workbook.add_worksheet('Test Worksheet')
9
12
  @workbook.worksheets << @worksheet
10
- (0..10).each do |i|
11
- (0..10).each do |j|
13
+ 11.times do |i|
14
+ 11.times do |j|
12
15
  @worksheet.add_cell(i, j, "#{i}:#{j}")
13
16
  end
14
17
  end
@@ -29,6 +32,66 @@ describe RubyXL::Cell do
29
32
  cell = @worksheet.add_cell(r, c, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => 'Hello')))
30
33
  expect(cell.datatype).to eq(RubyXL::DataType::INLINE_STRING)
31
34
  end
35
+
36
+ it 'should properly handle dates' do
37
+ r = 3
38
+ c = 3
39
+
40
+ dt = Date.today
41
+ cell = @worksheet.add_cell(r, c, dt)
42
+ cell.set_number_format('ddd mmm dd, yyyy')
43
+ expect(cell.value).to eq(dt)
44
+
45
+ tm = DateTime.now
46
+ cell = @worksheet.add_cell(r, c, tm)
47
+ cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
48
+
49
+ # Due to rounding errors, we allow microsecond precision on DateTime.
50
+ expect((cell.value - tm).to_f).to be_within(1.0 / 86400e6).of(0)
51
+
52
+ tm = Time.now
53
+ cell = @worksheet.add_cell(r, c, tm)
54
+ cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
55
+
56
+ # Due to rounding errors, we allow microsecond precision on Time.
57
+ expect(cell.value - tm.to_datetime).to be_within(1.0 / 86400e6).of(0)
58
+
59
+ expected_date = '2020-10-15T14:00:00Z'
60
+ expected_datetime = Time.parse(expected_date).utc
61
+ raw_value = '44119.583333333328' # Obtained from parsing a xlsx file with the expected date
62
+ cell = @worksheet.add_cell(r, c, Time.now) # Force a date cell type
63
+ cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
64
+ cell.raw_value = raw_value
65
+ expect(cell.raw_value).to eq(raw_value), 'Wrong raw value'
66
+ cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
67
+
68
+ # We expect exactly the same date
69
+ expect(cell.value.to_time.utc.iso8601).to eq(expected_datetime.iso8601)
70
+ end
71
+
72
+ it 'should raise against too long String' do
73
+ ok_data = 'A' * 32767 # The limit is 32767
74
+
75
+ expect {
76
+ @worksheet.add_cell(0, 1, ok_data) # 32767 -> OK
77
+ }.not_to raise_error
78
+ expect {
79
+ # 1 longer than the limit, so an exception must be thrown.
80
+ @worksheet.add_cell(0, 2, "#{ok_data}x")
81
+ }.to raise_error(ArgumentError)
82
+ end
83
+
84
+ it 'should raise against too long RichText' do
85
+ ok_data = 'A' * 32767 # The limit is 32767
86
+
87
+ expect {
88
+ @worksheet.add_cell(0, 1, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => ok_data))) # 32767 -> OK
89
+ }.not_to raise_error
90
+ expect {
91
+ # 1 longer than the limit, so an exception must be thrown.
92
+ @worksheet.add_cell(0, 2, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => "#{ok_data}x")))
93
+ }.to raise_error(ArgumentError)
94
+ end
32
95
  end
33
96
 
34
97
  describe '.change_fill' do
@@ -145,6 +208,22 @@ describe RubyXL::Cell do
145
208
  end
146
209
  end
147
210
 
211
+ describe '.change_text_indent' do
212
+ it 'should cause the cell to have the corresponding text indent' do
213
+ expect(@cell.text_indent).to be_nil
214
+ @cell.change_text_indent(2)
215
+ expect(@cell.text_indent).to eq(2)
216
+ end
217
+
218
+ it 'should not cause other cells with the same style to have text indent' do
219
+ another_cell = @worksheet[1][0]
220
+ another_cell.style_index = @cell.style_index
221
+ expect(another_cell.text_indent).to be_nil
222
+ @cell.change_text_indent(2)
223
+ expect(another_cell.text_indent).to be_nil
224
+ end
225
+ end
226
+
148
227
  describe '.change_border_color' do
149
228
  it 'should cause cell to have a colored top border' do
150
229
  expect(@cell.get_border_color(:top)).to be_nil
@@ -231,7 +310,7 @@ describe RubyXL::Cell do
231
310
  expect(cell.value).to eq('Hello')
232
311
  end
233
312
 
234
- it "should properly handle numeric values" do
313
+ it 'should properly handle numeric values' do
235
314
  @cell.datatype = nil
236
315
  @cell.raw_value = '1'
237
316
  expect(@cell.value).to eq(1)
@@ -322,6 +401,12 @@ describe RubyXL::Cell do
322
401
  end
323
402
  end
324
403
 
404
+ context 'with RichText' do
405
+ it 'returns the value of the RichText' do
406
+ cell = RubyXL::Cell.new(is: RubyXL::RichText.new(t: RubyXL::Text.new(value: 'test')))
407
+ expect(cell.value).to eq('test')
408
+ end
409
+ end
325
410
  end
326
411
 
327
412
  describe '.change_contents' do
@@ -340,6 +425,15 @@ describe RubyXL::Cell do
340
425
  expect(@cell.formula).to be_nil
341
426
  end
342
427
 
428
+ it 'should cause cell value to match a time that is passed in' do
429
+ time = Time.parse('January 1, 2011')
430
+ @cell.change_contents(time)
431
+ expect(@cell).to receive(:is_date?).at_least(1).and_return(true)
432
+ expect(@cell.value).to eq(time.to_datetime)
433
+ expect(@cell.datatype).to be_nil
434
+ expect(@cell.formula).to be_nil
435
+ end
436
+
343
437
  it 'should case cell value to match a Float that is passed in' do
344
438
  number = 1.25
345
439
  @cell.change_contents(number)
@@ -356,8 +450,8 @@ describe RubyXL::Cell do
356
450
  expect(@cell.formula).to be_nil
357
451
  end
358
452
 
359
- it 'should case cell value to match an BigDecimal that is passed in' do
360
- number = BigDecimal.new('1234.5678')
453
+ it 'should cause cell value to match a BigDecimal that is passed in' do
454
+ number = BigDecimal('1234.5678')
361
455
  @cell.change_contents(number)
362
456
  expect(@cell.value).to eq(number)
363
457
  expect(@cell.datatype).to be_nil
@@ -444,6 +538,18 @@ describe RubyXL::Cell do
444
538
  it 'should return nil if no horizontal alignment has been specified for this cell' do
445
539
  expect(@cell.horizontal_alignment).to be_nil
446
540
  end
541
+
542
+ it 'should not create new XFs when changing alignment to already existing values' do
543
+ @cell.change_horizontal_alignment('left')
544
+ style_xf1 = @cell.style_index
545
+ @cell.change_horizontal_alignment('right')
546
+ expect(@cell.style_index).not_to eq(style_xf1)
547
+ style_xf2 = @cell.style_index
548
+ @cell.change_horizontal_alignment('left')
549
+ expect(@cell.style_index).to eq(style_xf1)
550
+ @cell.change_horizontal_alignment('right')
551
+ expect(@cell.style_index).to eq(style_xf2)
552
+ end
447
553
  end
448
554
 
449
555
  describe '.vertical_alignment' do
@@ -512,4 +618,11 @@ describe RubyXL::Cell do
512
618
  end
513
619
  end
514
620
 
621
+ describe '.text_rotation' do
622
+ it 'should correctly return the rotation for this cell' do
623
+ expect(@cell.text_rotation).to be_nil
624
+ @cell.change_text_rotation(45)
625
+ expect(@cell.text_rotation).to eq(45)
626
+ end
627
+ end
515
628
  end
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
4
+ require 'rubyXL/convenience_methods/color'
2
5
 
3
6
  describe RubyXL::Color do
4
7
  describe '.validate_color' do
@@ -6,8 +9,13 @@ describe RubyXL::Color do
6
9
  expect(RubyXL::Color.validate_color('0fbCAd')).to eq(true)
7
10
  end
8
11
 
12
+ it 'should return true if a valid hex color with alpha is passed' do
13
+ expect(RubyXL::Color.validate_color('01AbCdeF')).to eq(true)
14
+ end
15
+
9
16
  it 'should cause an error if an invalid hex color code or one with a # is passed' do
10
- expect {RubyXL::Color.validate_color('#G')}.to raise_error(RuntimeError)
17
+ expect { RubyXL::Color.validate_color('#G') }.to raise_error(RuntimeError)
18
+ expect { RubyXL::Color.validate_color('1234567') }.to raise_error(RuntimeError)
11
19
  end
12
20
  end
13
21
  end
@@ -1,25 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'English'
1
4
  require 'spec_helper'
2
5
  require 'tmpdir'
3
6
 
4
7
  describe RubyXL::Parser do
5
-
6
8
  before do
7
- @test_sheet_name = "This is a very long sheet name that should be trimmed to 31 characters for compatibility with MS Excel"
9
+ @test_sheet_name = 'This is a very long sheet name that should be trimmed ' \
10
+ 'to 31 characters for compatibility with MS Excel'
8
11
  @workbook = RubyXL::Workbook.new
9
- @workbook.add_worksheet("Test Worksheet")
12
+ @workbook.add_worksheet('Test Worksheet')
10
13
  @time = Time.at(Time.now.to_i) # Excel only saves times with 1-second precision.
11
14
  @time2 = @time + 123456
12
15
 
13
- ws = @workbook.add_worksheet("Escape Test")
14
- ws.add_cell(0, 0, "&")
15
- ws.add_cell(0, 1, "<")
16
- ws.add_cell(0, 2, ">")
17
- ws.add_cell(0, 3, "")
16
+ ws = @workbook.add_worksheet('Escape Test')
17
+ ws.add_cell(0, 0, '&')
18
+ ws.add_cell(0, 1, '<')
19
+ ws.add_cell(0, 2, '>')
20
+ ws.add_cell(0, 3, '')
18
21
 
19
- ws.add_cell(1, 0, "&")#TODO#.datatype = RubyXL::Cell::SHARED_STRING
20
- ws.add_cell(1, 1, "<")#TODO#.datatype = RubyXL::Cell::SHARED_STRING
21
- ws.add_cell(1, 2, ">")#TODO#.datatype = RubyXL::Cell::SHARED_STRING
22
- ws.add_cell(1, 3, "")
22
+ ws.add_cell(1, 0, '&') #TODO# .datatype = RubyXL::Cell::SHARED_STRING
23
+ ws.add_cell(1, 1, '<') #TODO# .datatype = RubyXL::Cell::SHARED_STRING
24
+ ws.add_cell(1, 2, '>') #TODO# .datatype = RubyXL::Cell::SHARED_STRING
25
+ ws.add_cell(1, 3, '')
23
26
 
24
27
  ws.add_cell(2, 0, 0)
25
28
  ws.add_cell(2, 1, 12345)
@@ -35,13 +38,13 @@ describe RubyXL::Parser do
35
38
 
36
39
  @workbook.add_worksheet(@test_sheet_name)
37
40
 
38
- @workbook.creator = "test creator"
39
- @workbook.modifier = "test modifier"
41
+ @workbook.creator = 'test creator'
42
+ @workbook.modifier = 'test modifier'
40
43
  @workbook.created_at = @time
41
44
  @workbook.modified_at = @time2
42
45
 
43
46
  @time_str = Time.now.to_s
44
- @file = "rubyXL-#{$$}-#{DateTime.now.strftime('%Q')}.xlsx"
47
+ @file = "rubyXL-#{$PROCESS_ID}-#{DateTime.now.strftime('%Q')}.xlsx"
45
48
  @workbook.write(@file)
46
49
  end
47
50
 
@@ -58,7 +61,7 @@ describe RubyXL::Parser do
58
61
  end
59
62
 
60
63
  it 'should cause an error if an xlsx or xlsm workbook is not passed' do
61
- expect {@workbook2 = RubyXL::Parser.parse("nonexistent_file.tmp")}.to raise_error(Zip::Error)
64
+ expect { @workbook2 = RubyXL::Parser.parse('nonexistent_file.tmp') }.to raise_error(Zip::Error)
62
65
  end
63
66
 
64
67
  it 'should construct consistent number formats' do
@@ -69,19 +72,19 @@ describe RubyXL::Parser do
69
72
 
70
73
  it 'should unescape HTML entities properly' do
71
74
  @workbook2 = RubyXL::Parser.parse(@file)
72
- expect(@workbook2["Escape Test"][0][0].value).to eq("&")
73
- expect(@workbook2["Escape Test"][0][1].value).to eq("<")
74
- expect(@workbook2["Escape Test"][0][2].value).to eq(">")
75
+ expect(@workbook2['Escape Test'][0][0].value).to eq('&')
76
+ expect(@workbook2['Escape Test'][0][1].value).to eq('<')
77
+ expect(@workbook2['Escape Test'][0][2].value).to eq('>')
75
78
 
76
- expect(@workbook2["Escape Test"][1][0].value).to eq("&")
77
- expect(@workbook2["Escape Test"][1][1].value).to eq("<")
78
- expect(@workbook2["Escape Test"][1][2].value).to eq(">")
79
+ expect(@workbook2['Escape Test'][1][0].value).to eq('&')
80
+ expect(@workbook2['Escape Test'][1][1].value).to eq('<')
81
+ expect(@workbook2['Escape Test'][1][2].value).to eq('>')
79
82
  end
80
83
 
81
84
  it 'should parse Core properties correctly' do
82
85
  @workbook2 = RubyXL::Parser.parse(@file)
83
- expect(@workbook2.creator).to eq("test creator")
84
- expect(@workbook2.modifier).to eq("test modifier")
86
+ expect(@workbook2.creator).to eq('test creator')
87
+ expect(@workbook2.modifier).to eq('test modifier')
85
88
  expect(@workbook2.created_at).to eq(@time)
86
89
  expect(@workbook2.modified_at).to eq(@time2)
87
90
  end
@@ -91,11 +94,9 @@ describe RubyXL::Parser do
91
94
  expect(@workbook2[@test_sheet_name]).to be_nil
92
95
  expect(@workbook2[@test_sheet_name[0..30]]).not_to be_nil
93
96
  end
94
-
95
97
  end
96
98
 
97
99
  describe 'parse_buffer' do
98
-
99
100
  it 'should parse string buffer correctly' do
100
101
  buffer = File.read(@file)
101
102
  expect(buffer).to be_instance_of(String)
@@ -109,10 +110,9 @@ describe RubyXL::Parser do
109
110
  f = RubyXL::Parser.parse_buffer(io)
110
111
  expect(f).to be_instance_of(RubyXL::Workbook)
111
112
  end
112
-
113
113
  end
114
114
 
115
115
  after do
116
- File.delete(@file) if File.exist?(@file)
116
+ FileUtils.rm_f(@file)
117
117
  end
118
118
  end
@@ -1,9 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe RubyXL::Reference do
4
-
5
- describe '.ind2ref + .ref2ind' do
6
- it 'should correctly return the "Excel Style" description of cells when given a row/column number' do
6
+ describe '.ind2ref' do
7
+ it "should correctly return the 'Excel Style' description of cells when given a row/column number" do
7
8
  expect(RubyXL::Reference.ind2ref(0, 26)).to eq('AA1')
8
9
  expect(RubyXL::Reference.ind2ref(99, 0)).to eq('A100')
9
10
  expect(RubyXL::Reference.ind2ref(0, 26)).to eq('AA1')
@@ -14,15 +15,50 @@ describe RubyXL::Reference do
14
15
  expect(RubyXL::Reference.ind2ref(0, 16383)).to eq('XFD1')
15
16
  end
16
17
 
17
- it 'should correctly convert back and forth between "Excel Style" and index style cell references' do
18
+ it "should correctly convert back and forth between 'Excel Style' and index style cell references" do
18
19
  0.upto(16383) do |n|
19
20
  expect(RubyXL::Reference.ref2ind(RubyXL::Reference.ind2ref(n, 16383 - n))).to eq([ n, 16383 - n ])
20
21
  end
21
22
  end
23
+ end
24
+
25
+ describe '.valid?' do
26
+ it 'should return true for valid references' do
27
+ expect(RubyXL::Reference.new('C23').valid?).to be true
28
+ end
29
+
30
+ it 'should return false for invalid references' do
31
+ expect(RubyXL::Reference.new('C2A').valid?).to be false
32
+ end
33
+ end
22
34
 
35
+ describe '.ref2ind' do
23
36
  it 'should return [-1, -1] if the Excel index is not well-formed' do
24
37
  expect(RubyXL::Reference.ref2ind('A1B')).to eq([-1, -1])
25
38
  end
26
39
  end
27
40
 
28
- end
41
+ describe '.new' do
42
+ it 'should take a string parameter' do
43
+ new_ref = RubyXL::Reference.new('C23')
44
+ expect(new_ref.single_cell?).to be true
45
+ expect(new_ref.to_s).to eq 'C23'
46
+ end
47
+
48
+ it 'should take 2 coordinate parameters' do
49
+ new_ref = RubyXL::Reference.new(11, 22)
50
+ expect(new_ref.single_cell?).to be true
51
+ expect(new_ref.to_s).to eq 'W12'
52
+ end
53
+
54
+ it 'should take 4 coordinate parameters' do
55
+ new_ref = RubyXL::Reference.new(11, 22, 33, 44)
56
+ expect(new_ref.single_cell?).to be false
57
+ expect(new_ref.to_s).to eq 'AH12:AS23'
58
+ end
59
+
60
+ it 'should take named parameters' do
61
+ expect(RubyXL::Reference.new(row_from: 44, row_to: 33, col_from: 22, col_to: 11).to_s).to eq('W45:L34')
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require 'rubyXL/convenience_methods/color'
5
+
6
+ describe RubyXL::RgbColor do
7
+ describe '.to_s' do
8
+ it 'should properly translate RGB color to string' do
9
+ rgb_color = RubyXL::RgbColor.new
10
+
11
+ rgb_color.r = 1
12
+ rgb_color.g = 2
13
+ rgb_color.b = 255
14
+
15
+ expect(rgb_color.to_s).to eq('0102ff')
16
+ end
17
+
18
+ it 'should properly translate RGB color with alpha value to string' do
19
+ rgb_color = RubyXL::RgbColor.new
20
+
21
+ rgb_color.r = 11
22
+ rgb_color.g = 22
23
+ rgb_color.b = 33
24
+ rgb_color.a = 255
25
+
26
+ expect(rgb_color.to_s).to eq('0b1621ff')
27
+ end
28
+ end
29
+ end