rubyXL 3.2.6 → 3.2.7

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