rubyXL 3.3.22 → 3.4.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +60 -0
  3. data/.codeclimate.yml +3 -0
  4. data/Gemfile +9 -8
  5. data/Gemfile.lock +124 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.rdoc +54 -18
  8. data/Rakefile +29 -29
  9. data/VERSION +1 -1
  10. data/lib/rubyXL/cell.rb +3 -30
  11. data/lib/rubyXL/convenience_methods/cell.rb +276 -0
  12. data/lib/rubyXL/convenience_methods/color.rb +156 -0
  13. data/lib/rubyXL/convenience_methods/font.rb +63 -0
  14. data/lib/rubyXL/convenience_methods/workbook.rb +141 -0
  15. data/lib/rubyXL/convenience_methods/worksheet.rb +714 -0
  16. data/lib/rubyXL/convenience_methods.rb +5 -1045
  17. data/lib/rubyXL/objects/border.rb +2 -5
  18. data/lib/rubyXL/objects/calculation_chain.rb +4 -4
  19. data/lib/rubyXL/objects/cell_style.rb +9 -11
  20. data/lib/rubyXL/objects/chartsheet.rb +15 -19
  21. data/lib/rubyXL/objects/color.rb +7 -7
  22. data/lib/rubyXL/objects/column_range.rb +10 -13
  23. data/lib/rubyXL/objects/comments.rb +5 -8
  24. data/lib/rubyXL/objects/connection.rb +175 -0
  25. data/lib/rubyXL/objects/container_nodes.rb +3 -7
  26. data/lib/rubyXL/objects/content_types.rb +5 -8
  27. data/lib/rubyXL/objects/data_validation.rb +4 -4
  28. data/lib/rubyXL/objects/document_properties.rb +12 -16
  29. data/lib/rubyXL/objects/extensions.rb +19 -4
  30. data/lib/rubyXL/objects/external_links.rb +30 -8
  31. data/lib/rubyXL/objects/fill.rb +6 -9
  32. data/lib/rubyXL/objects/filters.rb +17 -19
  33. data/lib/rubyXL/objects/font.rb +4 -64
  34. data/lib/rubyXL/objects/formula.rb +4 -6
  35. data/lib/rubyXL/objects/ooxml_object.rb +25 -18
  36. data/lib/rubyXL/objects/query_table.rb +104 -0
  37. data/lib/rubyXL/objects/reference.rb +6 -8
  38. data/lib/rubyXL/objects/relationships.rb +13 -13
  39. data/lib/rubyXL/objects/root.rb +0 -2
  40. data/lib/rubyXL/objects/shared_strings.rb +4 -7
  41. data/lib/rubyXL/objects/sheet_common.rb +5 -7
  42. data/lib/rubyXL/objects/sheet_data.rb +50 -16
  43. data/lib/rubyXL/objects/simple_types.rb +21 -1
  44. data/lib/rubyXL/objects/storage.rb +67 -43
  45. data/lib/rubyXL/objects/stylesheet.rb +22 -29
  46. data/lib/rubyXL/objects/text.rb +12 -14
  47. data/lib/rubyXL/objects/theme.rb +142 -126
  48. data/lib/rubyXL/objects/workbook.rb +172 -64
  49. data/lib/rubyXL/objects/worksheet.rb +143 -128
  50. data/lib/rubyXL/parser.rb +1 -3
  51. data/lib/rubyXL/worksheet.rb +83 -78
  52. data/lib/rubyXL.rb +1 -1
  53. data/rdoc/README_rdoc.html +122 -114
  54. data/rdoc/RubyXL/AExtension.html +21 -60
  55. data/rdoc/RubyXL/AExtensionStorageArea.html +12 -17
  56. data/rdoc/RubyXL/ActiveX.html +154 -0
  57. data/rdoc/RubyXL/ActiveXBinary.html +106 -0
  58. data/rdoc/RubyXL/AdjustHandleList.html +13 -19
  59. data/rdoc/RubyXL/Alignment.html +13 -19
  60. data/rdoc/RubyXL/AlternateContent.html +12 -17
  61. data/rdoc/RubyXL/Authors.html +13 -19
  62. data/rdoc/RubyXL/AutoFilter.html +13 -19
  63. data/rdoc/RubyXL/AutoFilterColumn.html +13 -19
  64. data/rdoc/RubyXL/BinaryImageFile.html +12 -25
  65. data/rdoc/RubyXL/BodyProperties.html +13 -19
  66. data/rdoc/RubyXL/BooleanNode.html +12 -17
  67. data/rdoc/RubyXL/BooleanValue.html +12 -17
  68. data/rdoc/RubyXL/Border.html +25 -84
  69. data/rdoc/RubyXL/BorderEdge.html +20 -52
  70. data/rdoc/RubyXL/Borders.html +19 -39
  71. data/rdoc/RubyXL/Break.html +13 -19
  72. data/rdoc/RubyXL/BreakList.html +13 -19
  73. data/rdoc/RubyXL/CT_AdjPoint2D.html +13 -19
  74. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +13 -19
  75. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +13 -19
  76. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +13 -19
  77. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +13 -19
  78. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +13 -19
  79. data/rdoc/RubyXL/CT_Backdrop.html +13 -19
  80. data/rdoc/RubyXL/CT_Bevel.html +13 -19
  81. data/rdoc/RubyXL/CT_BiLevelEffect.html +13 -19
  82. data/rdoc/RubyXL/CT_BlendEffect.html +13 -19
  83. data/rdoc/RubyXL/CT_Blip.html +13 -19
  84. data/rdoc/RubyXL/CT_BlipFillProperties.html +13 -19
  85. data/rdoc/RubyXL/CT_BlurEffect.html +13 -19
  86. data/rdoc/RubyXL/CT_Camera.html +13 -19
  87. data/rdoc/RubyXL/CT_Color.html +13 -19
  88. data/rdoc/RubyXL/CT_ColorChangeEffect.html +13 -19
  89. data/rdoc/RubyXL/CT_ColorMapping.html +13 -19
  90. data/rdoc/RubyXL/CT_ColorScheme.html +13 -19
  91. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +13 -19
  92. data/rdoc/RubyXL/CT_ConnectionSite.html +13 -19
  93. data/rdoc/RubyXL/CT_ConnectionSiteList.html +13 -19
  94. data/rdoc/RubyXL/CT_DashStop.html +13 -19
  95. data/rdoc/RubyXL/CT_DashStopList.html +13 -19
  96. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +13 -19
  97. data/rdoc/RubyXL/CT_DuotoneEffect.html +13 -19
  98. data/rdoc/RubyXL/CT_EffectContainer.html +13 -19
  99. data/rdoc/RubyXL/CT_EffectList.html +13 -19
  100. data/rdoc/RubyXL/CT_EffectReference.html +13 -19
  101. data/rdoc/RubyXL/CT_EffectStyleItem.html +13 -19
  102. data/rdoc/RubyXL/CT_EffectStyleList.html +13 -19
  103. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +13 -19
  104. data/rdoc/RubyXL/CT_FillEffect.html +13 -19
  105. data/rdoc/RubyXL/CT_FillOverlayEffect.html +13 -19
  106. data/rdoc/RubyXL/CT_FillStyleList.html +13 -19
  107. data/rdoc/RubyXL/CT_FlatText.html +13 -19
  108. data/rdoc/RubyXL/CT_FontCollection.html +13 -19
  109. data/rdoc/RubyXL/CT_FontReference.html +13 -19
  110. data/rdoc/RubyXL/CT_GeomGuideList.html +13 -19
  111. data/rdoc/RubyXL/CT_GlowEffect.html +13 -19
  112. data/rdoc/RubyXL/CT_GradientFillProperties.html +13 -19
  113. data/rdoc/RubyXL/CT_GradientStop.html +13 -19
  114. data/rdoc/RubyXL/CT_GradientStopList.html +13 -19
  115. data/rdoc/RubyXL/CT_HSLEffect.html +13 -19
  116. data/rdoc/RubyXL/CT_HslColor.html +13 -19
  117. data/rdoc/RubyXL/CT_Hyperlink.html +13 -19
  118. data/rdoc/RubyXL/CT_InnerShadowEffect.html +13 -19
  119. data/rdoc/RubyXL/CT_LightRig.html +13 -19
  120. data/rdoc/RubyXL/CT_LineEndProperties.html +13 -19
  121. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +13 -19
  122. data/rdoc/RubyXL/CT_LineProperties.html +13 -19
  123. data/rdoc/RubyXL/CT_LineStyleList.html +13 -19
  124. data/rdoc/RubyXL/CT_LinearShadeProperties.html +13 -19
  125. data/rdoc/RubyXL/CT_LuminanceEffect.html +13 -19
  126. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +13 -19
  127. data/rdoc/RubyXL/CT_OuterShadowEffect.html +13 -19
  128. data/rdoc/RubyXL/CT_Path2D.html +13 -19
  129. data/rdoc/RubyXL/CT_Path2DArcTo.html +13 -19
  130. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +13 -19
  131. data/rdoc/RubyXL/CT_Path2DList.html +13 -19
  132. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +13 -19
  133. data/rdoc/RubyXL/CT_Path2DTo.html +13 -19
  134. data/rdoc/RubyXL/CT_PathShadeProperties.html +13 -19
  135. data/rdoc/RubyXL/CT_PatternFillProperties.html +13 -19
  136. data/rdoc/RubyXL/CT_Point3D.html +13 -19
  137. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +13 -19
  138. data/rdoc/RubyXL/CT_PresetColor.html +13 -19
  139. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +13 -19
  140. data/rdoc/RubyXL/CT_PresetShadowEffect.html +13 -19
  141. data/rdoc/RubyXL/CT_PresetTextShape.html +13 -19
  142. data/rdoc/RubyXL/CT_ReflectionEffect.html +13 -19
  143. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +13 -19
  144. data/rdoc/RubyXL/CT_RelativeRect.html +13 -19
  145. data/rdoc/RubyXL/CT_SRgbColor.html +13 -19
  146. data/rdoc/RubyXL/CT_ScRgbColor.html +13 -19
  147. data/rdoc/RubyXL/CT_Scene3D.html +13 -19
  148. data/rdoc/RubyXL/CT_SchemeColor.html +13 -19
  149. data/rdoc/RubyXL/CT_Shape3D.html +13 -19
  150. data/rdoc/RubyXL/CT_ShapeStyle.html +13 -19
  151. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +13 -19
  152. data/rdoc/RubyXL/CT_SphereCoords.html +13 -19
  153. data/rdoc/RubyXL/CT_StretchInfoProperties.html +13 -19
  154. data/rdoc/RubyXL/CT_StyleMatrix.html +13 -19
  155. data/rdoc/RubyXL/CT_StyleMatrixReference.html +13 -19
  156. data/rdoc/RubyXL/CT_SupplementalFont.html +13 -19
  157. data/rdoc/RubyXL/CT_SystemColor.html +13 -19
  158. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +13 -19
  159. data/rdoc/RubyXL/CT_TextBlipBullet.html +13 -19
  160. data/rdoc/RubyXL/CT_TextCharBullet.html +13 -19
  161. data/rdoc/RubyXL/CT_TextCharacterProperties.html +13 -19
  162. data/rdoc/RubyXL/CT_TextFont.html +13 -19
  163. data/rdoc/RubyXL/CT_TextListStyle.html +13 -19
  164. data/rdoc/RubyXL/CT_TextNormalAutofit.html +13 -19
  165. data/rdoc/RubyXL/CT_TextParagraphProperties.html +13 -19
  166. data/rdoc/RubyXL/CT_TextSpacing.html +13 -19
  167. data/rdoc/RubyXL/CT_TextTabStop.html +13 -19
  168. data/rdoc/RubyXL/CT_TextTabStopList.html +13 -19
  169. data/rdoc/RubyXL/CT_TileInfoProperties.html +13 -19
  170. data/rdoc/RubyXL/CT_TintEffect.html +13 -19
  171. data/rdoc/RubyXL/CT_Transform2D.html +13 -19
  172. data/rdoc/RubyXL/CT_TransformEffect.html +13 -19
  173. data/rdoc/RubyXL/CT_Vector3D.html +13 -19
  174. data/rdoc/RubyXL/CT_XYAdjustHandle.html +13 -19
  175. data/rdoc/RubyXL/CalculationChain.html +17 -45
  176. data/rdoc/RubyXL/CalculationChainCell.html +13 -19
  177. data/rdoc/RubyXL/CalculationProperties.html +13 -19
  178. data/rdoc/RubyXL/Cell.html +145 -205
  179. data/rdoc/RubyXL/CellConvenienceMethods.html +255 -460
  180. data/rdoc/RubyXL/CellExt.html +13 -19
  181. data/rdoc/RubyXL/CellSmartTag.html +13 -19
  182. data/rdoc/RubyXL/CellSmartTagProperty.html +13 -19
  183. data/rdoc/RubyXL/CellSmartTags.html +13 -19
  184. data/rdoc/RubyXL/CellStyle.html +13 -19
  185. data/rdoc/RubyXL/CellStyleXFs.html +19 -39
  186. data/rdoc/RubyXL/CellStyles.html +19 -39
  187. data/rdoc/RubyXL/CellValue.html +18 -38
  188. data/rdoc/RubyXL/CellWatch.html +13 -19
  189. data/rdoc/RubyXL/CellWatches.html +13 -19
  190. data/rdoc/RubyXL/CellXFs.html +20 -42
  191. data/rdoc/RubyXL/ChartColorsFile.html +12 -25
  192. data/rdoc/RubyXL/ChartFile.html +19 -49
  193. data/rdoc/RubyXL/ChartStyleFile.html +12 -25
  194. data/rdoc/RubyXL/ChartUserShapesFile.html +12 -25
  195. data/rdoc/RubyXL/Chartsheet.html +20 -68
  196. data/rdoc/RubyXL/ChartsheetPageSetup.html +13 -19
  197. data/rdoc/RubyXL/ChartsheetProperties.html +13 -19
  198. data/rdoc/RubyXL/ChartsheetProtection.html +13 -19
  199. data/rdoc/RubyXL/ChartsheetView.html +13 -19
  200. data/rdoc/RubyXL/ChartsheetViews.html +13 -19
  201. data/rdoc/RubyXL/Color.html +29 -40
  202. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +242 -0
  203. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +279 -0
  204. data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
  205. data/rdoc/RubyXL/ColorConvenienceMethods.html +137 -0
  206. data/rdoc/RubyXL/ColorFilter.html +13 -19
  207. data/rdoc/RubyXL/ColorScale.html +13 -19
  208. data/rdoc/RubyXL/ColorSet.html +13 -19
  209. data/rdoc/RubyXL/Colors.html +13 -19
  210. data/rdoc/RubyXL/ColumnRange.html +23 -74
  211. data/rdoc/RubyXL/ColumnRanges.html +24 -83
  212. data/rdoc/RubyXL/Comment.html +13 -19
  213. data/rdoc/RubyXL/CommentList.html +13 -19
  214. data/rdoc/RubyXL/CommentsFile.html +18 -51
  215. data/rdoc/RubyXL/ConditionalFormatValue.html +13 -19
  216. data/rdoc/RubyXL/ConditionalFormatting.html +13 -19
  217. data/rdoc/RubyXL/ConditionalFormattingRule.html +13 -19
  218. data/rdoc/RubyXL/Connection.html +99 -0
  219. data/rdoc/RubyXL/ConnectionTable.html +99 -0
  220. data/rdoc/RubyXL/ConnectionTables.html +99 -0
  221. data/rdoc/RubyXL/ConnectionTextField.html +99 -0
  222. data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
  223. data/rdoc/RubyXL/Connections.html +147 -0
  224. data/rdoc/RubyXL/ContentTypeDefault.html +12 -17
  225. data/rdoc/RubyXL/ContentTypeOverride.html +12 -17
  226. data/rdoc/RubyXL/ContentTypes.html +25 -65
  227. data/rdoc/RubyXL/ControlPropertiesFile.html +14 -22
  228. data/rdoc/RubyXL/CorePropertiesFile.html +35 -171
  229. data/rdoc/RubyXL/CustomColor.html +13 -19
  230. data/rdoc/RubyXL/CustomColorList.html +13 -19
  231. data/rdoc/RubyXL/CustomFilter.html +13 -19
  232. data/rdoc/RubyXL/CustomFilters.html +13 -19
  233. data/rdoc/RubyXL/CustomGeometry.html +13 -19
  234. data/rdoc/RubyXL/CustomProperties.html +13 -19
  235. data/rdoc/RubyXL/CustomPropertiesFile.html +12 -25
  236. data/rdoc/RubyXL/CustomProperty.html +13 -19
  237. data/rdoc/RubyXL/CustomPropertyFile.html +108 -0
  238. data/rdoc/RubyXL/CustomSheetView.html +13 -19
  239. data/rdoc/RubyXL/CustomSheetViews.html +13 -19
  240. data/rdoc/RubyXL/CustomWorkbookView.html +13 -19
  241. data/rdoc/RubyXL/CustomWorkbookViews.html +13 -19
  242. data/rdoc/RubyXL/CustomXMLFile.html +12 -22
  243. data/rdoc/RubyXL/DXF.html +13 -19
  244. data/rdoc/RubyXL/DXFs.html +13 -19
  245. data/rdoc/RubyXL/DataBar.html +13 -19
  246. data/rdoc/RubyXL/DataConsolidate.html +13 -19
  247. data/rdoc/RubyXL/DataConsolidationReference.html +13 -19
  248. data/rdoc/RubyXL/DataConsolidationReferences.html +13 -19
  249. data/rdoc/RubyXL/DataType.html +11 -39
  250. data/rdoc/RubyXL/DataValidation.html +13 -19
  251. data/rdoc/RubyXL/DataValidations.html +13 -19
  252. data/rdoc/RubyXL/DateGroupItem.html +13 -19
  253. data/rdoc/RubyXL/DefinedName.html +13 -19
  254. data/rdoc/RubyXL/DefinedNameExt.html +13 -19
  255. data/rdoc/RubyXL/DefinedNames.html +13 -19
  256. data/rdoc/RubyXL/DefinedNamesExt.html +13 -19
  257. data/rdoc/RubyXL/DocumentPropertiesFile.html +22 -68
  258. data/rdoc/RubyXL/DrawingFile.html +19 -49
  259. data/rdoc/RubyXL/DynamicFilter.html +13 -19
  260. data/rdoc/RubyXL/EmbeddedControl.html +13 -19
  261. data/rdoc/RubyXL/EmbeddedControls.html +13 -19
  262. data/rdoc/RubyXL/Extension.html +13 -19
  263. data/rdoc/RubyXL/ExtensionStorageArea.html +13 -19
  264. data/rdoc/RubyXL/Extents.html +13 -19
  265. data/rdoc/RubyXL/ExternalBook.html +13 -19
  266. data/rdoc/RubyXL/ExternalLinksFile.html +19 -49
  267. data/rdoc/RubyXL/ExternalReference.html +13 -19
  268. data/rdoc/RubyXL/ExternalReferences.html +13 -19
  269. data/rdoc/RubyXL/ExtraColorSchemeList.html +13 -19
  270. data/rdoc/RubyXL/FieldItem.html +13 -19
  271. data/rdoc/RubyXL/FileRecoveryProperties.html +13 -19
  272. data/rdoc/RubyXL/FileSharing.html +13 -19
  273. data/rdoc/RubyXL/FileVersion.html +13 -19
  274. data/rdoc/RubyXL/Fill.html +19 -39
  275. data/rdoc/RubyXL/Fills.html +19 -39
  276. data/rdoc/RubyXL/FilterContainer.html +13 -19
  277. data/rdoc/RubyXL/FloatNode.html +12 -17
  278. data/rdoc/RubyXL/FloatValue.html +12 -17
  279. data/rdoc/RubyXL/Font.html +20 -544
  280. data/rdoc/RubyXL/FontConvenienceMethods.html +414 -0
  281. data/rdoc/RubyXL/FontScheme.html +13 -19
  282. data/rdoc/RubyXL/Fonts.html +19 -39
  283. data/rdoc/RubyXL/Formula.html +13 -19
  284. data/rdoc/RubyXL/FunctionGroup.html +13 -19
  285. data/rdoc/RubyXL/FunctionGroups.html +13 -19
  286. data/rdoc/RubyXL/GenericStorageObject.html +22 -84
  287. data/rdoc/RubyXL/GradientFill.html +13 -19
  288. data/rdoc/RubyXL/HeaderFooterSettings.html +13 -19
  289. data/rdoc/RubyXL/Hyperlink.html +13 -19
  290. data/rdoc/RubyXL/HyperlinkRelFile.html +12 -22
  291. data/rdoc/RubyXL/Hyperlinks.html +13 -19
  292. data/rdoc/RubyXL/IconFilter.html +13 -19
  293. data/rdoc/RubyXL/IconSet.html +13 -19
  294. data/rdoc/RubyXL/IgnoredError.html +13 -19
  295. data/rdoc/RubyXL/IgnoredErrors.html +13 -19
  296. data/rdoc/RubyXL/IndexedColors.html +13 -19
  297. data/rdoc/RubyXL/InputCells.html +13 -19
  298. data/rdoc/RubyXL/IntegerNode.html +12 -17
  299. data/rdoc/RubyXL/IntegerValue.html +12 -17
  300. data/rdoc/RubyXL/LegacyCell.html +14 -66
  301. data/rdoc/RubyXL/LegacyWorksheet.html +40 -100
  302. data/rdoc/RubyXL/MRUColors.html +13 -19
  303. data/rdoc/RubyXL/MacrosFile.html +12 -25
  304. data/rdoc/RubyXL/MergedCell.html +13 -19
  305. data/rdoc/RubyXL/MergedCells.html +13 -19
  306. data/rdoc/RubyXL/NumFmt.html +13 -19
  307. data/rdoc/RubyXL/NumberFormat.html +19 -39
  308. data/rdoc/RubyXL/NumberFormats.html +19 -45
  309. data/rdoc/RubyXL/OLEObject.html +13 -19
  310. data/rdoc/RubyXL/OLEObjectFile.html +12 -25
  311. data/rdoc/RubyXL/OLEObjects.html +13 -19
  312. data/rdoc/RubyXL/OLESize.html +13 -19
  313. data/rdoc/RubyXL/OOXMLContainerObject.html +36 -132
  314. data/rdoc/RubyXL/OOXMLIgnored.html +163 -0
  315. data/rdoc/RubyXL/OOXMLObject.html +15 -25
  316. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +92 -183
  317. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +49 -185
  318. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +48 -200
  319. data/rdoc/RubyXL/OOXMLTopLevelObject.html +37 -133
  320. data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
  321. data/rdoc/RubyXL/Offset.html +13 -19
  322. data/rdoc/RubyXL/OlapProperties.html +99 -0
  323. data/rdoc/RubyXL/OleItem.html +99 -0
  324. data/rdoc/RubyXL/OleItems.html +99 -0
  325. data/rdoc/RubyXL/OleLink.html +99 -0
  326. data/rdoc/RubyXL/OutlineProperties.html +13 -19
  327. data/rdoc/RubyXL/PageMargins.html +13 -19
  328. data/rdoc/RubyXL/PageSetup.html +13 -19
  329. data/rdoc/RubyXL/PageSetupProperties.html +13 -19
  330. data/rdoc/RubyXL/Pane.html +13 -19
  331. data/rdoc/RubyXL/Parser.html +23 -56
  332. data/rdoc/RubyXL/PatternFill.html +13 -19
  333. data/rdoc/RubyXL/PhoneticProperties.html +13 -19
  334. data/rdoc/RubyXL/PhoneticRun.html +13 -19
  335. data/rdoc/RubyXL/PivotArea.html +13 -19
  336. data/rdoc/RubyXL/PivotCache.html +13 -19
  337. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +14 -30
  338. data/rdoc/RubyXL/PivotCacheRecordsFile.html +12 -25
  339. data/rdoc/RubyXL/PivotCaches.html +13 -19
  340. data/rdoc/RubyXL/PivotReference.html +13 -19
  341. data/rdoc/RubyXL/PivotReferences.html +13 -19
  342. data/rdoc/RubyXL/PivotTableFile.html +14 -30
  343. data/rdoc/RubyXL/PivotTableSelection.html +13 -19
  344. data/rdoc/RubyXL/PresetGeometry.html +13 -19
  345. data/rdoc/RubyXL/PrintOptions.html +13 -19
  346. data/rdoc/RubyXL/PrinterSettingsFile.html +12 -25
  347. data/rdoc/RubyXL/ProtectedRange.html +13 -19
  348. data/rdoc/RubyXL/ProtectedRanges.html +13 -19
  349. data/rdoc/RubyXL/Protection.html +13 -19
  350. data/rdoc/RubyXL/QueryParameter.html +99 -0
  351. data/rdoc/RubyXL/QueryParameters.html +99 -0
  352. data/rdoc/RubyXL/QueryTable.html +155 -0
  353. data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
  354. data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
  355. data/rdoc/RubyXL/QueryTableField.html +99 -0
  356. data/rdoc/RubyXL/QueryTableFields.html +99 -0
  357. data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
  358. data/rdoc/RubyXL/RID.html +12 -17
  359. data/rdoc/RubyXL/RawOOXML.html +21 -60
  360. data/rdoc/RubyXL/Reference.html +63 -228
  361. data/rdoc/RubyXL/Relationship.html +12 -17
  362. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +14 -32
  363. data/rdoc/RubyXL/RelationshipSupport.html +26 -120
  364. data/rdoc/RubyXL/RevisionPointer.html +99 -0
  365. data/rdoc/RubyXL/RichText.html +20 -39
  366. data/rdoc/RubyXL/RichTextRun.html +18 -38
  367. data/rdoc/RubyXL/Row.html +53 -152
  368. data/rdoc/RubyXL/RowExt.html +13 -19
  369. data/rdoc/RubyXL/RunProperties.html +13 -19
  370. data/rdoc/RubyXL/Scenario.html +13 -19
  371. data/rdoc/RubyXL/Scenarios.html +13 -19
  372. data/rdoc/RubyXL/Selection.html +19 -39
  373. data/rdoc/RubyXL/ShapeGuide.html +13 -19
  374. data/rdoc/RubyXL/ShapeTextRectangle.html +13 -19
  375. data/rdoc/RubyXL/SharedStringsTable.html +38 -147
  376. data/rdoc/RubyXL/Sheet.html +13 -19
  377. data/rdoc/RubyXL/SheetCalculationProperties.html +13 -19
  378. data/rdoc/RubyXL/SheetData.html +20 -53
  379. data/rdoc/RubyXL/SheetDataExt.html +13 -19
  380. data/rdoc/RubyXL/SheetDataSet.html +13 -19
  381. data/rdoc/RubyXL/SheetMetadata.html +108 -0
  382. data/rdoc/RubyXL/SheetName.html +13 -19
  383. data/rdoc/RubyXL/SheetNames.html +13 -19
  384. data/rdoc/RubyXL/Sheets.html +13 -19
  385. data/rdoc/RubyXL/SlicerCacheFile.html +12 -25
  386. data/rdoc/RubyXL/SlicerFile.html +12 -25
  387. data/rdoc/RubyXL/SmartTagProperties.html +13 -19
  388. data/rdoc/RubyXL/SmartTagType.html +13 -19
  389. data/rdoc/RubyXL/SmartTagTypes.html +13 -19
  390. data/rdoc/RubyXL/SmartTags.html +13 -19
  391. data/rdoc/RubyXL/SortCondition.html +13 -19
  392. data/rdoc/RubyXL/SortState.html +13 -19
  393. data/rdoc/RubyXL/Sqref.html +20 -53
  394. data/rdoc/RubyXL/Stop.html +13 -19
  395. data/rdoc/RubyXL/StringNode.html +12 -17
  396. data/rdoc/RubyXL/StringNodeW3C.html +21 -54
  397. data/rdoc/RubyXL/StringValue.html +12 -17
  398. data/rdoc/RubyXL/Stylesheet.html +35 -117
  399. data/rdoc/RubyXL/TableFile.html +12 -25
  400. data/rdoc/RubyXL/TableParts.html +12 -17
  401. data/rdoc/RubyXL/TableStyle.html +13 -19
  402. data/rdoc/RubyXL/TableStyles.html +13 -19
  403. data/rdoc/RubyXL/Text.html +23 -67
  404. data/rdoc/RubyXL/TextImportSettings.html +99 -0
  405. data/rdoc/RubyXL/Theme.html +57 -62
  406. data/rdoc/RubyXL/ThemeElements.html +13 -19
  407. data/rdoc/RubyXL/ThumbnailFile.html +12 -25
  408. data/rdoc/RubyXL/Top10.html +13 -19
  409. data/rdoc/RubyXL/VMLDrawingFile.html +15 -32
  410. data/rdoc/RubyXL/Variant.html +13 -19
  411. data/rdoc/RubyXL/Vector.html +18 -38
  412. data/rdoc/RubyXL/VectorValue.html +12 -17
  413. data/rdoc/RubyXL/VisualProperties.html +13 -19
  414. data/rdoc/RubyXL/WebPublishObject.html +13 -19
  415. data/rdoc/RubyXL/WebPublishObjects.html +13 -19
  416. data/rdoc/RubyXL/WebPublishingItem.html +13 -19
  417. data/rdoc/RubyXL/WebPublishingItems.html +13 -19
  418. data/rdoc/RubyXL/WebPublishingProperties.html +13 -19
  419. data/rdoc/RubyXL/WebQueryProperties.html +99 -0
  420. data/rdoc/RubyXL/Workbook.html +487 -227
  421. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +163 -871
  422. data/rdoc/RubyXL/WorkbookProperties.html +13 -19
  423. data/rdoc/RubyXL/WorkbookProtection.html +13 -19
  424. data/rdoc/RubyXL/WorkbookRoot.html +28 -114
  425. data/rdoc/RubyXL/WorkbookView.html +13 -19
  426. data/rdoc/RubyXL/WorkbookViews.html +13 -19
  427. data/rdoc/RubyXL/Worksheet.html +93 -121
  428. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +299 -1109
  429. data/rdoc/RubyXL/WorksheetDimensions.html +13 -19
  430. data/rdoc/RubyXL/WorksheetFormatProperties.html +12 -17
  431. data/rdoc/RubyXL/WorksheetProperties.html +13 -19
  432. data/rdoc/RubyXL/WorksheetProtection.html +13 -19
  433. data/rdoc/RubyXL/WorksheetView.html +13 -19
  434. data/rdoc/RubyXL/WorksheetViews.html +13 -19
  435. data/rdoc/RubyXL/XF.html +13 -19
  436. data/rdoc/RubyXL.html +41 -296
  437. data/rdoc/created.rid +45 -38
  438. data/rdoc/css/fonts.css +6 -6
  439. data/rdoc/css/rdoc.css +55 -6
  440. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  441. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  442. data/rdoc/index.html +44 -363
  443. data/rdoc/js/darkfish.js +23 -100
  444. data/rdoc/js/navigation.js +4 -41
  445. data/rdoc/js/navigation.js.gz +0 -0
  446. data/rdoc/js/search.js +32 -31
  447. data/rdoc/js/search_index.js +1 -1
  448. data/rdoc/js/search_index.js.gz +0 -0
  449. data/rdoc/js/searcher.js +7 -6
  450. data/rdoc/js/searcher.js.gz +0 -0
  451. data/rdoc/table_of_contents.html +347 -75
  452. data/rubyXL.gemspec +78 -43
  453. data/spec/lib/cell_spec.rb +115 -4
  454. data/spec/lib/color_spec.rb +2 -1
  455. data/spec/lib/parser_spec.rb +24 -27
  456. data/spec/lib/reference_spec.rb +9 -3
  457. data/spec/lib/rgb_color_spec.rb +27 -0
  458. data/spec/lib/stylesheet_spec.rb +8 -11
  459. data/spec/lib/text_spec.rb +8 -4
  460. data/spec/lib/workbook_spec.rb +26 -5
  461. data/spec/lib/worksheet_spec.rb +873 -479
  462. data/spec/spec_helper.rb +2 -0
  463. data/test/test_parse_write.rb +15 -15
  464. metadata +65 -10
  465. data/rdoc/js/jquery.js +0 -4
@@ -4,20 +4,23 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.3.22</title>
7
+ <title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.25</title>
8
8
 
9
9
  <script type="text/javascript">
10
10
  var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
11
12
  </script>
12
13
 
13
- <script src="../js/jquery.js"></script>
14
- <script src="../js/darkfish.js"></script>
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
15
19
 
16
20
  <link href="../css/fonts.css" rel="stylesheet">
17
21
  <link href="../css/rdoc.css" rel="stylesheet">
18
22
 
19
23
 
20
-
21
24
  <body id="top" role="document" class="module">
22
25
  <nav role="navigation">
23
26
  <div id="project-navigation">
@@ -57,148 +60,81 @@
57
60
 
58
61
 
59
62
 
60
- <!-- Method Quickref -->
63
+
64
+ <!-- Method Quickref -->
61
65
  <div id="method-list-section" class="nav-section">
62
66
  <h3>Methods</h3>
63
67
 
64
68
  <ul class="link-list" role="directory">
65
-
69
+ <li ><a href="#method-i-add_validation_list">#add_validation_list</a>
66
70
  <li ><a href="#method-i-change_column_alignment">#change_column_alignment</a>
67
-
68
71
  <li ><a href="#method-i-change_column_bold">#change_column_bold</a>
69
-
70
72
  <li ><a href="#method-i-change_column_border">#change_column_border</a>
71
-
72
73
  <li ><a href="#method-i-change_column_border_color">#change_column_border_color</a>
73
-
74
74
  <li ><a href="#method-i-change_column_fill">#change_column_fill</a>
75
-
76
75
  <li ><a href="#method-i-change_column_font">#change_column_font</a>
77
-
78
76
  <li ><a href="#method-i-change_column_font_color">#change_column_font_color</a>
79
-
80
77
  <li ><a href="#method-i-change_column_font_name">#change_column_font_name</a>
81
-
82
78
  <li ><a href="#method-i-change_column_font_size">#change_column_font_size</a>
83
-
84
79
  <li ><a href="#method-i-change_column_horizontal_alignment">#change_column_horizontal_alignment</a>
85
-
86
80
  <li ><a href="#method-i-change_column_italics">#change_column_italics</a>
87
-
88
81
  <li ><a href="#method-i-change_column_strikethrough">#change_column_strikethrough</a>
89
-
90
82
  <li ><a href="#method-i-change_column_underline">#change_column_underline</a>
91
-
92
83
  <li ><a href="#method-i-change_column_vertical_alignment">#change_column_vertical_alignment</a>
93
-
94
84
  <li ><a href="#method-i-change_column_width">#change_column_width</a>
95
-
96
85
  <li ><a href="#method-i-change_column_width_raw">#change_column_width_raw</a>
97
-
98
86
  <li ><a href="#method-i-change_row_alignment">#change_row_alignment</a>
99
-
100
87
  <li ><a href="#method-i-change_row_bold">#change_row_bold</a>
101
-
102
88
  <li ><a href="#method-i-change_row_border">#change_row_border</a>
103
-
104
89
  <li ><a href="#method-i-change_row_border_color">#change_row_border_color</a>
105
-
106
90
  <li ><a href="#method-i-change_row_fill">#change_row_fill</a>
107
-
108
91
  <li ><a href="#method-i-change_row_font">#change_row_font</a>
109
-
110
92
  <li ><a href="#method-i-change_row_font_color">#change_row_font_color</a>
111
-
112
93
  <li ><a href="#method-i-change_row_font_name">#change_row_font_name</a>
113
-
114
94
  <li ><a href="#method-i-change_row_font_size">#change_row_font_size</a>
115
-
116
95
  <li ><a href="#method-i-change_row_height">#change_row_height</a>
117
-
118
96
  <li ><a href="#method-i-change_row_horizontal_alignment">#change_row_horizontal_alignment</a>
119
-
120
97
  <li ><a href="#method-i-change_row_italics">#change_row_italics</a>
121
-
122
98
  <li ><a href="#method-i-change_row_strikethrough">#change_row_strikethrough</a>
123
-
124
99
  <li ><a href="#method-i-change_row_underline">#change_row_underline</a>
125
-
126
100
  <li ><a href="#method-i-change_row_vertical_alignment">#change_row_vertical_alignment</a>
127
-
128
101
  <li ><a href="#method-i-column_font">#column_font</a>
129
-
130
102
  <li ><a href="#method-i-delete_cell">#delete_cell</a>
131
-
132
103
  <li ><a href="#method-i-delete_column">#delete_column</a>
133
-
134
104
  <li ><a href="#method-i-delete_row">#delete_row</a>
135
-
136
105
  <li ><a href="#method-i-get_col_style">#get_col_style</a>
137
-
138
106
  <li ><a href="#method-i-get_cols_style_index">#get_cols_style_index</a>
139
-
140
107
  <li ><a href="#method-i-get_column_alignment">#get_column_alignment</a>
141
-
142
108
  <li ><a href="#method-i-get_column_border">#get_column_border</a>
143
-
144
109
  <li ><a href="#method-i-get_column_border_color">#get_column_border_color</a>
145
-
146
110
  <li ><a href="#method-i-get_column_fill">#get_column_fill</a>
147
-
148
111
  <li ><a href="#method-i-get_column_font_color">#get_column_font_color</a>
149
-
150
112
  <li ><a href="#method-i-get_column_font_name">#get_column_font_name</a>
151
-
152
113
  <li ><a href="#method-i-get_column_font_size">#get_column_font_size</a>
153
-
154
114
  <li ><a href="#method-i-get_column_width">#get_column_width</a>
155
-
156
115
  <li ><a href="#method-i-get_column_width_raw">#get_column_width_raw</a>
157
-
158
116
  <li ><a href="#method-i-get_row_alignment">#get_row_alignment</a>
159
-
160
117
  <li ><a href="#method-i-get_row_border">#get_row_border</a>
161
-
162
118
  <li ><a href="#method-i-get_row_border_color">#get_row_border_color</a>
163
-
164
119
  <li ><a href="#method-i-get_row_fill">#get_row_fill</a>
165
-
166
120
  <li ><a href="#method-i-get_row_font_color">#get_row_font_color</a>
167
-
168
121
  <li ><a href="#method-i-get_row_font_name">#get_row_font_name</a>
169
-
170
122
  <li ><a href="#method-i-get_row_font_size">#get_row_font_size</a>
171
-
172
123
  <li ><a href="#method-i-get_row_height">#get_row_height</a>
173
-
174
124
  <li ><a href="#method-i-get_row_style">#get_row_style</a>
175
-
176
125
  <li ><a href="#method-i-insert_cell">#insert_cell</a>
177
-
178
126
  <li ><a href="#method-i-insert_column">#insert_column</a>
179
-
180
127
  <li ><a href="#method-i-insert_row">#insert_row</a>
181
-
182
128
  <li ><a href="#method-i-is_column_bolded">#is_column_bolded</a>
183
-
184
129
  <li ><a href="#method-i-is_column_italicized">#is_column_italicized</a>
185
-
186
130
  <li ><a href="#method-i-is_column_struckthrough">#is_column_struckthrough</a>
187
-
188
131
  <li ><a href="#method-i-is_column_underlined">#is_column_underlined</a>
189
-
190
132
  <li ><a href="#method-i-is_row_bolded">#is_row_bolded</a>
191
-
192
133
  <li ><a href="#method-i-is_row_italicized">#is_row_italicized</a>
193
-
194
134
  <li ><a href="#method-i-is_row_struckthrough">#is_row_struckthrough</a>
195
-
196
135
  <li ><a href="#method-i-is_row_underlined">#is_row_underlined</a>
197
-
198
136
  <li ><a href="#method-i-merge_cells">#merge_cells</a>
199
-
200
137
  <li ><a href="#method-i-row_font">#row_font</a>
201
-
202
138
  </ul>
203
139
  </div>
204
140
 
@@ -214,90 +150,80 @@
214
150
 
215
151
  </section>
216
152
 
217
-
218
-
219
-
220
153
  <section id="5Buntitled-5D" class="documentation-section">
221
-
222
154
 
223
-
224
155
 
225
-
226
156
  <section class="constants-list">
227
157
  <header>
228
158
  <h3>Constants</h3>
229
159
  </header>
230
160
  <dl>
231
-
232
161
  <dt id="BOLD">BOLD
233
-
234
162
  <dd>
235
-
236
-
237
163
  <dt id="COLOR">COLOR
238
-
239
164
  <dd>
240
-
241
-
242
165
  <dt id="ITALICS">ITALICS
243
-
244
166
  <dd>
245
-
246
-
247
167
  <dt id="NAME">NAME
248
-
249
168
  <dd>
250
-
251
-
252
169
  <dt id="SIZE">SIZE
253
-
254
170
  <dd>
255
-
256
-
257
171
  <dt id="STRIKETHROUGH">STRIKETHROUGH
258
-
259
172
  <dd>
260
-
261
-
262
173
  <dt id="UNDERLINE">UNDERLINE
263
-
264
174
  <dd>
265
-
266
-
267
175
  </dl>
268
176
  </section>
269
-
270
177
 
271
-
272
178
 
273
-
179
+
274
180
  <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
275
181
  <header>
276
182
  <h3>Public Instance Methods</h3>
277
183
  </header>
278
184
 
279
-
185
+ <div id="method-i-add_validation_list" class="method-detail ">
186
+ <div class="method-heading">
187
+ <span class="method-name">add_validation_list</span><span
188
+ class="method-args">(ref, list_arr)</span>
189
+ <span class="method-click-advice">click to toggle source</span>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+
194
+
195
+ <div class="method-source-code" id="add_validation_list-source">
196
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 700</span>
197
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_validation_list</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">list_arr</span>)
198
+ <span class="ruby-comment"># &quot;Any double quote characters in the value should be escaped with another double quote.</span>
199
+ <span class="ruby-comment"># If the value does not contain a comma, newline or double quote, then the String value should be returned unchanged.</span>
200
+ <span class="ruby-comment"># If the value contains a comma, newline or double quote, then the String value should be returned enclosed in double quotes.&quot;</span>
201
+ <span class="ruby-identifier">expr</span> = <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list_arr</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&#39;&quot;&#39;</span>, <span class="ruby-string">&#39;&quot;&quot;&#39;</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;,&#39;</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span>
202
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidations</span>.<span class="ruby-identifier">new</span>
203
+ <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator">&lt;&lt;</span>
204
+ <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidation</span>.<span class="ruby-identifier">new</span>({<span class="ruby-value">:sqref</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ref</span>),
205
+ <span class="ruby-value">:formula1</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Formula</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:expression</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">expr</span>),
206
+ <span class="ruby-value">:type</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-string">&#39;list&#39;</span>})
207
+ <span class="ruby-keyword">end</span></pre>
208
+ </div>
209
+ </div>
210
+
211
+
212
+ </div>
213
+
280
214
  <div id="method-i-change_column_alignment" class="method-detail ">
281
-
282
215
  <div class="method-heading">
283
216
  <span class="method-name">change_column_alignment</span><span
284
- class="method-args">(column_index, &block)</span>
285
-
217
+ class="method-args">(column_index, &amp;block)</span>
286
218
  <span class="method-click-advice">click to toggle source</span>
287
-
288
219
  </div>
289
-
290
220
 
291
221
  <div class="method-description">
292
222
 
293
-
294
-
295
-
296
223
 
297
-
298
224
  <div class="method-source-code" id="change_column_alignment-source">
299
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 785</span>
300
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
225
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 675</span>
226
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
301
227
  <span class="ruby-identifier">validate_workbook</span>
302
228
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
303
229
 
@@ -306,119 +232,86 @@
306
232
  <span class="ruby-identifier">change_column_width</span>(<span class="ruby-identifier">column_index</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">nil?</span>
307
233
 
308
234
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
235
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
309
236
  <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
310
237
  <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
311
238
  <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
312
239
  }
313
240
  <span class="ruby-keyword">end</span></pre>
314
241
  </div>
315
-
316
242
  </div>
317
243
 
318
-
319
244
 
320
-
321
245
  </div>
322
246
 
323
-
324
247
  <div id="method-i-change_column_bold" class="method-detail ">
325
-
326
248
  <div class="method-heading">
327
249
  <span class="method-name">change_column_bold</span><span
328
250
  class="method-args">(column_index, bolded = false)</span>
329
-
330
251
  <span class="method-click-advice">click to toggle source</span>
331
-
332
252
  </div>
333
-
334
253
 
335
254
  <div class="method-description">
336
255
 
337
-
338
-
339
-
340
256
 
341
-
342
257
  <div class="method-source-code" id="change_column_bold-source">
343
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 718</span>
344
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_bold</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
258
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 606</span>
259
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_bold</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
345
260
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
346
261
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
347
262
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
348
263
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
349
264
  <span class="ruby-keyword">end</span></pre>
350
265
  </div>
351
-
352
266
  </div>
353
267
 
354
-
355
268
 
356
-
357
269
  </div>
358
270
 
359
-
360
271
  <div id="method-i-change_column_border" class="method-detail ">
361
-
362
272
  <div class="method-heading">
363
273
  <span class="method-name">change_column_border</span><span
364
274
  class="method-args">(column_index, direction, weight)</span>
365
-
366
275
  <span class="method-click-advice">click to toggle source</span>
367
-
368
276
  </div>
369
-
370
277
 
371
278
  <div class="method-description">
372
279
 
373
-
374
-
375
-
376
280
 
377
-
378
281
  <div class="method-source-code" id="change_column_border-source">
379
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 747</span>
380
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_border</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
282
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 635</span>
283
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_border</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
381
284
  <span class="ruby-identifier">validate_workbook</span>
382
285
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
383
286
 
384
287
  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
385
288
 
386
289
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
290
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
387
291
  <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
388
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
292
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
293
+ <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
389
294
  }
390
295
  <span class="ruby-keyword">end</span></pre>
391
296
  </div>
392
-
393
297
  </div>
394
298
 
395
-
396
299
 
397
-
398
300
  </div>
399
301
 
400
-
401
302
  <div id="method-i-change_column_border_color" class="method-detail ">
402
-
403
303
  <div class="method-heading">
404
304
  <span class="method-name">change_column_border_color</span><span
405
305
  class="method-args">(column_index, direction, color)</span>
406
-
407
306
  <span class="method-click-advice">click to toggle source</span>
408
-
409
307
  </div>
410
-
411
308
 
412
309
  <div class="method-description">
413
310
 
414
-
415
-
416
-
417
311
 
418
-
419
312
  <div class="method-source-code" id="change_column_border_color-source">
420
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 759</span>
421
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_border_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
313
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 649</span>
314
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_border_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
422
315
  <span class="ruby-identifier">validate_workbook</span>
423
316
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
424
317
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)
@@ -431,36 +324,24 @@
431
324
  }
432
325
  <span class="ruby-keyword">end</span></pre>
433
326
  </div>
434
-
435
327
  </div>
436
328
 
437
-
438
329
 
439
-
440
330
  </div>
441
331
 
442
-
443
332
  <div id="method-i-change_column_fill" class="method-detail ">
444
-
445
333
  <div class="method-heading">
446
334
  <span class="method-name">change_column_fill</span><span
447
- class="method-args">(column_index, color_code = 'ffffff')</span>
448
-
335
+ class="method-args">(column_index, color_code = &#39;ffffff&#39;)</span>
449
336
  <span class="method-click-advice">click to toggle source</span>
450
-
451
337
  </div>
452
-
453
338
 
454
339
  <div class="method-description">
455
340
 
456
-
457
-
458
-
459
341
 
460
-
461
342
  <div class="method-source-code" id="change_column_fill-source">
462
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 515</span>
463
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_fill</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">color_code</span> = <span class="ruby-string">&#39;ffffff&#39;</span>)
343
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 401</span>
344
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_fill</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">color_code</span> = <span class="ruby-string">&#39;ffffff&#39;</span>)
464
345
  <span class="ruby-identifier">validate_workbook</span>
465
346
  <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color_code</span>)
466
347
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
@@ -468,42 +349,31 @@
468
349
  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">color_code</span>)
469
350
 
470
351
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
352
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
471
353
  <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
472
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">color_code</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>
354
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
355
+ <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">color_code</span>)
473
356
  }
474
357
  <span class="ruby-keyword">end</span></pre>
475
358
  </div>
476
-
477
359
  </div>
478
360
 
479
-
480
361
 
481
-
482
362
  </div>
483
363
 
484
-
485
364
  <div id="method-i-change_column_font" class="method-detail ">
486
-
487
365
  <div class="method-heading">
488
366
  <span class="method-name">change_column_font</span><span
489
367
  class="method-args">(column_index, change_type, arg, font, xf)</span>
490
-
491
368
  <span class="method-click-advice">click to toggle source</span>
492
-
493
369
  </div>
494
-
495
370
 
496
371
  <div class="method-description">
497
-
498
- <p>Helper method to update the fonts and cell styles array main method to
499
- change font, called from each separate font mutator method</p>
500
-
501
-
372
+ <p>Helper method to update the fonts and cell styles array main method to change font, called from each separate font mutator method</p>
502
373
 
503
-
504
374
  <div class="method-source-code" id="change_column_font-source">
505
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 675</span>
506
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
375
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 563</span>
376
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
507
377
  <span class="ruby-identifier">validate_workbook</span>
508
378
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
509
379
 
@@ -516,36 +386,24 @@ change font, called from each separate font mutator method</p>
516
386
  }
517
387
  <span class="ruby-keyword">end</span></pre>
518
388
  </div>
519
-
520
389
  </div>
521
390
 
522
-
523
391
 
524
-
525
392
  </div>
526
393
 
527
-
528
394
  <div id="method-i-change_column_font_color" class="method-detail ">
529
-
530
395
  <div class="method-heading">
531
396
  <span class="method-name">change_column_font_color</span><span
532
- class="method-args">(column_index, font_color='000000')</span>
533
-
397
+ class="method-args">(column_index, font_color=&#39;000000&#39;)</span>
534
398
  <span class="method-click-advice">click to toggle source</span>
535
-
536
399
  </div>
537
-
538
400
 
539
401
  <div class="method-description">
540
402
 
541
-
542
-
543
-
544
403
 
545
-
546
404
  <div class="method-source-code" id="change_column_font_color-source">
547
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 702</span>
548
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_color</span>=<span class="ruby-string">&#39;000000&#39;</span>)
405
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 590</span>
406
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_color</span>=<span class="ruby-string">&#39;000000&#39;</span>)
549
407
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
550
408
 
551
409
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
@@ -554,316 +412,207 @@ change font, called from each separate font mutator method</p>
554
412
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">COLOR</span>, <span class="ruby-identifier">font_color</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
555
413
  <span class="ruby-keyword">end</span></pre>
556
414
  </div>
557
-
558
415
  </div>
559
416
 
560
-
561
417
 
562
-
563
418
  </div>
564
419
 
565
-
566
420
  <div id="method-i-change_column_font_name" class="method-detail ">
567
-
568
421
  <div class="method-heading">
569
422
  <span class="method-name">change_column_font_name</span><span
570
- class="method-args">(column_index = 0, font_name = 'Verdana')</span>
571
-
423
+ class="method-args">(column_index = 0, font_name = &#39;Verdana&#39;)</span>
572
424
  <span class="method-click-advice">click to toggle source</span>
573
-
574
425
  </div>
575
-
576
426
 
577
427
  <div class="method-description">
578
428
 
579
-
580
-
581
-
582
429
 
583
-
584
430
  <div class="method-source-code" id="change_column_font_name-source">
585
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 688</span>
586
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font_name</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">&#39;Verdana&#39;</span>)
431
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 576</span>
432
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_name</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">&#39;Verdana&#39;</span>)
587
433
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
588
434
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
589
435
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
590
436
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
591
437
  <span class="ruby-keyword">end</span></pre>
592
438
  </div>
593
-
594
439
  </div>
595
440
 
596
-
597
441
 
598
-
599
442
  </div>
600
443
 
601
-
602
444
  <div id="method-i-change_column_font_size" class="method-detail ">
603
-
604
445
  <div class="method-heading">
605
446
  <span class="method-name">change_column_font_size</span><span
606
447
  class="method-args">(column_index, font_size=10)</span>
607
-
608
448
  <span class="method-click-advice">click to toggle source</span>
609
-
610
449
  </div>
611
-
612
450
 
613
451
  <div class="method-description">
614
452
 
615
-
616
-
617
-
618
453
 
619
-
620
454
  <div class="method-source-code" id="change_column_font_size-source">
621
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 695</span>
622
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_font_size</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
455
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 583</span>
456
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_size</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
623
457
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
624
458
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
625
459
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
626
460
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
627
461
  <span class="ruby-keyword">end</span></pre>
628
462
  </div>
629
-
630
463
  </div>
631
464
 
632
-
633
465
 
634
-
635
466
  </div>
636
467
 
637
-
638
468
  <div id="method-i-change_column_horizontal_alignment" class="method-detail ">
639
-
640
469
  <div class="method-heading">
641
470
  <span class="method-name">change_column_horizontal_alignment</span><span
642
- class="method-args">(column_index, alignment = 'center')</span>
643
-
471
+ class="method-args">(column_index, alignment = &#39;center&#39;)</span>
644
472
  <span class="method-click-advice">click to toggle source</span>
645
-
646
473
  </div>
647
-
648
474
 
649
475
  <div class="method-description">
650
476
 
651
-
652
-
653
-
654
477
 
655
-
656
478
  <div class="method-source-code" id="change_column_horizontal_alignment-source">
657
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 739</span>
658
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_horizontal_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
479
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 627</span>
480
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_horizontal_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
659
481
  <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
660
482
  <span class="ruby-keyword">end</span></pre>
661
483
  </div>
662
-
663
484
  </div>
664
485
 
665
-
666
486
 
667
-
668
487
  </div>
669
488
 
670
-
671
489
  <div id="method-i-change_column_italics" class="method-detail ">
672
-
673
490
  <div class="method-heading">
674
491
  <span class="method-name">change_column_italics</span><span
675
492
  class="method-args">(column_index, italicized = false)</span>
676
-
677
493
  <span class="method-click-advice">click to toggle source</span>
678
-
679
494
  </div>
680
-
681
495
 
682
496
  <div class="method-description">
683
497
 
684
-
685
-
686
-
687
498
 
688
-
689
499
  <div class="method-source-code" id="change_column_italics-source">
690
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 711</span>
691
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_italics</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
500
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 599</span>
501
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_italics</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
692
502
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
693
503
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
694
504
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
695
505
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
696
506
  <span class="ruby-keyword">end</span></pre>
697
507
  </div>
698
-
699
508
  </div>
700
509
 
701
-
702
510
 
703
-
704
511
  </div>
705
512
 
706
-
707
513
  <div id="method-i-change_column_strikethrough" class="method-detail ">
708
-
709
514
  <div class="method-heading">
710
515
  <span class="method-name">change_column_strikethrough</span><span
711
516
  class="method-args">(column_index, struckthrough=false)</span>
712
-
713
517
  <span class="method-click-advice">click to toggle source</span>
714
-
715
518
  </div>
716
-
717
519
 
718
520
  <div class="method-description">
719
521
 
720
-
721
-
722
-
723
522
 
724
-
725
523
  <div class="method-source-code" id="change_column_strikethrough-source">
726
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 732</span>
727
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_strikethrough</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
524
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 620</span>
525
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_strikethrough</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
728
526
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
729
527
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
730
528
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
731
529
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
732
530
  <span class="ruby-keyword">end</span></pre>
733
531
  </div>
734
-
735
532
  </div>
736
533
 
737
-
738
534
 
739
-
740
535
  </div>
741
536
 
742
-
743
537
  <div id="method-i-change_column_underline" class="method-detail ">
744
-
745
538
  <div class="method-heading">
746
539
  <span class="method-name">change_column_underline</span><span
747
540
  class="method-args">(column_index, underlined = false)</span>
748
-
749
541
  <span class="method-click-advice">click to toggle source</span>
750
-
751
542
  </div>
752
-
753
543
 
754
544
  <div class="method-description">
755
545
 
756
-
757
-
758
-
759
546
 
760
-
761
547
  <div class="method-source-code" id="change_column_underline-source">
762
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 725</span>
763
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_underline</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">underlined</span> = <span class="ruby-keyword">false</span>)
548
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 613</span>
549
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_underline</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">underlined</span> = <span class="ruby-keyword">false</span>)
764
550
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
765
551
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
766
552
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
767
553
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
768
554
  <span class="ruby-keyword">end</span></pre>
769
555
  </div>
770
-
771
556
  </div>
772
557
 
773
-
774
558
 
775
-
776
559
  </div>
777
560
 
778
-
779
561
  <div id="method-i-change_column_vertical_alignment" class="method-detail ">
780
-
781
562
  <div class="method-heading">
782
563
  <span class="method-name">change_column_vertical_alignment</span><span
783
- class="method-args">(column_index, alignment = 'center')</span>
784
-
564
+ class="method-args">(column_index, alignment = &#39;center&#39;)</span>
785
565
  <span class="method-click-advice">click to toggle source</span>
786
-
787
566
  </div>
788
-
789
567
 
790
568
  <div class="method-description">
791
569
 
792
-
793
-
794
-
795
570
 
796
-
797
571
  <div class="method-source-code" id="change_column_vertical_alignment-source">
798
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 743</span>
799
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_vertical_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
572
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 631</span>
573
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_vertical_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
800
574
  <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
801
575
  <span class="ruby-keyword">end</span></pre>
802
576
  </div>
803
-
804
577
  </div>
805
578
 
806
-
807
579
 
808
-
809
580
  </div>
810
581
 
811
-
812
582
  <div id="method-i-change_column_width" class="method-detail ">
813
-
814
583
  <div class="method-heading">
815
584
  <span class="method-name">change_column_width</span><span
816
585
  class="method-args">(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)</span>
817
-
818
586
  <span class="method-click-advice">click to toggle source</span>
819
-
820
587
  </div>
821
-
822
588
 
823
589
  <div class="method-description">
824
-
825
- <p>Get column width measured in number of digits, as per <a
826
- href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>
827
-
828
-
590
+ <p>Get column width measured in number of digits, as per <a href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>
829
591
 
830
-
831
592
  <div class="method-source-code" id="change_column_width-source">
832
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 498</span>
833
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_width</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width_in_chars</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span>)
593
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 384</span>
594
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_width</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width_in_chars</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span>)
834
595
  <span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, ((<span class="ruby-identifier">width_in_chars</span> <span class="ruby-operator">+</span> (<span class="ruby-value">5.0</span> <span class="ruby-operator">/</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_DIGIT_WIDTH</span>)) <span class="ruby-operator">*</span> <span class="ruby-value">256</span>).<span class="ruby-identifier">to_i</span> <span class="ruby-operator">/</span> <span class="ruby-value">256.0</span>)
835
596
  <span class="ruby-keyword">end</span></pre>
836
597
  </div>
837
-
838
598
  </div>
839
599
 
840
-
841
600
 
842
-
843
601
  </div>
844
602
 
845
-
846
603
  <div id="method-i-change_column_width_raw" class="method-detail ">
847
-
848
604
  <div class="method-heading">
849
605
  <span class="method-name">change_column_width_raw</span><span
850
606
  class="method-args">(column_index, width)</span>
851
-
852
607
  <span class="method-click-advice">click to toggle source</span>
853
-
854
608
  </div>
855
-
856
609
 
857
610
  <div class="method-description">
858
-
859
611
  <p>Set raw column width value</p>
860
-
861
-
862
612
 
863
-
864
613
  <div class="method-source-code" id="change_column_width_raw-source">
865
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 488</span>
866
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width</span>)
614
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 374</span>
615
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width</span>)
867
616
  <span class="ruby-identifier">validate_workbook</span>
868
617
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
869
618
  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
@@ -871,36 +620,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
871
620
  <span class="ruby-identifier">range</span>.<span class="ruby-identifier">custom_width</span> = <span class="ruby-keyword">true</span>
872
621
  <span class="ruby-keyword">end</span></pre>
873
622
  </div>
874
-
875
623
  </div>
876
624
 
877
-
878
625
 
879
-
880
626
  </div>
881
627
 
882
-
883
628
  <div id="method-i-change_row_alignment" class="method-detail ">
884
-
885
629
  <div class="method-heading">
886
630
  <span class="method-name">change_row_alignment</span><span
887
- class="method-args">(row, &block)</span>
888
-
631
+ class="method-args">(row, &amp;block)</span>
889
632
  <span class="method-click-advice">click to toggle source</span>
890
-
891
633
  </div>
892
-
893
634
 
894
635
  <div class="method-description">
895
636
 
896
-
897
-
898
-
899
637
 
900
-
901
638
  <div class="method-source-code" id="change_row_alignment-source">
902
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 772</span>
903
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
639
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 662</span>
640
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
904
641
  <span class="ruby-identifier">validate_workbook</span>
905
642
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
906
643
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
@@ -913,72 +650,48 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
913
650
  }
914
651
  <span class="ruby-keyword">end</span></pre>
915
652
  </div>
916
-
917
653
  </div>
918
654
 
919
-
920
655
 
921
-
922
656
  </div>
923
657
 
924
-
925
658
  <div id="method-i-change_row_bold" class="method-detail ">
926
-
927
659
  <div class="method-heading">
928
660
  <span class="method-name">change_row_bold</span><span
929
661
  class="method-args">(row = 0, bolded = false)</span>
930
-
931
662
  <span class="method-click-advice">click to toggle source</span>
932
-
933
663
  </div>
934
-
935
664
 
936
665
  <div class="method-description">
937
666
 
938
-
939
-
940
-
941
667
 
942
-
943
668
  <div class="method-source-code" id="change_row_bold-source">
944
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 643</span>
945
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_bold</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
669
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 531</span>
670
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_bold</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
946
671
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
947
672
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
948
673
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
949
674
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>)
950
675
  <span class="ruby-keyword">end</span></pre>
951
676
  </div>
952
-
953
677
  </div>
954
678
 
955
-
956
679
 
957
-
958
680
  </div>
959
681
 
960
-
961
682
  <div id="method-i-change_row_border" class="method-detail ">
962
-
963
683
  <div class="method-heading">
964
684
  <span class="method-name">change_row_border</span><span
965
685
  class="method-args">(row, direction, weight)</span>
966
-
967
686
  <span class="method-click-advice">click to toggle source</span>
968
-
969
687
  </div>
970
-
971
688
 
972
689
  <div class="method-description">
973
690
 
974
-
975
-
976
-
977
691
 
978
-
979
692
  <div class="method-source-code" id="change_row_border-source">
980
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 569</span>
981
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
693
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 457</span>
694
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
982
695
  <span class="ruby-identifier">validate_workbook</span>
983
696
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
984
697
 
@@ -989,36 +702,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
989
702
  }
990
703
  <span class="ruby-keyword">end</span></pre>
991
704
  </div>
992
-
993
705
  </div>
994
706
 
995
-
996
707
 
997
-
998
708
  </div>
999
709
 
1000
-
1001
710
  <div id="method-i-change_row_border_color" class="method-detail ">
1002
-
1003
711
  <div class="method-heading">
1004
712
  <span class="method-name">change_row_border_color</span><span
1005
- class="method-args">(row, direction, color = '000000')</span>
1006
-
713
+ class="method-args">(row, direction, color = &#39;000000&#39;)</span>
1007
714
  <span class="method-click-advice">click to toggle source</span>
1008
-
1009
715
  </div>
1010
-
1011
716
 
1012
717
  <div class="method-description">
1013
718
 
1014
-
1015
-
1016
-
1017
719
 
1018
-
1019
720
  <div class="method-source-code" id="change_row_border_color-source">
1020
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 580</span>
1021
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span> = <span class="ruby-string">&#39;000000&#39;</span>)
721
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 468</span>
722
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span> = <span class="ruby-string">&#39;000000&#39;</span>)
1022
723
  <span class="ruby-identifier">validate_workbook</span>
1023
724
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1024
725
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)
@@ -1030,36 +731,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
1030
731
  }
1031
732
  <span class="ruby-keyword">end</span></pre>
1032
733
  </div>
1033
-
1034
734
  </div>
1035
735
 
1036
-
1037
736
 
1038
-
1039
737
  </div>
1040
738
 
1041
-
1042
739
  <div id="method-i-change_row_fill" class="method-detail ">
1043
-
1044
740
  <div class="method-heading">
1045
741
  <span class="method-name">change_row_fill</span><span
1046
- class="method-args">(row_index = 0, rgb = 'ffffff')</span>
1047
-
742
+ class="method-args">(row_index = 0, rgb = &#39;ffffff&#39;)</span>
1048
743
  <span class="method-click-advice">click to toggle source</span>
1049
-
1050
744
  </div>
1051
-
1052
745
 
1053
746
  <div class="method-description">
1054
747
 
1055
-
1056
-
1057
-
1058
748
 
1059
-
1060
749
  <div class="method-source-code" id="change_row_fill-source">
1061
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 592</span>
1062
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_fill</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">rgb</span> = <span class="ruby-string">&#39;ffffff&#39;</span>)
750
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 480</span>
751
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_fill</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">rgb</span> = <span class="ruby-string">&#39;ffffff&#39;</span>)
1063
752
  <span class="ruby-identifier">validate_workbook</span>
1064
753
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
1065
754
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">rgb</span>)
@@ -1068,40 +757,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
1068
757
  <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">rgb</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
1069
758
  <span class="ruby-keyword">end</span></pre>
1070
759
  </div>
1071
-
1072
760
  </div>
1073
761
 
1074
-
1075
762
 
1076
-
1077
763
  </div>
1078
764
 
1079
-
1080
765
  <div id="method-i-change_row_font" class="method-detail ">
1081
-
1082
766
  <div class="method-heading">
1083
767
  <span class="method-name">change_row_font</span><span
1084
768
  class="method-args">(row_index, change_type, arg, font)</span>
1085
-
1086
769
  <span class="method-click-advice">click to toggle source</span>
1087
-
1088
770
  </div>
1089
-
1090
771
 
1091
772
  <div class="method-description">
1092
-
1093
- <p>Helper method to update the row styles array change_type - <a
1094
- href="WorksheetConvenienceMethods.html#NAME">NAME</a> or <a
1095
- href="WorksheetConvenienceMethods.html#SIZE">SIZE</a> or <a
1096
- href="WorksheetConvenienceMethods.html#COLOR">COLOR</a> etc main method to
1097
- change font, called from each separate font mutator method</p>
1098
-
1099
-
773
+ <p>Helper method to update the row styles array change_type - <a href="WorksheetConvenienceMethods.html#NAME"><code>NAME</code></a> or <a href="WorksheetConvenienceMethods.html#SIZE"><code>SIZE</code></a> or <a href="WorksheetConvenienceMethods.html#COLOR"><code>COLOR</code></a> etc main method to change font, called from each separate font mutator method</p>
1100
774
 
1101
-
1102
775
  <div class="method-source-code" id="change_row_font-source">
1103
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 604</span>
1104
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>)
776
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 492</span>
777
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>)
1105
778
  <span class="ruby-identifier">validate_workbook</span>
1106
779
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
1107
780
 
@@ -1111,36 +784,24 @@ change font, called from each separate font mutator method</p>
1111
784
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">font_switch</span>(<span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
1112
785
  <span class="ruby-keyword">end</span></pre>
1113
786
  </div>
1114
-
1115
787
  </div>
1116
788
 
1117
-
1118
789
 
1119
-
1120
790
  </div>
1121
791
 
1122
-
1123
792
  <div id="method-i-change_row_font_color" class="method-detail ">
1124
-
1125
793
  <div class="method-heading">
1126
794
  <span class="method-name">change_row_font_color</span><span
1127
- class="method-args">(row = 0, font_color = '000000')</span>
1128
-
795
+ class="method-args">(row = 0, font_color = &#39;000000&#39;)</span>
1129
796
  <span class="method-click-advice">click to toggle source</span>
1130
-
1131
797
  </div>
1132
-
1133
798
 
1134
799
  <div class="method-description">
1135
800
 
1136
-
1137
-
1138
-
1139
801
 
1140
-
1141
802
  <div class="method-source-code" id="change_row_font_color-source">
1142
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 628</span>
1143
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_color</span> = <span class="ruby-string">&#39;000000&#39;</span>)
803
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 516</span>
804
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_color</span> = <span class="ruby-string">&#39;000000&#39;</span>)
1144
805
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1145
806
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
1146
807
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
@@ -1148,108 +809,72 @@ change font, called from each separate font mutator method</p>
1148
809
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">COLOR</span>, <span class="ruby-identifier">font_color</span>, <span class="ruby-identifier">font</span>)
1149
810
  <span class="ruby-keyword">end</span></pre>
1150
811
  </div>
1151
-
1152
812
  </div>
1153
813
 
1154
-
1155
814
 
1156
-
1157
815
  </div>
1158
816
 
1159
-
1160
817
  <div id="method-i-change_row_font_name" class="method-detail ">
1161
-
1162
818
  <div class="method-heading">
1163
819
  <span class="method-name">change_row_font_name</span><span
1164
- class="method-args">(row = 0, font_name = 'Verdana')</span>
1165
-
820
+ class="method-args">(row = 0, font_name = &#39;Verdana&#39;)</span>
1166
821
  <span class="method-click-advice">click to toggle source</span>
1167
-
1168
822
  </div>
1169
-
1170
823
 
1171
824
  <div class="method-description">
1172
825
 
1173
-
1174
-
1175
-
1176
826
 
1177
-
1178
827
  <div class="method-source-code" id="change_row_font_name-source">
1179
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 614</span>
1180
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">&#39;Verdana&#39;</span>)
828
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 502</span>
829
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">&#39;Verdana&#39;</span>)
1181
830
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1182
831
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
1183
832
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
1184
833
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>)
1185
834
  <span class="ruby-keyword">end</span></pre>
1186
835
  </div>
1187
-
1188
836
  </div>
1189
837
 
1190
-
1191
838
 
1192
-
1193
839
  </div>
1194
840
 
1195
-
1196
841
  <div id="method-i-change_row_font_size" class="method-detail ">
1197
-
1198
842
  <div class="method-heading">
1199
843
  <span class="method-name">change_row_font_size</span><span
1200
844
  class="method-args">(row = 0, font_size=10)</span>
1201
-
1202
845
  <span class="method-click-advice">click to toggle source</span>
1203
-
1204
846
  </div>
1205
-
1206
847
 
1207
848
  <div class="method-description">
1208
849
 
1209
-
1210
-
1211
-
1212
850
 
1213
-
1214
851
  <div class="method-source-code" id="change_row_font_size-source">
1215
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 621</span>
1216
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
852
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 509</span>
853
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
1217
854
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1218
855
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
1219
856
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
1220
857
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>)
1221
858
  <span class="ruby-keyword">end</span></pre>
1222
859
  </div>
1223
-
1224
860
  </div>
1225
861
 
1226
-
1227
862
 
1228
-
1229
863
  </div>
1230
864
 
1231
-
1232
865
  <div id="method-i-change_row_height" class="method-detail ">
1233
-
1234
866
  <div class="method-heading">
1235
867
  <span class="method-name">change_row_height</span><span
1236
868
  class="method-args">(row = 0, height = 10)</span>
1237
-
1238
869
  <span class="method-click-advice">click to toggle source</span>
1239
-
1240
870
  </div>
1241
-
1242
871
 
1243
872
  <div class="method-description">
1244
873
 
1245
-
1246
-
1247
-
1248
874
 
1249
-
1250
875
  <div class="method-source-code" id="change_row_height-source">
1251
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 664</span>
1252
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">height</span> = <span class="ruby-value">10</span>)
876
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 552</span>
877
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">height</span> = <span class="ruby-value">10</span>)
1253
878
  <span class="ruby-identifier">validate_workbook</span>
1254
879
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1255
880
 
@@ -1258,251 +883,165 @@ change font, called from each separate font mutator method</p>
1258
883
  <span class="ruby-identifier">c</span>.<span class="ruby-identifier">custom_height</span> = <span class="ruby-keyword">true</span>
1259
884
  <span class="ruby-keyword">end</span></pre>
1260
885
  </div>
1261
-
1262
886
  </div>
1263
887
 
1264
-
1265
888
 
1266
-
1267
889
  </div>
1268
890
 
1269
-
1270
891
  <div id="method-i-change_row_horizontal_alignment" class="method-detail ">
1271
-
1272
892
  <div class="method-heading">
1273
893
  <span class="method-name">change_row_horizontal_alignment</span><span
1274
- class="method-args">(row = 0, alignment = 'center')</span>
1275
-
894
+ class="method-args">(row = 0, alignment = &#39;center&#39;)</span>
1276
895
  <span class="method-click-advice">click to toggle source</span>
1277
-
1278
896
  </div>
1279
-
1280
897
 
1281
898
  <div class="method-description">
1282
899
 
1283
-
1284
-
1285
-
1286
900
 
1287
-
1288
901
  <div class="method-source-code" id="change_row_horizontal_alignment-source">
1289
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 557</span>
1290
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_horizontal_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
902
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 445</span>
903
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_horizontal_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
1291
904
  <span class="ruby-identifier">validate_workbook</span>
1292
905
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
1293
906
  <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
1294
907
  <span class="ruby-keyword">end</span></pre>
1295
908
  </div>
1296
-
1297
909
  </div>
1298
910
 
1299
-
1300
911
 
1301
-
1302
912
  </div>
1303
913
 
1304
-
1305
914
  <div id="method-i-change_row_italics" class="method-detail ">
1306
-
1307
915
  <div class="method-heading">
1308
916
  <span class="method-name">change_row_italics</span><span
1309
917
  class="method-args">(row = 0, italicized = false)</span>
1310
-
1311
918
  <span class="method-click-advice">click to toggle source</span>
1312
-
1313
919
  </div>
1314
-
1315
920
 
1316
921
  <div class="method-description">
1317
922
 
1318
-
1319
-
1320
-
1321
923
 
1322
-
1323
924
  <div class="method-source-code" id="change_row_italics-source">
1324
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 636</span>
1325
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_italics</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
925
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 524</span>
926
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_italics</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
1326
927
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1327
928
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
1328
929
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
1329
930
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>)
1330
931
  <span class="ruby-keyword">end</span></pre>
1331
932
  </div>
1332
-
1333
933
  </div>
1334
934
 
1335
-
1336
935
 
1337
-
1338
936
  </div>
1339
937
 
1340
-
1341
938
  <div id="method-i-change_row_strikethrough" class="method-detail ">
1342
-
1343
939
  <div class="method-heading">
1344
940
  <span class="method-name">change_row_strikethrough</span><span
1345
941
  class="method-args">(row = 0, struckthrough=false)</span>
1346
-
1347
942
  <span class="method-click-advice">click to toggle source</span>
1348
-
1349
943
  </div>
1350
-
1351
944
 
1352
945
  <div class="method-description">
1353
946
 
1354
-
1355
-
1356
-
1357
947
 
1358
-
1359
948
  <div class="method-source-code" id="change_row_strikethrough-source">
1360
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 657</span>
1361
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_strikethrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
949
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 545</span>
950
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_strikethrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
1362
951
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1363
952
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
1364
953
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
1365
954
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>)
1366
955
  <span class="ruby-keyword">end</span></pre>
1367
956
  </div>
1368
-
1369
957
  </div>
1370
958
 
1371
-
1372
959
 
1373
-
1374
960
  </div>
1375
961
 
1376
-
1377
962
  <div id="method-i-change_row_underline" class="method-detail ">
1378
-
1379
963
  <div class="method-heading">
1380
964
  <span class="method-name">change_row_underline</span><span
1381
965
  class="method-args">(row = 0, underlined=false)</span>
1382
-
1383
966
  <span class="method-click-advice">click to toggle source</span>
1384
-
1385
967
  </div>
1386
-
1387
968
 
1388
969
  <div class="method-description">
1389
970
 
1390
-
1391
-
1392
-
1393
971
 
1394
-
1395
972
  <div class="method-source-code" id="change_row_underline-source">
1396
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 650</span>
1397
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_underline</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">underlined</span>=<span class="ruby-keyword">false</span>)
973
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 538</span>
974
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_underline</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">underlined</span>=<span class="ruby-keyword">false</span>)
1398
975
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
1399
976
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
1400
977
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
1401
978
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>)
1402
979
  <span class="ruby-keyword">end</span></pre>
1403
980
  </div>
1404
-
1405
981
  </div>
1406
982
 
1407
-
1408
983
 
1409
-
1410
984
  </div>
1411
985
 
1412
-
1413
986
  <div id="method-i-change_row_vertical_alignment" class="method-detail ">
1414
-
1415
987
  <div class="method-heading">
1416
988
  <span class="method-name">change_row_vertical_alignment</span><span
1417
- class="method-args">(row = 0, alignment = 'center')</span>
1418
-
989
+ class="method-args">(row = 0, alignment = &#39;center&#39;)</span>
1419
990
  <span class="method-click-advice">click to toggle source</span>
1420
-
1421
991
  </div>
1422
-
1423
992
 
1424
993
  <div class="method-description">
1425
994
 
1426
-
1427
-
1428
-
1429
995
 
1430
-
1431
996
  <div class="method-source-code" id="change_row_vertical_alignment-source">
1432
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 563</span>
1433
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_vertical_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
997
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 451</span>
998
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_vertical_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
1434
999
  <span class="ruby-identifier">validate_workbook</span>
1435
1000
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
1436
1001
  <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
1437
1002
  <span class="ruby-keyword">end</span></pre>
1438
1003
  </div>
1439
-
1440
1004
  </div>
1441
1005
 
1442
-
1443
1006
 
1444
-
1445
1007
  </div>
1446
1008
 
1447
-
1448
1009
  <div id="method-i-column_font" class="method-detail ">
1449
-
1450
1010
  <div class="method-heading">
1451
1011
  <span class="method-name">column_font</span><span
1452
1012
  class="method-args">(col)</span>
1453
-
1454
1013
  <span class="method-click-advice">click to toggle source</span>
1455
-
1456
1014
  </div>
1457
-
1458
1015
 
1459
1016
  <div class="method-description">
1460
1017
 
1461
-
1462
-
1463
-
1464
1018
 
1465
-
1466
1019
  <div class="method-source-code" id="column_font-source">
1467
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 544</span>
1468
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
1020
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 432</span>
1021
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">column_font</span>(<span class="ruby-identifier">col</span>)
1469
1022
  <span class="ruby-identifier">validate_workbook</span>
1470
1023
 
1471
1024
  <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)].<span class="ruby-identifier">font_id</span>]
1472
1025
  <span class="ruby-keyword">end</span></pre>
1473
1026
  </div>
1474
-
1475
1027
  </div>
1476
1028
 
1477
-
1478
1029
 
1479
-
1480
1030
  </div>
1481
1031
 
1482
-
1483
1032
  <div id="method-i-delete_cell" class="method-detail ">
1484
-
1485
1033
  <div class="method-heading">
1486
1034
  <span class="method-name">delete_cell</span><span
1487
1035
  class="method-args">(row_index = 0, column_index=0, shift=nil)</span>
1488
-
1489
1036
  <span class="method-click-advice">click to toggle source</span>
1490
-
1491
1037
  </div>
1492
-
1493
1038
 
1494
1039
  <div class="method-description">
1495
-
1496
- <p>by default, only sets cell to nil if :left is specified, method will shift
1497
- row contents to the right of the deleted cell to the left if :up is
1498
- specified, method will shift column contents below the deleted cell upward</p>
1499
-
1500
-
1040
+ <p>by default, only sets cell to nil if :left is specified, method will shift row contents to the right of the deleted cell to the left if :up is specified, method will shift column contents below the deleted cell upward</p>
1501
1041
 
1502
-
1503
1042
  <div class="method-source-code" id="delete_cell-source">
1504
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 228</span>
1505
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_cell</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">shift</span>=<span class="ruby-keyword">nil</span>)
1043
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 40</span>
1044
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_cell</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">shift</span>=<span class="ruby-keyword">nil</span>)
1506
1045
  <span class="ruby-identifier">validate_workbook</span>
1507
1046
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
1508
1047
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
@@ -1517,8 +1056,14 @@ specified, method will shift column contents below the deleted cell upward</p>
1517
1056
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">delete_cell_shift_left</span>(<span class="ruby-identifier">column_index</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>
1518
1057
  <span class="ruby-keyword">when</span> <span class="ruby-value">:up</span> <span class="ruby-keyword">then</span>
1519
1058
  (<span class="ruby-identifier">row_index</span><span class="ruby-operator">...</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
1520
- <span class="ruby-identifier">c</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>].<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>] = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>].<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
1521
- <span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
1059
+ <span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>]
1060
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
1061
+ <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-keyword">nil</span>
1062
+ <span class="ruby-keyword">else</span>
1063
+ <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">index</span>)
1064
+ <span class="ruby-identifier">c</span> = <span class="ruby-identifier">new_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>] = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
1065
+ <span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> = (<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
1066
+ <span class="ruby-keyword">end</span>
1522
1067
  }
1523
1068
  <span class="ruby-keyword">else</span>
1524
1069
  <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;invalid shift option&#39;</span>
@@ -1527,82 +1072,77 @@ specified, method will shift column contents below the deleted cell upward</p>
1527
1072
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">old_cell</span>
1528
1073
  <span class="ruby-keyword">end</span></pre>
1529
1074
  </div>
1530
-
1531
1075
  </div>
1532
1076
 
1533
-
1534
1077
 
1535
-
1536
1078
  </div>
1537
1079
 
1538
-
1539
1080
  <div id="method-i-delete_column" class="method-detail ">
1540
-
1541
1081
  <div class="method-heading">
1542
1082
  <span class="method-name">delete_column</span><span
1543
1083
  class="method-args">(column_index = 0)</span>
1544
-
1545
1084
  <span class="method-click-advice">click to toggle source</span>
1546
-
1547
1085
  </div>
1548
-
1549
1086
 
1550
1087
  <div class="method-description">
1551
1088
 
1552
-
1553
-
1554
-
1555
1089
 
1556
-
1557
1090
  <div class="method-source-code" id="delete_column-source">
1558
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 337</span>
1559
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
1091
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 204</span>
1092
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
1560
1093
  <span class="ruby-identifier">validate_workbook</span>
1561
1094
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
1562
1095
 
1563
1096
  <span class="ruby-comment"># Delete column</span>
1564
- <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">column_index</span>) }
1097
+ <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">column_index</span>) }
1565
1098
 
1566
1099
  <span class="ruby-comment"># Update column numbers for cells to the right of the deleted column</span>
1567
1100
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span>, <span class="ruby-identifier">row_index</span><span class="ruby-operator">|</span>
1101
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
1568
1102
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span>, <span class="ruby-identifier">ci</span><span class="ruby-operator">|</span>
1569
1103
  <span class="ruby-identifier">c</span>.<span class="ruby-identifier">column</span> = <span class="ruby-identifier">ci</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
1570
1104
  }
1571
1105
  }
1572
1106
 
1573
1107
  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">range</span><span class="ruby-operator">|</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">delete_column</span>(<span class="ruby-identifier">column_index</span>) }
1108
+
1109
+ <span class="ruby-comment"># Update row number of merged cells</span>
1110
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span>
1111
+
1112
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">column_index</span><span class="ruby-operator">..</span><span class="ruby-identifier">column_index</span>) }
1113
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
1114
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">column_index</span>
1115
+
1116
+ <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">column_index</span>
1117
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
1118
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span>,
1119
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span>,
1120
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
1121
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
1122
+ )
1123
+ }
1124
+
1125
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">single_cell?</span> }
1574
1126
  <span class="ruby-keyword">end</span></pre>
1575
1127
  </div>
1576
-
1577
1128
  </div>
1578
1129
 
1579
-
1580
1130
 
1581
-
1582
1131
  </div>
1583
1132
 
1584
-
1585
1133
  <div id="method-i-delete_row" class="method-detail ">
1586
-
1587
1134
  <div class="method-heading">
1588
1135
  <span class="method-name">delete_row</span><span
1589
1136
  class="method-args">(row_index=0)</span>
1590
-
1591
1137
  <span class="method-click-advice">click to toggle source</span>
1592
-
1593
1138
  </div>
1594
-
1595
1139
 
1596
1140
  <div class="method-description">
1597
1141
 
1598
-
1599
-
1600
-
1601
1142
 
1602
-
1603
1143
  <div class="method-source-code" id="delete_row-source">
1604
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 293</span>
1605
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_row</span>(<span class="ruby-identifier">row_index</span>=<span class="ruby-value">0</span>)
1144
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 126</span>
1145
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_row</span>(<span class="ruby-identifier">row_index</span>=<span class="ruby-value">0</span>)
1606
1146
  <span class="ruby-identifier">validate_workbook</span>
1607
1147
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
1608
1148
 
@@ -1614,144 +1154,113 @@ specified, method will shift column contents below the deleted cell upward</p>
1614
1154
  <span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
1615
1155
  }
1616
1156
 
1157
+ <span class="ruby-comment"># Update row number of merged cells</span>
1158
+ <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
1159
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">row_index</span><span class="ruby-operator">..</span><span class="ruby-identifier">row_index</span>) }
1160
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
1161
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">row_index</span>
1162
+
1163
+ <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">row_index</span>
1164
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
1165
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
1166
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
1167
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span>,
1168
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span>,
1169
+ )
1170
+ }
1171
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">single_cell?</span> }
1172
+ <span class="ruby-keyword">end</span>
1173
+
1617
1174
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">deleted</span>
1618
1175
  <span class="ruby-keyword">end</span></pre>
1619
1176
  </div>
1620
-
1621
1177
  </div>
1622
1178
 
1623
-
1624
1179
 
1625
-
1626
1180
  </div>
1627
1181
 
1628
-
1629
1182
  <div id="method-i-get_col_style" class="method-detail ">
1630
-
1631
1183
  <div class="method-heading">
1632
1184
  <span class="method-name">get_col_style</span><span
1633
1185
  class="method-args">(column_index)</span>
1634
-
1635
1186
  <span class="method-click-advice">click to toggle source</span>
1636
-
1637
1187
  </div>
1638
-
1639
1188
 
1640
1189
  <div class="method-description">
1641
-
1642
1190
  <p>Helper method to get the style index for a column</p>
1643
-
1644
-
1645
1191
 
1646
-
1647
1192
  <div class="method-source-code" id="get_col_style-source">
1648
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 503</span>
1649
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
1193
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 389</span>
1194
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
1650
1195
  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
1651
1196
  (<span class="ruby-identifier">range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
1652
1197
  <span class="ruby-keyword">end</span></pre>
1653
1198
  </div>
1654
-
1655
1199
  </div>
1656
1200
 
1657
-
1658
1201
 
1659
-
1660
1202
  </div>
1661
1203
 
1662
-
1663
1204
  <div id="method-i-get_cols_style_index" class="method-detail ">
1664
-
1665
1205
  <div class="method-heading">
1666
1206
  <span class="method-name">get_cols_style_index</span><span
1667
1207
  class="method-args">(column_index)</span>
1668
-
1669
1208
  <span class="method-click-advice">click to toggle source</span>
1670
-
1671
1209
  </div>
1672
-
1673
1210
 
1674
1211
  <div class="method-description">
1675
1212
 
1676
-
1677
-
1678
-
1679
1213
 
1680
-
1681
1214
  <div class="method-source-code" id="get_cols_style_index-source">
1682
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 429</span>
1683
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
1215
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 315</span>
1216
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
1684
1217
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
1685
1218
  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
1686
1219
  (<span class="ruby-identifier">range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
1687
1220
  <span class="ruby-keyword">end</span></pre>
1688
1221
  </div>
1689
-
1690
1222
  </div>
1691
1223
 
1692
-
1693
1224
 
1694
-
1695
1225
  </div>
1696
1226
 
1697
-
1698
1227
  <div id="method-i-get_column_alignment" class="method-detail ">
1699
-
1700
1228
  <div class="method-heading">
1701
1229
  <span class="method-name">get_column_alignment</span><span
1702
1230
  class="method-args">(col, type)</span>
1703
-
1704
1231
  <span class="method-click-advice">click to toggle source</span>
1705
-
1706
1232
  </div>
1707
-
1708
1233
 
1709
1234
  <div class="method-description">
1710
1235
 
1711
-
1712
-
1713
-
1714
1236
 
1715
-
1716
1237
  <div class="method-source-code" id="get_column_alignment-source">
1717
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 550</span>
1718
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">type</span>)
1238
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 438</span>
1239
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">type</span>)
1719
1240
  <span class="ruby-identifier">validate_workbook</span>
1720
1241
 
1721
1242
  <span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
1722
1243
  <span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>)
1723
1244
  <span class="ruby-keyword">end</span></pre>
1724
1245
  </div>
1725
-
1726
1246
  </div>
1727
1247
 
1728
-
1729
1248
 
1730
-
1731
1249
  </div>
1732
1250
 
1733
-
1734
1251
  <div id="method-i-get_column_border" class="method-detail ">
1735
-
1736
1252
  <div class="method-heading">
1737
1253
  <span class="method-name">get_column_border</span><span
1738
1254
  class="method-args">(col, border_direction)</span>
1739
-
1740
1255
  <span class="method-click-advice">click to toggle source</span>
1741
-
1742
1256
  </div>
1743
-
1744
1257
 
1745
1258
  <div class="method-description">
1746
1259
 
1747
-
1748
-
1749
-
1750
1260
 
1751
-
1752
1261
  <div class="method-source-code" id="get_column_border-source">
1753
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 528</span>
1754
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
1262
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 416</span>
1263
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
1755
1264
  <span class="ruby-identifier">validate_workbook</span>
1756
1265
 
1757
1266
  <span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
@@ -1759,36 +1268,24 @@ specified, method will shift column contents below the deleted cell upward</p>
1759
1268
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
1760
1269
  <span class="ruby-keyword">end</span></pre>
1761
1270
  </div>
1762
-
1763
1271
  </div>
1764
1272
 
1765
-
1766
1273
 
1767
-
1768
1274
  </div>
1769
1275
 
1770
-
1771
1276
  <div id="method-i-get_column_border_color" class="method-detail ">
1772
-
1773
1277
  <div class="method-heading">
1774
1278
  <span class="method-name">get_column_border_color</span><span
1775
1279
  class="method-args">(col, border_direction)</span>
1776
-
1777
1280
  <span class="method-click-advice">click to toggle source</span>
1778
-
1779
1281
  </div>
1780
-
1781
1282
 
1782
1283
  <div class="method-description">
1783
1284
 
1784
-
1785
-
1786
-
1787
1285
 
1788
-
1789
1286
  <div class="method-source-code" id="get_column_border_color-source">
1790
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 536</span>
1791
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_color</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
1287
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 424</span>
1288
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_border_color</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
1792
1289
  <span class="ruby-identifier">validate_workbook</span>
1793
1290
 
1794
1291
  <span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
@@ -1796,210 +1293,137 @@ specified, method will shift column contents below the deleted cell upward</p>
1796
1293
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>)
1797
1294
  <span class="ruby-keyword">end</span></pre>
1798
1295
  </div>
1799
-
1800
1296
  </div>
1801
1297
 
1802
-
1803
1298
 
1804
-
1805
1299
  </div>
1806
1300
 
1807
-
1808
1301
  <div id="method-i-get_column_fill" class="method-detail ">
1809
-
1810
1302
  <div class="method-heading">
1811
1303
  <span class="method-name">get_column_fill</span><span
1812
1304
  class="method-args">(col=0)</span>
1813
-
1814
1305
  <span class="method-click-advice">click to toggle source</span>
1815
-
1816
1306
  </div>
1817
-
1818
1307
 
1819
1308
  <div class="method-description">
1820
1309
 
1821
-
1822
-
1823
-
1824
1310
 
1825
-
1826
1311
  <div class="method-source-code" id="get_column_fill-source">
1827
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 508</span>
1828
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_fill</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
1312
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 394</span>
1313
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_fill</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
1829
1314
  <span class="ruby-identifier">validate_workbook</span>
1830
1315
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">col</span>)
1831
1316
 
1832
1317
  <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">get_fill_color</span>(<span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">col</span>))
1833
1318
  <span class="ruby-keyword">end</span></pre>
1834
1319
  </div>
1835
-
1836
1320
  </div>
1837
1321
 
1838
-
1839
1322
 
1840
-
1841
1323
  </div>
1842
1324
 
1843
-
1844
1325
  <div id="method-i-get_column_font_color" class="method-detail ">
1845
-
1846
1326
  <div class="method-heading">
1847
1327
  <span class="method-name">get_column_font_color</span><span
1848
1328
  class="method-args">(col = 0)</span>
1849
-
1850
1329
  <span class="method-click-advice">click to toggle source</span>
1851
-
1852
1330
  </div>
1853
-
1854
1331
 
1855
1332
  <div class="method-description">
1856
1333
 
1857
-
1858
-
1859
-
1860
1334
 
1861
-
1862
1335
  <div class="method-source-code" id="get_column_font_color-source">
1863
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 445</span>
1864
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_color</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1336
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 331</span>
1337
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_color</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1865
1338
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
1866
1339
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_rgb_color</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;000000&#39;</span>)
1867
1340
  <span class="ruby-keyword">end</span></pre>
1868
1341
  </div>
1869
-
1870
1342
  </div>
1871
1343
 
1872
-
1873
1344
 
1874
-
1875
1345
  </div>
1876
1346
 
1877
-
1878
1347
  <div id="method-i-get_column_font_name" class="method-detail ">
1879
-
1880
1348
  <div class="method-heading">
1881
1349
  <span class="method-name">get_column_font_name</span><span
1882
1350
  class="method-args">(col = 0)</span>
1883
-
1884
1351
  <span class="method-click-advice">click to toggle source</span>
1885
-
1886
1352
  </div>
1887
-
1888
1353
 
1889
1354
  <div class="method-description">
1890
1355
 
1891
-
1892
-
1893
-
1894
1356
 
1895
-
1896
1357
  <div class="method-source-code" id="get_column_font_name-source">
1897
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 435</span>
1898
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_name</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1358
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 321</span>
1359
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_name</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1899
1360
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
1900
1361
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
1901
1362
  <span class="ruby-keyword">end</span></pre>
1902
1363
  </div>
1903
-
1904
1364
  </div>
1905
1365
 
1906
-
1907
1366
 
1908
-
1909
1367
  </div>
1910
1368
 
1911
-
1912
1369
  <div id="method-i-get_column_font_size" class="method-detail ">
1913
-
1914
1370
  <div class="method-heading">
1915
1371
  <span class="method-name">get_column_font_size</span><span
1916
1372
  class="method-args">(col = 0)</span>
1917
-
1918
1373
  <span class="method-click-advice">click to toggle source</span>
1919
-
1920
1374
  </div>
1921
-
1922
1375
 
1923
1376
  <div class="method-description">
1924
1377
 
1925
-
1926
-
1927
-
1928
1378
 
1929
-
1930
1379
  <div class="method-source-code" id="get_column_font_size-source">
1931
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 440</span>
1932
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_size</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1380
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 326</span>
1381
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_size</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1933
1382
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
1934
1383
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
1935
1384
  <span class="ruby-keyword">end</span></pre>
1936
1385
  </div>
1937
-
1938
1386
  </div>
1939
1387
 
1940
-
1941
1388
 
1942
-
1943
1389
  </div>
1944
1390
 
1945
-
1946
1391
  <div id="method-i-get_column_width" class="method-detail ">
1947
-
1948
1392
  <div class="method-heading">
1949
1393
  <span class="method-name">get_column_width</span><span
1950
1394
  class="method-args">(column_index = 0)</span>
1951
-
1952
1395
  <span class="method-click-advice">click to toggle source</span>
1953
-
1954
1396
  </div>
1955
-
1956
1397
 
1957
1398
  <div class="method-description">
1958
-
1959
- <p>Get column width measured in number of digits, as per <a
1960
- href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>
1961
-
1962
-
1399
+ <p>Get column width measured in number of digits, as per <a href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>
1963
1400
 
1964
-
1965
1401
  <div class="method-source-code" id="get_column_width-source">
1966
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 481</span>
1967
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_width</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
1402
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 367</span>
1403
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_width</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
1968
1404
  <span class="ruby-identifier">width</span> = <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>)
1969
1405
  <span class="ruby-keyword">return</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">width</span>.<span class="ruby-identifier">nil?</span>
1970
1406
  (<span class="ruby-identifier">width</span> <span class="ruby-operator">-</span> (<span class="ruby-value">5.0</span> <span class="ruby-operator">/</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_DIGIT_WIDTH</span>)).<span class="ruby-identifier">round</span>
1971
1407
  <span class="ruby-keyword">end</span></pre>
1972
1408
  </div>
1973
-
1974
1409
  </div>
1975
1410
 
1976
-
1977
1411
 
1978
-
1979
1412
  </div>
1980
1413
 
1981
-
1982
1414
  <div id="method-i-get_column_width_raw" class="method-detail ">
1983
-
1984
1415
  <div class="method-heading">
1985
1416
  <span class="method-name">get_column_width_raw</span><span
1986
1417
  class="method-args">(column_index = 0)</span>
1987
-
1988
1418
  <span class="method-click-advice">click to toggle source</span>
1989
-
1990
1419
  </div>
1991
-
1992
1420
 
1993
1421
  <div class="method-description">
1994
-
1995
1422
  <p>Get raw column width value as stored in the file</p>
1996
-
1997
-
1998
1423
 
1999
-
2000
1424
  <div class="method-source-code" id="get_column_width_raw-source">
2001
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 471</span>
2002
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
1425
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 357</span>
1426
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
2003
1427
  <span class="ruby-identifier">validate_workbook</span>
2004
1428
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
2005
1429
 
@@ -2007,36 +1431,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
2007
1431
  <span class="ruby-identifier">range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span>
2008
1432
  <span class="ruby-keyword">end</span></pre>
2009
1433
  </div>
2010
-
2011
1434
  </div>
2012
1435
 
2013
-
2014
1436
 
2015
-
2016
1437
  </div>
2017
1438
 
2018
-
2019
1439
  <div id="method-i-get_row_alignment" class="method-detail ">
2020
-
2021
1440
  <div class="method-heading">
2022
1441
  <span class="method-name">get_row_alignment</span><span
2023
1442
  class="method-args">(row, is_horizontal)</span>
2024
-
2025
1443
  <span class="method-click-advice">click to toggle source</span>
2026
-
2027
1444
  </div>
2028
-
2029
1445
 
2030
1446
  <div class="method-description">
2031
1447
 
2032
-
2033
-
2034
-
2035
1448
 
2036
-
2037
1449
  <div class="method-source-code" id="get_row_alignment-source">
2038
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 418</span>
2039
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">is_horizontal</span>)
1450
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 304</span>
1451
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">is_horizontal</span>)
2040
1452
  <span class="ruby-identifier">validate_workbook</span>
2041
1453
 
2042
1454
  <span class="ruby-identifier">xf_obj</span> = <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>)
@@ -2047,312 +1459,204 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
2047
1459
  <span class="ruby-keyword">end</span>
2048
1460
  <span class="ruby-keyword">end</span></pre>
2049
1461
  </div>
2050
-
2051
1462
  </div>
2052
1463
 
2053
-
2054
1464
 
2055
-
2056
1465
  </div>
2057
1466
 
2058
-
2059
1467
  <div id="method-i-get_row_border" class="method-detail ">
2060
-
2061
1468
  <div class="method-heading">
2062
1469
  <span class="method-name">get_row_border</span><span
2063
1470
  class="method-args">(row, border_direction)</span>
2064
-
2065
1471
  <span class="method-click-advice">click to toggle source</span>
2066
-
2067
1472
  </div>
2068
-
2069
1473
 
2070
1474
  <div class="method-description">
2071
1475
 
2072
-
2073
-
2074
-
2075
1476
 
2076
-
2077
1477
  <div class="method-source-code" id="get_row_border-source">
2078
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 400</span>
2079
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
1478
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 286</span>
1479
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
2080
1480
  <span class="ruby-identifier">validate_workbook</span>
2081
1481
 
2082
1482
  <span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
2083
1483
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
2084
1484
  <span class="ruby-keyword">end</span></pre>
2085
1485
  </div>
2086
-
2087
1486
  </div>
2088
1487
 
2089
-
2090
1488
 
2091
-
2092
1489
  </div>
2093
1490
 
2094
-
2095
1491
  <div id="method-i-get_row_border_color" class="method-detail ">
2096
-
2097
1492
  <div class="method-heading">
2098
1493
  <span class="method-name">get_row_border_color</span><span
2099
1494
  class="method-args">(row, border_direction)</span>
2100
-
2101
1495
  <span class="method-click-advice">click to toggle source</span>
2102
-
2103
1496
  </div>
2104
-
2105
1497
 
2106
1498
  <div class="method-description">
2107
1499
 
2108
-
2109
-
2110
-
2111
1500
 
2112
-
2113
1501
  <div class="method-source-code" id="get_row_border_color-source">
2114
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 407</span>
2115
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
1502
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 293</span>
1503
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
2116
1504
  <span class="ruby-identifier">validate_workbook</span>
2117
1505
 
2118
1506
  <span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
2119
1507
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>)
2120
1508
  <span class="ruby-keyword">end</span></pre>
2121
1509
  </div>
2122
-
2123
1510
  </div>
2124
1511
 
2125
-
2126
1512
 
2127
-
2128
1513
  </div>
2129
1514
 
2130
-
2131
1515
  <div id="method-i-get_row_fill" class="method-detail ">
2132
-
2133
1516
  <div class="method-heading">
2134
1517
  <span class="method-name">get_row_fill</span><span
2135
1518
  class="method-args">(row = 0)</span>
2136
-
2137
1519
  <span class="method-click-advice">click to toggle source</span>
2138
-
2139
1520
  </div>
2140
-
2141
1521
 
2142
1522
  <div class="method-description">
2143
1523
 
2144
-
2145
-
2146
-
2147
1524
 
2148
-
2149
1525
  <div class="method-source-code" id="get_row_fill-source">
2150
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 359</span>
2151
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_fill</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1526
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 245</span>
1527
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_fill</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2152
1528
  (<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_fill_color</span>
2153
1529
  <span class="ruby-keyword">end</span></pre>
2154
1530
  </div>
2155
-
2156
1531
  </div>
2157
1532
 
2158
-
2159
1533
 
2160
-
2161
1534
  </div>
2162
1535
 
2163
-
2164
1536
  <div id="method-i-get_row_font_color" class="method-detail ">
2165
-
2166
1537
  <div class="method-heading">
2167
1538
  <span class="method-name">get_row_font_color</span><span
2168
1539
  class="method-args">(row = 0)</span>
2169
-
2170
1540
  <span class="method-click-advice">click to toggle source</span>
2171
-
2172
1541
  </div>
2173
-
2174
1542
 
2175
1543
  <div class="method-description">
2176
1544
 
2177
-
2178
-
2179
-
2180
1545
 
2181
-
2182
1546
  <div class="method-source-code" id="get_row_font_color-source">
2183
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 371</span>
2184
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1547
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 257</span>
1548
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2185
1549
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
2186
1550
  <span class="ruby-identifier">color</span> = <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">color</span>
2187
1551
  <span class="ruby-identifier">color</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;000000&#39;</span>)
2188
1552
  <span class="ruby-keyword">end</span></pre>
2189
1553
  </div>
2190
-
2191
1554
  </div>
2192
1555
 
2193
-
2194
1556
 
2195
-
2196
1557
  </div>
2197
1558
 
2198
-
2199
1559
  <div id="method-i-get_row_font_name" class="method-detail ">
2200
-
2201
1560
  <div class="method-heading">
2202
1561
  <span class="method-name">get_row_font_name</span><span
2203
1562
  class="method-args">(row = 0)</span>
2204
-
2205
1563
  <span class="method-click-advice">click to toggle source</span>
2206
-
2207
1564
  </div>
2208
-
2209
1565
 
2210
1566
  <div class="method-description">
2211
1567
 
2212
-
2213
-
2214
-
2215
1568
 
2216
-
2217
1569
  <div class="method-source-code" id="get_row_font_name-source">
2218
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 363</span>
2219
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1570
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 249</span>
1571
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2220
1572
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
2221
1573
  <span class="ruby-keyword">end</span></pre>
2222
1574
  </div>
2223
-
2224
1575
  </div>
2225
1576
 
2226
-
2227
1577
 
2228
-
2229
1578
  </div>
2230
1579
 
2231
-
2232
1580
  <div id="method-i-get_row_font_size" class="method-detail ">
2233
-
2234
1581
  <div class="method-heading">
2235
1582
  <span class="method-name">get_row_font_size</span><span
2236
1583
  class="method-args">(row = 0)</span>
2237
-
2238
1584
  <span class="method-click-advice">click to toggle source</span>
2239
-
2240
1585
  </div>
2241
-
2242
1586
 
2243
1587
  <div class="method-description">
2244
1588
 
2245
-
2246
-
2247
-
2248
1589
 
2249
-
2250
1590
  <div class="method-source-code" id="get_row_font_size-source">
2251
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 367</span>
2252
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1591
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 253</span>
1592
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2253
1593
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
2254
1594
  <span class="ruby-keyword">end</span></pre>
2255
1595
  </div>
2256
-
2257
1596
  </div>
2258
1597
 
2259
-
2260
1598
 
2261
-
2262
1599
  </div>
2263
1600
 
2264
-
2265
1601
  <div id="method-i-get_row_height" class="method-detail ">
2266
-
2267
1602
  <div class="method-heading">
2268
1603
  <span class="method-name">get_row_height</span><span
2269
1604
  class="method-args">(row = 0)</span>
2270
-
2271
1605
  <span class="method-click-advice">click to toggle source</span>
2272
-
2273
1606
  </div>
2274
-
2275
1607
 
2276
1608
  <div class="method-description">
2277
1609
 
2278
-
2279
-
2280
-
2281
1610
 
2282
-
2283
1611
  <div class="method-source-code" id="get_row_height-source">
2284
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 393</span>
2285
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1612
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 279</span>
1613
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2286
1614
  <span class="ruby-identifier">validate_workbook</span>
2287
1615
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
2288
1616
  <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]
2289
1617
  <span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">ht</span> <span class="ruby-operator">||</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Row</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_HEIGHT</span>
2290
1618
  <span class="ruby-keyword">end</span></pre>
2291
1619
  </div>
2292
-
2293
1620
  </div>
2294
1621
 
2295
-
2296
1622
 
2297
-
2298
1623
  </div>
2299
1624
 
2300
-
2301
1625
  <div id="method-i-get_row_style" class="method-detail ">
2302
-
2303
1626
  <div class="method-heading">
2304
1627
  <span class="method-name">get_row_style</span><span
2305
1628
  class="method-args">(row_index)</span>
2306
-
2307
1629
  <span class="method-click-advice">click to toggle source</span>
2308
-
2309
1630
  </div>
2310
-
2311
1631
 
2312
1632
  <div class="method-description">
2313
1633
 
2314
-
2315
-
2316
-
2317
1634
 
2318
-
2319
1635
  <div class="method-source-code" id="get_row_style-source">
2320
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 354</span>
2321
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
1636
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 240</span>
1637
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
2322
1638
  <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>]
2323
1639
  (<span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
2324
1640
  <span class="ruby-keyword">end</span></pre>
2325
1641
  </div>
2326
-
2327
1642
  </div>
2328
1643
 
2329
-
2330
1644
 
2331
-
2332
1645
  </div>
2333
1646
 
2334
-
2335
1647
  <div id="method-i-insert_cell" class="method-detail ">
2336
-
2337
1648
  <div class="method-heading">
2338
1649
  <span class="method-name">insert_cell</span><span
2339
1650
  class="method-args">(row = 0, col = 0, data = nil, formula = nil, shift = nil)</span>
2340
-
2341
1651
  <span class="method-click-advice">click to toggle source</span>
2342
-
2343
1652
  </div>
2344
-
2345
1653
 
2346
1654
  <div class="method-description">
2347
1655
 
2348
-
2349
-
2350
-
2351
1656
 
2352
-
2353
1657
  <div class="method-source-code" id="insert_cell-source">
2354
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 205</span>
2355
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_cell</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">formula</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">shift</span> = <span class="ruby-keyword">nil</span>)
1658
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 11</span>
1659
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_cell</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">formula</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">shift</span> = <span class="ruby-keyword">nil</span>)
2356
1660
  <span class="ruby-identifier">validate_workbook</span>
2357
1661
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>)
2358
1662
 
@@ -2361,9 +1665,15 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
2361
1665
  <span class="ruby-keyword">when</span> <span class="ruby-value">:right</span> <span class="ruby-keyword">then</span>
2362
1666
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">col</span>)
2363
1667
  <span class="ruby-keyword">when</span> <span class="ruby-value">:down</span> <span class="ruby-keyword">then</span>
2364
- <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span>, <span class="ruby-value">:cells</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">size</span>))
2365
- (<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-identifier">row</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
2366
- <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>].<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>] = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>]
1668
+ <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span>, <span class="ruby-value">:cells</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">size</span>))
1669
+ (<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-identifier">row</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
1670
+ <span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
1671
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
1672
+ <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-keyword">nil</span>
1673
+ <span class="ruby-keyword">else</span>
1674
+ <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">index</span>)
1675
+ <span class="ruby-identifier">new_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>] = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>]
1676
+ <span class="ruby-keyword">end</span>
2367
1677
  }
2368
1678
  <span class="ruby-keyword">else</span>
2369
1679
  <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;invalid shift option&#39;</span>
@@ -2372,54 +1682,42 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
2372
1682
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">add_cell</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">formula</span>)
2373
1683
  <span class="ruby-keyword">end</span></pre>
2374
1684
  </div>
2375
-
2376
1685
  </div>
2377
1686
 
2378
-
2379
1687
 
2380
-
2381
1688
  </div>
2382
1689
 
2383
-
2384
1690
  <div id="method-i-insert_column" class="method-detail ">
2385
-
2386
1691
  <div class="method-heading">
2387
1692
  <span class="method-name">insert_column</span><span
2388
1693
  class="method-args">(column_index = 0)</span>
2389
-
2390
1694
  <span class="method-click-advice">click to toggle source</span>
2391
-
2392
1695
  </div>
2393
-
2394
1696
 
2395
1697
  <div class="method-description">
2396
-
2397
- <p>Inserts column at <code>column_index</code>, pushes everything right, takes
2398
- styles from column to left NOTE: use of this method will break formulas
2399
- which reference cells which are being “pushed right”</p>
2400
-
2401
-
1698
+ <p>Inserts column at <code>column_index</code>, pushes everything right, takes styles from column to left NOTE: use of this method will break formulas which reference cells which are being “pushed right”</p>
2402
1699
 
2403
-
2404
1700
  <div class="method-source-code" id="insert_column-source">
2405
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 310</span>
2406
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
1701
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 160</span>
1702
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
2407
1703
  <span class="ruby-identifier">validate_workbook</span>
2408
1704
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
2409
1705
 
2410
1706
  <span class="ruby-identifier">old_range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
2411
1707
 
2412
- <span class="ruby-comment">#go through each cell in column</span>
1708
+ <span class="ruby-comment"># Go through each cell in column</span>
2413
1709
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span>, <span class="ruby-identifier">row_index</span><span class="ruby-operator">|</span>
1710
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment"># Do not process blank rows</span>
1711
+
2414
1712
  <span class="ruby-identifier">old_cell</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
2415
1713
  <span class="ruby-identifier">c</span> = <span class="ruby-keyword">nil</span>
2416
1714
 
2417
1715
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_cell</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span>
2418
1716
  <span class="ruby-identifier">old_range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_range</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-keyword">then</span>
2419
1717
 
2420
- <span class="ruby-identifier">c</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-value">:worksheet</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">self</span>,
2421
- <span class="ruby-value">:row</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">row_index</span>, <span class="ruby-value">:column</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">column_index</span>,
2422
- <span class="ruby-value">:datatype</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataType</span><span class="ruby-operator">::</span><span class="ruby-constant">SHARED_STRING</span>)
1718
+ <span class="ruby-identifier">c</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-value">:worksheet</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">self</span>,
1719
+ <span class="ruby-value">:row</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">row_index</span>, <span class="ruby-value">:column</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">column_index</span>,
1720
+ <span class="ruby-value">:datatype</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataType</span><span class="ruby-operator">::</span><span class="ruby-constant">SHARED_STRING</span>)
2423
1721
  <span class="ruby-keyword">end</span>
2424
1722
 
2425
1723
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">column_index</span>)
@@ -2427,41 +1725,42 @@ which reference cells which are being “pushed right”</p>
2427
1725
 
2428
1726
  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span>)
2429
1727
 
1728
+ <span class="ruby-comment"># Update merged cells for all rows below</span>
1729
+ <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
1730
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
1731
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">column_index</span>
1732
+
1733
+ <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">column_index</span>
1734
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
1735
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span>,
1736
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span>,
1737
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
1738
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
1739
+ )
1740
+ }
1741
+ <span class="ruby-keyword">end</span>
1742
+
2430
1743
  <span class="ruby-comment"># TODO: update column numbers</span>
2431
1744
  <span class="ruby-keyword">end</span></pre>
2432
1745
  </div>
2433
-
2434
1746
  </div>
2435
1747
 
2436
-
2437
1748
 
2438
-
2439
1749
  </div>
2440
1750
 
2441
-
2442
1751
  <div id="method-i-insert_row" class="method-detail ">
2443
-
2444
1752
  <div class="method-heading">
2445
1753
  <span class="method-name">insert_row</span><span
2446
1754
  class="method-args">(row_index = 0)</span>
2447
-
2448
1755
  <span class="method-click-advice">click to toggle source</span>
2449
-
2450
1756
  </div>
2451
-
2452
1757
 
2453
1758
  <div class="method-description">
2454
-
2455
- <p>Inserts row at row_index, pushes down, copies style from the row above
2456
- (that&#39;s what Excel 2013 does!) NOTE: use of this method will break
2457
- formulas which reference cells which are being “pushed down”</p>
2458
-
2459
-
1759
+ <p>Inserts row at row_index, pushes down, copies style from the row above (that’s what Excel 2013 does!) NOTE: use of this method will break formulas which reference cells which are being “pushed down”</p>
2460
1760
 
2461
-
2462
1761
  <div class="method-source-code" id="insert_row-source">
2463
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 255</span>
2464
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_row</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>)
1762
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 73</span>
1763
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_row</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>)
2465
1764
  <span class="ruby-identifier">validate_workbook</span>
2466
1765
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
2467
1766
 
@@ -2472,7 +1771,7 @@ formulas which reference cells which are being “pushed down”</p>
2472
1771
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span> <span class="ruby-keyword">then</span>
2473
1772
  <span class="ruby-identifier">new_cells</span> = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
2474
1773
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span> <span class="ruby-keyword">nil</span>
2475
- <span class="ruby-keyword">else</span> <span class="ruby-identifier">nc</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>)
1774
+ <span class="ruby-keyword">else</span> <span class="ruby-identifier">nc</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>)
2476
1775
  <span class="ruby-identifier">nc</span>.<span class="ruby-identifier">worksheet</span> = <span class="ruby-keyword">self</span>
2477
1776
  <span class="ruby-identifier">nc</span>
2478
1777
  <span class="ruby-keyword">end</span>
@@ -2484,7 +1783,7 @@ formulas which reference cells which are being “pushed down”</p>
2484
1783
  <span class="ruby-identifier">new_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>((<span class="ruby-identifier">row0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row0</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">size</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>)
2485
1784
 
2486
1785
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-keyword">nil</span>)
2487
- <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-value">:cells</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">new_cells</span>, <span class="ruby-value">:style_index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">old_row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">style_index</span>)
1786
+ <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-value">:cells</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">new_cells</span>, <span class="ruby-value">:style_index</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">old_row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">style_index</span>)
2488
1787
 
2489
1788
  <span class="ruby-comment"># Update row values for all rows below</span>
2490
1789
  <span class="ruby-identifier">row_index</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
@@ -2496,365 +1795,256 @@ formulas which reference cells which are being “pushed down”</p>
2496
1795
  }
2497
1796
  }
2498
1797
 
1798
+ <span class="ruby-comment"># Update merged cells for all rows below</span>
1799
+ <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
1800
+ <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
1801
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">row_index</span>
1802
+
1803
+ <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">row_index</span>
1804
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
1805
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
1806
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
1807
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span>,
1808
+ <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span>,
1809
+ )
1810
+ }
1811
+ <span class="ruby-keyword">end</span>
1812
+
2499
1813
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">new_row</span>
2500
1814
  <span class="ruby-keyword">end</span></pre>
2501
1815
  </div>
2502
-
2503
1816
  </div>
2504
1817
 
2505
-
2506
1818
 
2507
-
2508
1819
  </div>
2509
1820
 
2510
-
2511
1821
  <div id="method-i-is_column_bolded" class="method-detail ">
2512
-
2513
1822
  <div class="method-heading">
2514
1823
  <span class="method-name">is_column_bolded</span><span
2515
1824
  class="method-args">(col = 0)</span>
2516
-
2517
1825
  <span class="method-click-advice">click to toggle source</span>
2518
-
2519
1826
  </div>
2520
-
2521
1827
 
2522
1828
  <div class="method-description">
2523
1829
 
2524
-
2525
-
2526
-
2527
1830
 
2528
-
2529
1831
  <div class="method-source-code" id="is_column_bolded-source">
2530
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 455</span>
2531
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_bolded</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1832
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 341</span>
1833
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_bolded</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
2532
1834
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
2533
1835
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
2534
1836
  <span class="ruby-keyword">end</span></pre>
2535
1837
  </div>
2536
-
2537
1838
  </div>
2538
1839
 
2539
-
2540
1840
 
2541
-
2542
1841
  </div>
2543
1842
 
2544
-
2545
1843
  <div id="method-i-is_column_italicized" class="method-detail ">
2546
-
2547
1844
  <div class="method-heading">
2548
1845
  <span class="method-name">is_column_italicized</span><span
2549
1846
  class="method-args">(col = 0)</span>
2550
-
2551
1847
  <span class="method-click-advice">click to toggle source</span>
2552
-
2553
1848
  </div>
2554
-
2555
1849
 
2556
1850
  <div class="method-description">
2557
1851
 
2558
-
2559
-
2560
-
2561
1852
 
2562
-
2563
1853
  <div class="method-source-code" id="is_column_italicized-source">
2564
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 450</span>
2565
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_italicized</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1854
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 336</span>
1855
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_italicized</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
2566
1856
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
2567
1857
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
2568
1858
  <span class="ruby-keyword">end</span></pre>
2569
1859
  </div>
2570
-
2571
1860
  </div>
2572
1861
 
2573
-
2574
1862
 
2575
-
2576
1863
  </div>
2577
1864
 
2578
-
2579
1865
  <div id="method-i-is_column_struckthrough" class="method-detail ">
2580
-
2581
1866
  <div class="method-heading">
2582
1867
  <span class="method-name">is_column_struckthrough</span><span
2583
1868
  class="method-args">(col = 0)</span>
2584
-
2585
1869
  <span class="method-click-advice">click to toggle source</span>
2586
-
2587
1870
  </div>
2588
-
2589
1871
 
2590
1872
  <div class="method-description">
2591
1873
 
2592
-
2593
-
2594
-
2595
1874
 
2596
-
2597
1875
  <div class="method-source-code" id="is_column_struckthrough-source">
2598
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 465</span>
2599
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_struckthrough</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1876
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 351</span>
1877
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_struckthrough</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
2600
1878
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
2601
1879
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
2602
1880
  <span class="ruby-keyword">end</span></pre>
2603
1881
  </div>
2604
-
2605
1882
  </div>
2606
1883
 
2607
-
2608
1884
 
2609
-
2610
1885
  </div>
2611
1886
 
2612
-
2613
1887
  <div id="method-i-is_column_underlined" class="method-detail ">
2614
-
2615
1888
  <div class="method-heading">
2616
1889
  <span class="method-name">is_column_underlined</span><span
2617
1890
  class="method-args">(col = 0)</span>
2618
-
2619
1891
  <span class="method-click-advice">click to toggle source</span>
2620
-
2621
1892
  </div>
2622
-
2623
1893
 
2624
1894
  <div class="method-description">
2625
1895
 
2626
-
2627
-
2628
-
2629
1896
 
2630
-
2631
1897
  <div class="method-source-code" id="is_column_underlined-source">
2632
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 460</span>
2633
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_underlined</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
1898
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 346</span>
1899
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_underlined</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
2634
1900
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
2635
1901
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
2636
1902
  <span class="ruby-keyword">end</span></pre>
2637
1903
  </div>
2638
-
2639
1904
  </div>
2640
1905
 
2641
-
2642
1906
 
2643
-
2644
1907
  </div>
2645
1908
 
2646
-
2647
1909
  <div id="method-i-is_row_bolded" class="method-detail ">
2648
-
2649
1910
  <div class="method-heading">
2650
1911
  <span class="method-name">is_row_bolded</span><span
2651
1912
  class="method-args">(row = 0)</span>
2652
-
2653
1913
  <span class="method-click-advice">click to toggle source</span>
2654
-
2655
1914
  </div>
2656
-
2657
1915
 
2658
1916
  <div class="method-description">
2659
1917
 
2660
-
2661
-
2662
-
2663
1918
 
2664
-
2665
1919
  <div class="method-source-code" id="is_row_bolded-source">
2666
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 381</span>
2667
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_bolded</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1920
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 267</span>
1921
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_bolded</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2668
1922
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
2669
1923
  <span class="ruby-keyword">end</span></pre>
2670
1924
  </div>
2671
-
2672
1925
  </div>
2673
1926
 
2674
-
2675
1927
 
2676
-
2677
1928
  </div>
2678
1929
 
2679
-
2680
1930
  <div id="method-i-is_row_italicized" class="method-detail ">
2681
-
2682
1931
  <div class="method-heading">
2683
1932
  <span class="method-name">is_row_italicized</span><span
2684
1933
  class="method-args">(row = 0)</span>
2685
-
2686
1934
  <span class="method-click-advice">click to toggle source</span>
2687
-
2688
1935
  </div>
2689
-
2690
1936
 
2691
1937
  <div class="method-description">
2692
1938
 
2693
-
2694
-
2695
-
2696
1939
 
2697
-
2698
1940
  <div class="method-source-code" id="is_row_italicized-source">
2699
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 377</span>
2700
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_italicized</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1941
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 263</span>
1942
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_italicized</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2701
1943
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
2702
1944
  <span class="ruby-keyword">end</span></pre>
2703
1945
  </div>
2704
-
2705
1946
  </div>
2706
1947
 
2707
-
2708
1948
 
2709
-
2710
1949
  </div>
2711
1950
 
2712
-
2713
1951
  <div id="method-i-is_row_struckthrough" class="method-detail ">
2714
-
2715
1952
  <div class="method-heading">
2716
1953
  <span class="method-name">is_row_struckthrough</span><span
2717
1954
  class="method-args">(row = 0)</span>
2718
-
2719
1955
  <span class="method-click-advice">click to toggle source</span>
2720
-
2721
1956
  </div>
2722
-
2723
1957
 
2724
1958
  <div class="method-description">
2725
1959
 
2726
-
2727
-
2728
-
2729
1960
 
2730
-
2731
1961
  <div class="method-source-code" id="is_row_struckthrough-source">
2732
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 389</span>
2733
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_struckthrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1962
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 275</span>
1963
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_struckthrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2734
1964
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
2735
1965
  <span class="ruby-keyword">end</span></pre>
2736
1966
  </div>
2737
-
2738
1967
  </div>
2739
1968
 
2740
-
2741
1969
 
2742
-
2743
1970
  </div>
2744
1971
 
2745
-
2746
1972
  <div id="method-i-is_row_underlined" class="method-detail ">
2747
-
2748
1973
  <div class="method-heading">
2749
1974
  <span class="method-name">is_row_underlined</span><span
2750
1975
  class="method-args">(row = 0)</span>
2751
-
2752
1976
  <span class="method-click-advice">click to toggle source</span>
2753
-
2754
1977
  </div>
2755
-
2756
1978
 
2757
1979
  <div class="method-description">
2758
1980
 
2759
-
2760
-
2761
-
2762
1981
 
2763
-
2764
1982
  <div class="method-source-code" id="is_row_underlined-source">
2765
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 385</span>
2766
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_underlined</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
1983
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 271</span>
1984
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_underlined</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
2767
1985
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
2768
1986
  <span class="ruby-keyword">end</span></pre>
2769
1987
  </div>
2770
-
2771
1988
  </div>
2772
1989
 
2773
-
2774
1990
 
2775
-
2776
1991
  </div>
2777
1992
 
2778
-
2779
1993
  <div id="method-i-merge_cells" class="method-detail ">
2780
-
2781
1994
  <div class="method-heading">
2782
1995
  <span class="method-name">merge_cells</span><span
2783
1996
  class="method-args">(start_row, start_col, end_row, end_col)</span>
2784
-
2785
1997
  <span class="method-click-advice">click to toggle source</span>
2786
-
2787
1998
  </div>
2788
-
2789
1999
 
2790
2000
  <div class="method-description">
2791
-
2792
2001
  <p>Merges cells within a rectangular area</p>
2793
-
2794
-
2795
2002
 
2796
-
2797
2003
  <div class="method-source-code" id="merge_cells-source">
2798
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 801</span>
2799
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">merge_cells</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">end_col</span>)
2004
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 692</span>
2005
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">merge_cells</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">end_col</span>)
2800
2006
  <span class="ruby-identifier">validate_workbook</span>
2801
2007
 
2802
2008
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCells</span>.<span class="ruby-identifier">new</span>
2803
2009
  <span class="ruby-comment"># TODO: add validation to make sure ranges are not intersecting with existing ones</span>
2804
- <span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:ref</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_col</span>))
2010
+ <span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:ref</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_col</span>))
2805
2011
  <span class="ruby-keyword">end</span></pre>
2806
2012
  </div>
2807
-
2808
2013
  </div>
2809
2014
 
2810
-
2811
2015
 
2812
-
2813
2016
  </div>
2814
2017
 
2815
-
2816
2018
  <div id="method-i-row_font" class="method-detail ">
2817
-
2818
2019
  <div class="method-heading">
2819
2020
  <span class="method-name">row_font</span><span
2820
2021
  class="method-args">(row)</span>
2821
-
2822
2022
  <span class="method-click-advice">click to toggle source</span>
2823
-
2824
2023
  </div>
2825
-
2826
2024
 
2827
2025
  <div class="method-description">
2828
2026
 
2829
-
2830
-
2831
-
2832
2027
 
2833
-
2834
2028
  <div class="method-source-code" id="row_font-source">
2835
- <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 414</span>
2836
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
2029
+ <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 300</span>
2030
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">row_font</span>(<span class="ruby-identifier">row</span>)
2837
2031
  (<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_font</span>
2838
2032
  <span class="ruby-keyword">end</span></pre>
2839
2033
  </div>
2840
-
2841
2034
  </div>
2842
2035
 
2843
-
2844
2036
 
2845
-
2846
2037
  </div>
2847
2038
 
2848
-
2849
2039
  </section>
2850
-
2040
+
2851
2041
  </section>
2852
2042
  </main>
2853
2043
 
2854
2044
 
2855
2045
  <footer id="validator-badges" role="contentinfo">
2856
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
2857
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
2046
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
2047
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
2858
2048
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
2859
2049
  </footer>
2860
2050