rubyXL 3.3.15 → 3.3.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (381) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -3
  3. data/README.rdoc +5 -1
  4. data/Rakefile +6 -16
  5. data/VERSION +1 -1
  6. data/lib/rubyXL/convenience_methods.rb +40 -65
  7. data/lib/rubyXL/objects/ooxml_object.rb +3 -1
  8. data/lib/rubyXL/objects/sheet_data.rb +2 -0
  9. data/lib/rubyXL/objects/text.rb +1 -1
  10. data/lib/rubyXL/worksheet.rb +3 -56
  11. data/rdoc/README_rdoc.html +37 -31
  12. data/rdoc/RubyXL.html +2 -2
  13. data/rdoc/RubyXL/AExtension.html +2 -2
  14. data/rdoc/RubyXL/AExtensionStorageArea.html +2 -2
  15. data/rdoc/RubyXL/AdjustHandleList.html +2 -2
  16. data/rdoc/RubyXL/Alignment.html +2 -2
  17. data/rdoc/RubyXL/AlternateContent.html +2 -2
  18. data/rdoc/RubyXL/Authors.html +2 -2
  19. data/rdoc/RubyXL/AutoFilter.html +2 -2
  20. data/rdoc/RubyXL/AutoFilterColumn.html +2 -2
  21. data/rdoc/RubyXL/BinaryImageFile.html +2 -2
  22. data/rdoc/RubyXL/BodyProperties.html +2 -2
  23. data/rdoc/RubyXL/BooleanNode.html +2 -2
  24. data/rdoc/RubyXL/BooleanValue.html +2 -2
  25. data/rdoc/RubyXL/Border.html +2 -2
  26. data/rdoc/RubyXL/BorderEdge.html +2 -2
  27. data/rdoc/RubyXL/Borders.html +2 -2
  28. data/rdoc/RubyXL/Break.html +2 -2
  29. data/rdoc/RubyXL/BreakList.html +2 -2
  30. data/rdoc/RubyXL/CT_AdjPoint2D.html +2 -2
  31. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +2 -2
  32. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +2 -2
  33. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +2 -2
  34. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +2 -2
  35. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +2 -2
  36. data/rdoc/RubyXL/CT_Backdrop.html +2 -2
  37. data/rdoc/RubyXL/CT_Bevel.html +2 -2
  38. data/rdoc/RubyXL/CT_BiLevelEffect.html +2 -2
  39. data/rdoc/RubyXL/CT_BlendEffect.html +2 -2
  40. data/rdoc/RubyXL/CT_Blip.html +2 -2
  41. data/rdoc/RubyXL/CT_BlipFillProperties.html +2 -2
  42. data/rdoc/RubyXL/CT_BlurEffect.html +2 -2
  43. data/rdoc/RubyXL/CT_Camera.html +2 -2
  44. data/rdoc/RubyXL/CT_Color.html +2 -2
  45. data/rdoc/RubyXL/CT_ColorChangeEffect.html +2 -2
  46. data/rdoc/RubyXL/CT_ColorMapping.html +2 -2
  47. data/rdoc/RubyXL/CT_ColorScheme.html +2 -2
  48. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +2 -2
  49. data/rdoc/RubyXL/CT_ConnectionSite.html +2 -2
  50. data/rdoc/RubyXL/CT_ConnectionSiteList.html +2 -2
  51. data/rdoc/RubyXL/CT_DashStop.html +2 -2
  52. data/rdoc/RubyXL/CT_DashStopList.html +2 -2
  53. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +2 -2
  54. data/rdoc/RubyXL/CT_DuotoneEffect.html +2 -2
  55. data/rdoc/RubyXL/CT_EffectContainer.html +2 -2
  56. data/rdoc/RubyXL/CT_EffectList.html +2 -2
  57. data/rdoc/RubyXL/CT_EffectReference.html +2 -2
  58. data/rdoc/RubyXL/CT_EffectStyleItem.html +2 -2
  59. data/rdoc/RubyXL/CT_EffectStyleList.html +2 -2
  60. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +2 -2
  61. data/rdoc/RubyXL/CT_FillEffect.html +2 -2
  62. data/rdoc/RubyXL/CT_FillOverlayEffect.html +2 -2
  63. data/rdoc/RubyXL/CT_FillStyleList.html +2 -2
  64. data/rdoc/RubyXL/CT_FlatText.html +2 -2
  65. data/rdoc/RubyXL/CT_FontCollection.html +2 -2
  66. data/rdoc/RubyXL/CT_FontReference.html +2 -2
  67. data/rdoc/RubyXL/CT_GeomGuideList.html +2 -2
  68. data/rdoc/RubyXL/CT_GlowEffect.html +2 -2
  69. data/rdoc/RubyXL/CT_GradientFillProperties.html +2 -2
  70. data/rdoc/RubyXL/CT_GradientStop.html +2 -2
  71. data/rdoc/RubyXL/CT_GradientStopList.html +2 -2
  72. data/rdoc/RubyXL/CT_HSLEffect.html +2 -2
  73. data/rdoc/RubyXL/CT_HslColor.html +2 -2
  74. data/rdoc/RubyXL/CT_Hyperlink.html +2 -2
  75. data/rdoc/RubyXL/CT_InnerShadowEffect.html +2 -2
  76. data/rdoc/RubyXL/CT_LightRig.html +2 -2
  77. data/rdoc/RubyXL/CT_LineEndProperties.html +2 -2
  78. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +2 -2
  79. data/rdoc/RubyXL/CT_LineProperties.html +2 -2
  80. data/rdoc/RubyXL/CT_LineStyleList.html +2 -2
  81. data/rdoc/RubyXL/CT_LinearShadeProperties.html +2 -2
  82. data/rdoc/RubyXL/CT_LuminanceEffect.html +2 -2
  83. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +2 -2
  84. data/rdoc/RubyXL/CT_OuterShadowEffect.html +2 -2
  85. data/rdoc/RubyXL/CT_Path2D.html +2 -2
  86. data/rdoc/RubyXL/CT_Path2DArcTo.html +2 -2
  87. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +2 -2
  88. data/rdoc/RubyXL/CT_Path2DList.html +2 -2
  89. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +2 -2
  90. data/rdoc/RubyXL/CT_Path2DTo.html +2 -2
  91. data/rdoc/RubyXL/CT_PathShadeProperties.html +2 -2
  92. data/rdoc/RubyXL/CT_PatternFillProperties.html +2 -2
  93. data/rdoc/RubyXL/CT_Point3D.html +2 -2
  94. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +2 -2
  95. data/rdoc/RubyXL/CT_PresetColor.html +2 -2
  96. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +2 -2
  97. data/rdoc/RubyXL/CT_PresetShadowEffect.html +2 -2
  98. data/rdoc/RubyXL/CT_PresetTextShape.html +2 -2
  99. data/rdoc/RubyXL/CT_ReflectionEffect.html +2 -2
  100. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +2 -2
  101. data/rdoc/RubyXL/CT_RelativeRect.html +2 -2
  102. data/rdoc/RubyXL/CT_SRgbColor.html +2 -2
  103. data/rdoc/RubyXL/CT_ScRgbColor.html +2 -2
  104. data/rdoc/RubyXL/CT_Scene3D.html +2 -2
  105. data/rdoc/RubyXL/CT_SchemeColor.html +2 -2
  106. data/rdoc/RubyXL/CT_Shape3D.html +2 -2
  107. data/rdoc/RubyXL/CT_ShapeStyle.html +2 -2
  108. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +2 -2
  109. data/rdoc/RubyXL/CT_SphereCoords.html +2 -2
  110. data/rdoc/RubyXL/CT_StretchInfoProperties.html +2 -2
  111. data/rdoc/RubyXL/CT_StyleMatrix.html +2 -2
  112. data/rdoc/RubyXL/CT_StyleMatrixReference.html +2 -2
  113. data/rdoc/RubyXL/CT_SupplementalFont.html +2 -2
  114. data/rdoc/RubyXL/CT_SystemColor.html +2 -2
  115. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +2 -2
  116. data/rdoc/RubyXL/CT_TextBlipBullet.html +2 -2
  117. data/rdoc/RubyXL/CT_TextCharBullet.html +2 -2
  118. data/rdoc/RubyXL/CT_TextCharacterProperties.html +2 -2
  119. data/rdoc/RubyXL/CT_TextFont.html +2 -2
  120. data/rdoc/RubyXL/CT_TextListStyle.html +2 -2
  121. data/rdoc/RubyXL/CT_TextNormalAutofit.html +2 -2
  122. data/rdoc/RubyXL/CT_TextParagraphProperties.html +2 -2
  123. data/rdoc/RubyXL/CT_TextSpacing.html +2 -2
  124. data/rdoc/RubyXL/CT_TextTabStop.html +2 -2
  125. data/rdoc/RubyXL/CT_TextTabStopList.html +2 -2
  126. data/rdoc/RubyXL/CT_TileInfoProperties.html +2 -2
  127. data/rdoc/RubyXL/CT_TintEffect.html +2 -2
  128. data/rdoc/RubyXL/CT_Transform2D.html +2 -2
  129. data/rdoc/RubyXL/CT_TransformEffect.html +2 -2
  130. data/rdoc/RubyXL/CT_Vector3D.html +2 -2
  131. data/rdoc/RubyXL/CT_XYAdjustHandle.html +2 -2
  132. data/rdoc/RubyXL/CalculationChain.html +3 -3
  133. data/rdoc/RubyXL/CalculationChainCell.html +2 -2
  134. data/rdoc/RubyXL/CalculationProperties.html +2 -2
  135. data/rdoc/RubyXL/Cell.html +2 -2
  136. data/rdoc/RubyXL/CellConvenienceMethods.html +37 -37
  137. data/rdoc/RubyXL/CellExt.html +2 -2
  138. data/rdoc/RubyXL/CellSmartTag.html +2 -2
  139. data/rdoc/RubyXL/CellSmartTagProperty.html +2 -2
  140. data/rdoc/RubyXL/CellSmartTags.html +2 -2
  141. data/rdoc/RubyXL/CellStyle.html +2 -2
  142. data/rdoc/RubyXL/CellStyleXFs.html +2 -2
  143. data/rdoc/RubyXL/CellStyles.html +3 -3
  144. data/rdoc/RubyXL/CellValue.html +2 -2
  145. data/rdoc/RubyXL/CellWatch.html +2 -2
  146. data/rdoc/RubyXL/CellWatches.html +2 -2
  147. data/rdoc/RubyXL/CellXFs.html +2 -2
  148. data/rdoc/RubyXL/ChartColorsFile.html +2 -2
  149. data/rdoc/RubyXL/ChartFile.html +2 -2
  150. data/rdoc/RubyXL/ChartStyleFile.html +2 -2
  151. data/rdoc/RubyXL/ChartUserShapesFile.html +2 -2
  152. data/rdoc/RubyXL/Chartsheet.html +3 -3
  153. data/rdoc/RubyXL/ChartsheetPageSetup.html +2 -2
  154. data/rdoc/RubyXL/ChartsheetProperties.html +2 -2
  155. data/rdoc/RubyXL/ChartsheetProtection.html +2 -2
  156. data/rdoc/RubyXL/ChartsheetView.html +2 -2
  157. data/rdoc/RubyXL/ChartsheetViews.html +2 -2
  158. data/rdoc/RubyXL/Color.html +4 -4
  159. data/rdoc/RubyXL/ColorFilter.html +2 -2
  160. data/rdoc/RubyXL/ColorScale.html +2 -2
  161. data/rdoc/RubyXL/ColorSet.html +2 -2
  162. data/rdoc/RubyXL/Colors.html +2 -2
  163. data/rdoc/RubyXL/ColumnRange.html +2 -2
  164. data/rdoc/RubyXL/ColumnRanges.html +2 -2
  165. data/rdoc/RubyXL/Comment.html +2 -2
  166. data/rdoc/RubyXL/CommentList.html +2 -2
  167. data/rdoc/RubyXL/CommentsFile.html +3 -3
  168. data/rdoc/RubyXL/ConditionalFormatValue.html +2 -2
  169. data/rdoc/RubyXL/ConditionalFormatting.html +2 -2
  170. data/rdoc/RubyXL/ConditionalFormattingRule.html +2 -2
  171. data/rdoc/RubyXL/ContentTypeDefault.html +2 -2
  172. data/rdoc/RubyXL/ContentTypeOverride.html +2 -2
  173. data/rdoc/RubyXL/ContentTypes.html +3 -3
  174. data/rdoc/RubyXL/ControlPropertiesFile.html +2 -2
  175. data/rdoc/RubyXL/CorePropertiesFile.html +3 -3
  176. data/rdoc/RubyXL/CustomColor.html +2 -2
  177. data/rdoc/RubyXL/CustomColorList.html +2 -2
  178. data/rdoc/RubyXL/CustomFilter.html +2 -2
  179. data/rdoc/RubyXL/CustomFilters.html +2 -2
  180. data/rdoc/RubyXL/CustomGeometry.html +2 -2
  181. data/rdoc/RubyXL/CustomProperties.html +2 -2
  182. data/rdoc/RubyXL/CustomPropertiesFile.html +2 -2
  183. data/rdoc/RubyXL/CustomProperty.html +2 -2
  184. data/rdoc/RubyXL/CustomSheetView.html +2 -2
  185. data/rdoc/RubyXL/CustomSheetViews.html +2 -2
  186. data/rdoc/RubyXL/CustomWorkbookView.html +2 -2
  187. data/rdoc/RubyXL/CustomWorkbookViews.html +2 -2
  188. data/rdoc/RubyXL/CustomXMLFile.html +2 -2
  189. data/rdoc/RubyXL/DXF.html +2 -2
  190. data/rdoc/RubyXL/DXFs.html +2 -2
  191. data/rdoc/RubyXL/DataBar.html +2 -2
  192. data/rdoc/RubyXL/DataConsolidate.html +2 -2
  193. data/rdoc/RubyXL/DataConsolidationReference.html +2 -2
  194. data/rdoc/RubyXL/DataConsolidationReferences.html +2 -2
  195. data/rdoc/RubyXL/DataType.html +2 -2
  196. data/rdoc/RubyXL/DataValidation.html +2 -2
  197. data/rdoc/RubyXL/DataValidations.html +2 -2
  198. data/rdoc/RubyXL/DateGroupItem.html +2 -2
  199. data/rdoc/RubyXL/DefinedName.html +2 -2
  200. data/rdoc/RubyXL/DefinedNameExt.html +2 -2
  201. data/rdoc/RubyXL/DefinedNames.html +2 -2
  202. data/rdoc/RubyXL/DefinedNamesExt.html +2 -2
  203. data/rdoc/RubyXL/DocumentPropertiesFile.html +8 -8
  204. data/rdoc/RubyXL/DrawingFile.html +2 -2
  205. data/rdoc/RubyXL/DynamicFilter.html +2 -2
  206. data/rdoc/RubyXL/EmbeddedControl.html +2 -2
  207. data/rdoc/RubyXL/EmbeddedControls.html +2 -2
  208. data/rdoc/RubyXL/Extension.html +2 -2
  209. data/rdoc/RubyXL/ExtensionStorageArea.html +2 -2
  210. data/rdoc/RubyXL/Extents.html +2 -2
  211. data/rdoc/RubyXL/ExternalBook.html +2 -2
  212. data/rdoc/RubyXL/ExternalLinksFile.html +3 -3
  213. data/rdoc/RubyXL/ExternalReference.html +2 -2
  214. data/rdoc/RubyXL/ExternalReferences.html +2 -2
  215. data/rdoc/RubyXL/ExtraColorSchemeList.html +2 -2
  216. data/rdoc/RubyXL/FieldItem.html +2 -2
  217. data/rdoc/RubyXL/FileRecoveryProperties.html +2 -2
  218. data/rdoc/RubyXL/FileSharing.html +2 -2
  219. data/rdoc/RubyXL/FileVersion.html +2 -2
  220. data/rdoc/RubyXL/Fill.html +2 -2
  221. data/rdoc/RubyXL/Fills.html +3 -3
  222. data/rdoc/RubyXL/FilterContainer.html +2 -2
  223. data/rdoc/RubyXL/FloatNode.html +2 -2
  224. data/rdoc/RubyXL/FloatValue.html +2 -2
  225. data/rdoc/RubyXL/Font.html +5 -5
  226. data/rdoc/RubyXL/FontScheme.html +2 -2
  227. data/rdoc/RubyXL/Fonts.html +2 -2
  228. data/rdoc/RubyXL/Formula.html +2 -2
  229. data/rdoc/RubyXL/FunctionGroup.html +2 -2
  230. data/rdoc/RubyXL/FunctionGroups.html +2 -2
  231. data/rdoc/RubyXL/GenericStorageObject.html +2 -2
  232. data/rdoc/RubyXL/GradientFill.html +2 -2
  233. data/rdoc/RubyXL/HeaderFooterSettings.html +2 -2
  234. data/rdoc/RubyXL/Hyperlink.html +2 -2
  235. data/rdoc/RubyXL/HyperlinkRelFile.html +2 -2
  236. data/rdoc/RubyXL/Hyperlinks.html +2 -2
  237. data/rdoc/RubyXL/IconFilter.html +2 -2
  238. data/rdoc/RubyXL/IconSet.html +2 -2
  239. data/rdoc/RubyXL/IgnoredError.html +2 -2
  240. data/rdoc/RubyXL/IgnoredErrors.html +2 -2
  241. data/rdoc/RubyXL/IndexedColors.html +2 -2
  242. data/rdoc/RubyXL/InputCells.html +2 -2
  243. data/rdoc/RubyXL/IntegerNode.html +2 -2
  244. data/rdoc/RubyXL/IntegerValue.html +2 -2
  245. data/rdoc/RubyXL/LegacyCell.html +2 -2
  246. data/rdoc/RubyXL/LegacyWorksheet.html +5 -162
  247. data/rdoc/RubyXL/MRUColors.html +2 -2
  248. data/rdoc/RubyXL/MacrosFile.html +2 -2
  249. data/rdoc/RubyXL/MergedCell.html +2 -2
  250. data/rdoc/RubyXL/MergedCells.html +2 -2
  251. data/rdoc/RubyXL/NumFmt.html +2 -2
  252. data/rdoc/RubyXL/NumberFormat.html +3 -3
  253. data/rdoc/RubyXL/NumberFormats.html +2 -2
  254. data/rdoc/RubyXL/OLEObject.html +2 -2
  255. data/rdoc/RubyXL/OLEObjectFile.html +2 -2
  256. data/rdoc/RubyXL/OLEObjects.html +2 -2
  257. data/rdoc/RubyXL/OLESize.html +2 -2
  258. data/rdoc/RubyXL/OOXMLContainerObject.html +8 -8
  259. data/rdoc/RubyXL/OOXMLObject.html +3 -3
  260. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +14 -14
  261. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +21 -19
  262. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +7 -7
  263. data/rdoc/RubyXL/OOXMLTopLevelObject.html +11 -11
  264. data/rdoc/RubyXL/Offset.html +2 -2
  265. data/rdoc/RubyXL/OutlineProperties.html +2 -2
  266. data/rdoc/RubyXL/PageMargins.html +2 -2
  267. data/rdoc/RubyXL/PageSetup.html +2 -2
  268. data/rdoc/RubyXL/PageSetupProperties.html +2 -2
  269. data/rdoc/RubyXL/Pane.html +2 -2
  270. data/rdoc/RubyXL/Parser.html +2 -2
  271. data/rdoc/RubyXL/PatternFill.html +2 -2
  272. data/rdoc/RubyXL/PhoneticProperties.html +2 -2
  273. data/rdoc/RubyXL/PhoneticRun.html +2 -2
  274. data/rdoc/RubyXL/PivotArea.html +2 -2
  275. data/rdoc/RubyXL/PivotCache.html +2 -2
  276. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +2 -2
  277. data/rdoc/RubyXL/PivotCacheRecordsFile.html +2 -2
  278. data/rdoc/RubyXL/PivotCaches.html +2 -2
  279. data/rdoc/RubyXL/PivotReference.html +2 -2
  280. data/rdoc/RubyXL/PivotReferences.html +2 -2
  281. data/rdoc/RubyXL/PivotTableFile.html +2 -2
  282. data/rdoc/RubyXL/PivotTableSelection.html +2 -2
  283. data/rdoc/RubyXL/PresetGeometry.html +2 -2
  284. data/rdoc/RubyXL/PrintOptions.html +2 -2
  285. data/rdoc/RubyXL/PrinterSettingsFile.html +2 -2
  286. data/rdoc/RubyXL/ProtectedRange.html +2 -2
  287. data/rdoc/RubyXL/ProtectedRanges.html +2 -2
  288. data/rdoc/RubyXL/Protection.html +2 -2
  289. data/rdoc/RubyXL/RID.html +2 -2
  290. data/rdoc/RubyXL/RawOOXML.html +2 -2
  291. data/rdoc/RubyXL/Reference.html +6 -6
  292. data/rdoc/RubyXL/Relationship.html +2 -2
  293. data/rdoc/RubyXL/RelationshipSupport.html +3 -3
  294. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +2 -2
  295. data/rdoc/RubyXL/RichText.html +2 -2
  296. data/rdoc/RubyXL/RichTextRun.html +2 -2
  297. data/rdoc/RubyXL/Row.html +16 -2
  298. data/rdoc/RubyXL/RowExt.html +2 -2
  299. data/rdoc/RubyXL/RunProperties.html +2 -2
  300. data/rdoc/RubyXL/Scenario.html +2 -2
  301. data/rdoc/RubyXL/Scenarios.html +2 -2
  302. data/rdoc/RubyXL/Selection.html +2 -2
  303. data/rdoc/RubyXL/ShapeGuide.html +2 -2
  304. data/rdoc/RubyXL/ShapeTextRectangle.html +2 -2
  305. data/rdoc/RubyXL/SharedStringsTable.html +3 -3
  306. data/rdoc/RubyXL/Sheet.html +2 -2
  307. data/rdoc/RubyXL/SheetCalculationProperties.html +2 -2
  308. data/rdoc/RubyXL/SheetData.html +4 -4
  309. data/rdoc/RubyXL/SheetDataExt.html +2 -2
  310. data/rdoc/RubyXL/SheetDataSet.html +2 -2
  311. data/rdoc/RubyXL/SheetName.html +2 -2
  312. data/rdoc/RubyXL/SheetNames.html +2 -2
  313. data/rdoc/RubyXL/Sheets.html +2 -2
  314. data/rdoc/RubyXL/SlicerCacheFile.html +2 -2
  315. data/rdoc/RubyXL/SlicerFile.html +2 -2
  316. data/rdoc/RubyXL/SmartTagProperties.html +2 -2
  317. data/rdoc/RubyXL/SmartTagType.html +2 -2
  318. data/rdoc/RubyXL/SmartTagTypes.html +2 -2
  319. data/rdoc/RubyXL/SmartTags.html +2 -2
  320. data/rdoc/RubyXL/SortCondition.html +2 -2
  321. data/rdoc/RubyXL/SortState.html +2 -2
  322. data/rdoc/RubyXL/Sqref.html +3 -3
  323. data/rdoc/RubyXL/Stop.html +2 -2
  324. data/rdoc/RubyXL/StringNode.html +2 -2
  325. data/rdoc/RubyXL/StringNodeW3C.html +2 -2
  326. data/rdoc/RubyXL/StringValue.html +2 -2
  327. data/rdoc/RubyXL/Stylesheet.html +3 -3
  328. data/rdoc/RubyXL/TableFile.html +2 -2
  329. data/rdoc/RubyXL/TableParts.html +2 -2
  330. data/rdoc/RubyXL/TableStyle.html +2 -2
  331. data/rdoc/RubyXL/TableStyles.html +2 -2
  332. data/rdoc/RubyXL/Text.html +3 -3
  333. data/rdoc/RubyXL/Theme.html +5 -5
  334. data/rdoc/RubyXL/ThemeElements.html +2 -2
  335. data/rdoc/RubyXL/ThumbnailFile.html +2 -2
  336. data/rdoc/RubyXL/Top10.html +2 -2
  337. data/rdoc/RubyXL/VMLDrawingFile.html +3 -3
  338. data/rdoc/RubyXL/Variant.html +2 -2
  339. data/rdoc/RubyXL/Vector.html +2 -2
  340. data/rdoc/RubyXL/VectorValue.html +2 -2
  341. data/rdoc/RubyXL/VisualProperties.html +2 -2
  342. data/rdoc/RubyXL/WebPublishObject.html +2 -2
  343. data/rdoc/RubyXL/WebPublishObjects.html +2 -2
  344. data/rdoc/RubyXL/WebPublishingItem.html +2 -2
  345. data/rdoc/RubyXL/WebPublishingItems.html +2 -2
  346. data/rdoc/RubyXL/WebPublishingProperties.html +2 -2
  347. data/rdoc/RubyXL/Workbook.html +5 -5
  348. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +34 -34
  349. data/rdoc/RubyXL/WorkbookProperties.html +2 -2
  350. data/rdoc/RubyXL/WorkbookProtection.html +2 -2
  351. data/rdoc/RubyXL/WorkbookRoot.html +2 -2
  352. data/rdoc/RubyXL/WorkbookView.html +2 -2
  353. data/rdoc/RubyXL/WorkbookViews.html +2 -2
  354. data/rdoc/RubyXL/Worksheet.html +4 -4
  355. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +243 -208
  356. data/rdoc/RubyXL/WorksheetDimensions.html +2 -2
  357. data/rdoc/RubyXL/WorksheetFormatProperties.html +2 -2
  358. data/rdoc/RubyXL/WorksheetProperties.html +2 -2
  359. data/rdoc/RubyXL/WorksheetProtection.html +2 -2
  360. data/rdoc/RubyXL/WorksheetView.html +2 -2
  361. data/rdoc/RubyXL/WorksheetViews.html +2 -2
  362. data/rdoc/RubyXL/XF.html +2 -2
  363. data/rdoc/created.rid +28 -28
  364. data/rdoc/index.html +3 -3
  365. data/rdoc/js/navigation.js.gz +0 -0
  366. data/rdoc/js/search_index.js +1 -1
  367. data/rdoc/js/search_index.js.gz +0 -0
  368. data/rdoc/js/searcher.js +2 -2
  369. data/rdoc/js/searcher.js.gz +0 -0
  370. data/rdoc/table_of_contents.html +185 -195
  371. data/rubyXL.gemspec +13 -8
  372. data/spec/lib/cell_spec.rb +1 -2
  373. data/spec/lib/color_spec.rb +1 -2
  374. data/spec/lib/parser_spec.rb +3 -4
  375. data/spec/lib/reference_spec.rb +1 -2
  376. data/spec/lib/stylesheet_spec.rb +1 -2
  377. data/spec/lib/text_spec.rb +1 -1
  378. data/spec/lib/workbook_spec.rb +1 -2
  379. data/spec/lib/worksheet_spec.rb +1 -8
  380. data/spec/spec_helper.rb +11 -0
  381. metadata +38 -42
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cbf354d127afcb15c81218739d5a092b8bb41de7
4
+ data.tar.gz: 504efe47d0b6bd8ec35965fda0db5fdab339c3e5
5
+ SHA512:
6
+ metadata.gz: 1ce62590ad386c957c8e68db937b5702fc8aab86a0536414b6134f3c73d2b7db03c8426bb0fd43b77b6da9f6eb46405f798f1f8906bdcb609c7fa823a89b99df
7
+ data.tar.gz: 5f7c1c4ccca984714f663c79e9485db4e1d98aa49ee637168aa79fe0e2dc74351ae491bfd7ba777a16f78861f8eda6fac398f5de44f9e206d5a644c9f8d3d1d7
data/Gemfile CHANGED
@@ -5,12 +5,12 @@ gem "nokogiri", ">= 1.4.4"
5
5
  gem "rubyzip", ">= 1.1.6" , :require => 'zip'
6
6
 
7
7
  # Development dependencies.
8
- group :development do
8
+ group :development, :test do
9
9
  gem "bundler"
10
10
  gem "rake"
11
11
  gem "jeweler"
12
- # gem "simplecov", ">= 0"
13
- gem "rspec", ">= 1.3.4"
12
+ gem "rspec"
13
+ gem "simplecov"
14
14
 
15
15
  # gem 'stackprof'
16
16
  gem 'ruby-prof'
data/README.rdoc CHANGED
@@ -29,11 +29,15 @@ Please note that proprietary binary +xls+ format is *not* supported.
29
29
  workbook['Sheet1'] # Finds and returns worksheet titled "Sheet1"
30
30
 
31
31
  ==== Accessing a Row (Array of Cells)
32
+ Please note that worksheets are sparse collections. Your code *must* expect that any row it encounters may be `nil`.
33
+
32
34
  worksheet = workbook[0]
33
35
  worksheet.sheet_data[0] # Returns first row of the worksheet
34
36
  worksheet[0] # Returns first row of the worksheet
35
37
 
36
38
  ==== Accessing a Cell object
39
+ Please note that rows are sparse collections. Your code *must* expect that any cell it encounters may be `nil`.
40
+
37
41
  worksheet = workbook[0]
38
42
  worksheet.sheet_data[0][0] # Returns cell A1 in the worksheet
39
43
  worksheet[0][0] # Returns cell A1 in the worksheet
@@ -47,7 +51,7 @@ Please note that proprietary binary +xls+ format is *not* supported.
47
51
  cell.fill_color
48
52
  cell.horizontal_alignment
49
53
  cell.vertical_alignment
50
- cell.border_top
54
+ cell.get_border(:top)
51
55
 
52
56
  ==== Wrappers for accessing Row properties
53
57
  Please note: these methods are being phased out in favor of the OOXML object model.
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  require 'rubygems'
3
- require 'bundler'
4
3
 
4
+ require 'bundler'
5
5
  begin
6
6
  Bundler.setup(:default, :development)
7
7
  rescue Bundler::BundlerError => e
@@ -9,7 +9,6 @@ rescue Bundler::BundlerError => e
9
9
  $stderr.puts "Run `bundle install` to install missing gems"
10
10
  exit e.status_code
11
11
  end
12
- require 'rake'
13
12
 
14
13
  require 'jeweler'
15
14
  Jeweler::Tasks.new do |gem|
@@ -30,18 +29,9 @@ Rake::TestTask.new(:test) do |test|
30
29
  test.libs << 'lib' << 'test'
31
30
  test.pattern = 'test/**/test_*.rb'
32
31
  test.verbose = true
32
+ test.warning = true
33
33
  end
34
34
 
35
- =begin
36
- require 'rcov/rcovtask'
37
- Rcov::RcovTask.new do |test|
38
- test.libs << 'test'
39
- test.pattern = 'test/**/test_*.rb'
40
- test.verbose = true
41
- test.rcov_opts << '--exclude "gems/*"'
42
- end
43
- =end
44
-
45
35
  require 'rspec/core/rake_task'
46
36
  RSpec::Core::RakeTask.new(:spec)
47
37
  task :default => :spec
@@ -56,8 +46,8 @@ Rake::RDocTask.new do |rdoc|
56
46
  rdoc.rdoc_files.include('lib/**/*.rb')
57
47
  end
58
48
 
59
- desc "Dump profiling data"
60
- task :profile do
49
+ desc "Dump profiling data with stackprof"
50
+ task :stackprof do
61
51
  require 'benchmark'
62
52
  require 'stackprof'
63
53
 
@@ -83,8 +73,8 @@ task :profile do
83
73
  }
84
74
  end
85
75
 
86
- desc "Dump profiling data 2"
87
- task :prof do
76
+ desc "Dump profiling data with ruby-prof"
77
+ task :rubyprof do
88
78
  require 'benchmark'
89
79
  require 'ruby-prof'
90
80
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.15
1
+ 3.3.16
@@ -1,4 +1,5 @@
1
1
  module RubyXL
2
+
2
3
  module WorkbookConvenienceMethods
3
4
  SHEET_NAME_TEMPLATE = 'Sheet%d'
4
5
 
@@ -208,7 +209,7 @@ module RubyXL
208
209
  raise 'invalid shift option'
209
210
  end
210
211
 
211
- return add_cell(row,col,data,formula)
212
+ return add_cell(row, col, data, formula)
212
213
  end
213
214
 
214
215
  # by default, only sets cell to nil
@@ -324,13 +325,13 @@ module RubyXL
324
325
  validate_workbook
325
326
  validate_nonnegative(column_index)
326
327
 
327
- #delete column
328
+ # Delete column
328
329
  sheet_data.rows.each { |row| row.cells.delete_at(column_index) }
329
330
 
330
- # Change column numbers for cells to the right of the deleted column
331
+ # Update column numbers for cells to the right of the deleted column
331
332
  sheet_data.rows.each_with_index { |row, row_index|
332
- row.cells.each_with_index { |c, column_index|
333
- c.column = column_index if c.is_a?(Cell)
333
+ row.cells.each_with_index { |c, ci|
334
+ c.column = ci if c.is_a?(Cell)
334
335
  }
335
336
  }
336
337
 
@@ -380,7 +381,7 @@ module RubyXL
380
381
  validate_workbook
381
382
  validate_nonnegative(row)
382
383
  row = sheet_data.rows[row]
383
- row && row.ht || 13
384
+ row && row.ht || RubyXL::Row::DEFAULT_HEIGHT
384
385
  end
385
386
 
386
387
  def get_row_border(row, border_direction)
@@ -473,6 +474,21 @@ module RubyXL
473
474
  (width - (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)).round
474
475
  end
475
476
 
477
+ # Set raw column width value
478
+ def change_column_width_raw(column_index, width)
479
+ validate_workbook
480
+ ensure_cell_exists(0, column_index)
481
+ range = cols.get_range(column_index)
482
+ range.width = width
483
+ range.custom_width = true
484
+ end
485
+
486
+ # Get column width measured in number of digits, as per
487
+ # http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx
488
+ def change_column_width(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)
489
+ change_column_width_raw(column_index, ((width_in_chars + (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)) * 256).to_i / 256.0)
490
+ end
491
+
476
492
  # Helper method to get the style index for a column
477
493
  def get_col_style(column_index)
478
494
  range = cols.locate_range(column_index)
@@ -486,6 +502,19 @@ module RubyXL
486
502
  @workbook.get_fill_color(get_col_xf(col))
487
503
  end
488
504
 
505
+ def change_column_fill(column_index, color_code = 'ffffff')
506
+ validate_workbook
507
+ RubyXL::Color.validate_color(color_code)
508
+ ensure_cell_exists(0, column_index)
509
+
510
+ cols.get_range(column_index).style_index = @workbook.modify_fill(get_col_style(column_index), color_code)
511
+
512
+ sheet_data.rows.each { |row|
513
+ c = row[column_index]
514
+ c.change_fill(color_code) if c
515
+ }
516
+ end
517
+
489
518
  def get_column_border(col, border_direction)
490
519
  validate_workbook
491
520
 
@@ -725,70 +754,16 @@ module RubyXL
725
754
  }
726
755
  end
727
756
 
728
- # Returns 2D array of just the cell values (without style or formula information)
729
- def extract_data(args = {})
730
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please access data directly by iterating through .sheet_data.rows"
731
- sheet_data.rows.map { |row|
732
- row.cells.map { |c| c && c.value(args) } unless row.nil?
733
- }
734
- end
735
-
736
- def get_table(headers = [], opts = {})
737
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please access data directly by iterating through .sheet_data.rows"
757
+ # Merges cells within a rectangular area
758
+ def merge_cells(start_row, start_col, end_row, end_col)
738
759
  validate_workbook
739
760
 
740
- headers = [headers] unless headers.is_a?(Array)
741
- row_num = find_first_row_with_content(headers)
742
- return nil if row_num.nil?
743
-
744
- table_hash = {}
745
- table_hash[:table] = []
746
-
747
- header_row = sheet_data[row_num]
748
- header_row.cells.each_with_index { |header_cell, index|
749
- break if index>0 && !opts[:last_header].nil? && !header_row[index-1].nil? && !header_row[index-1].value.nil? && header_row[index-1].value.to_s==opts[:last_header]
750
- next if header_cell.nil? || header_cell.value.nil?
751
- header = header_cell.value.to_s
752
- table_hash[:sorted_headers]||=[]
753
- table_hash[:sorted_headers] << header
754
- table_hash[header] = []
755
-
756
- original_row = row_num + 1
757
- current_row = original_row
758
-
759
- row = sheet_data.rows[current_row]
760
- cell = row && row.cells[index]
761
-
762
- # makes array of hashes in table_hash[:table]
763
- # as well as hash of arrays in table_hash[header]
764
- table_index = current_row - original_row
765
- cell_test = (!cell.nil? && !cell.value.nil?)
766
-
767
- while cell_test || (table_hash[:table][table_index] && !table_hash[:table][table_index].empty?)
768
- table_hash[header] << cell.value if cell_test
769
- table_index = current_row - original_row
770
-
771
- if cell_test then
772
- table_hash[:table][table_index] ||= {}
773
- table_hash[:table][table_index][header] = cell.value
774
- end
775
-
776
- current_row += 1
777
- if sheet_data.rows[current_row].nil? then
778
- cell = nil
779
- else
780
- cell = sheet_data.rows[current_row].cells[index]
781
- end
782
- cell_test = (!cell.nil? && !cell.value.nil?)
783
- end
784
- }
785
-
786
- return table_hash
761
+ self.merged_cells ||= RubyXL::MergedCells.new
762
+ # TODO: add validation to make sure ranges are not intersecting with existing ones
763
+ merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(start_row, end_row, start_col, end_col))
787
764
  end
788
-
789
765
  end
790
766
 
791
-
792
767
  module CellConvenienceMethods
793
768
 
794
769
  def change_contents(data, formula_expression = nil)
@@ -218,6 +218,8 @@ module RubyXL
218
218
  private :obtain_class_variable
219
219
 
220
220
  def initialize(params = {})
221
+ @local_namespaces = nil
222
+
221
223
  obtain_class_variable(:@@ooxml_attributes).each_value { |v|
222
224
  instance_variable_set("@#{v[:accessor]}", params[v[:accessor]]) unless v[:computed]
223
225
  }
@@ -300,7 +302,7 @@ module RubyXL
300
302
  elem = xml.create_element(node_name_override || obtain_class_variable(:@@ooxml_tag_name), attrs, element_text)
301
303
 
302
304
  if @local_namespaces.nil? || @local_namespaces.empty? then # If no local namespaces provided in the original document,
303
- # use the defualts
305
+ # use the defaults
304
306
  obtain_class_variable(:@@ooxml_namespaces).each_pair { |k, v| elem.add_namespace_definition(v, k) }
305
307
  else # otherwise preserve the original ones
306
308
  @local_namespaces.each { |ns| elem.add_namespace_definition(ns.prefix, ns.href) }
@@ -161,6 +161,8 @@ module RubyXL
161
161
  def get_font
162
162
  @worksheet.workbook.fonts[xf.font_id]
163
163
  end
164
+
165
+ DEFAULT_HEIGHT = 13
164
166
  end
165
167
 
166
168
  # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetData-1.html
@@ -24,7 +24,7 @@ module RubyXL
24
24
  end
25
25
 
26
26
  def to_s
27
- value.to_s.gsub(ESCAPED_UNICODE) { |m| $1.hex.chr(Encoding::UTF_8) }
27
+ value.to_s.gsub(ESCAPED_UNICODE) { |m| $1.hex.chr(::Encoding::UTF_8) }
28
28
  end
29
29
  end
30
30
 
@@ -23,59 +23,6 @@ module LegacyWorksheet
23
23
  sheet_data.rows.each { |row| yield(row) }
24
24
  end
25
25
 
26
- # finds first row which contains at least all strings in cells_content
27
- def find_first_row_with_content(cells_content)
28
- validate_workbook
29
-
30
- sheet_data.rows.each_with_index { |row, index|
31
- next if row.nil?
32
- cells_content = cells_content.map { |header| header.to_s.strip.downcase }
33
- original_cells_content = row.cells.map { |cell| (cell && cell.value).to_s.strip.downcase }
34
-
35
- if (cells_content & original_cells_content).size == cells_content.size
36
- return index
37
- end
38
- }
39
- return nil
40
- end
41
- private :find_first_row_with_content
42
-
43
- # Set raw column width value
44
- def change_column_width_raw(column_index, width)
45
- validate_workbook
46
- ensure_cell_exists(0, column_index)
47
- range = cols.get_range(column_index)
48
- range.width = width
49
- range.custom_width = true
50
- end
51
-
52
- # Get column width measured in number of digits, as per
53
- # http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx
54
- def change_column_width(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)
55
- change_column_width_raw(column_index, ((width_in_chars + (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)) * 256).to_i / 256.0)
56
- end
57
-
58
- def change_column_fill(column_index, color_index='ffffff')
59
- validate_workbook
60
- Color.validate_color(color_index)
61
- ensure_cell_exists(0, column_index)
62
-
63
- cols.get_range(column_index).style_index = @workbook.modify_fill(get_col_style(column_index), color_index)
64
-
65
- sheet_data.rows.each { |row|
66
- c = row[column_index]
67
- c.change_fill(color_index) if c
68
- }
69
- end
70
-
71
- # merges cells within a rectangular range
72
- def merge_cells(row1 = 0, col1 = 0, row2 = 0, col2 = 0)
73
- validate_workbook
74
-
75
- self.merged_cells ||= RubyXL::MergedCells.new
76
- merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(row1, row2, col1, col2))
77
- end
78
-
79
26
  def add_row(row_index = 0, params = {})
80
27
  new_row = RubyXL::Row.new(params)
81
28
  new_row.worksheet = self
@@ -118,13 +65,13 @@ module LegacyWorksheet
118
65
  raise "This worksheet #{self} is not in workbook #{@workbook}"
119
66
  end
120
67
 
121
- # Ensures that cell with +row_index+ and +column_index+ exists in
122
- # +sheet_data+ arrays, growing them up if necessary.
68
+ # Ensures that storage space for a cell with +row_index+ and +column_index+
69
+ # exists in +sheet_data+ arrays, growing them up if necessary.
123
70
  def ensure_cell_exists(row_index, column_index = 0)
124
71
  validate_nonnegative(row_index)
125
72
  validate_nonnegative(column_index)
126
73
 
127
- row = sheet_data.rows[row_index] || add_row(row_index)
74
+ sheet_data.rows[row_index] || add_row(row_index)
128
75
  end
129
76
 
130
77
  def get_col_xf(column_index)
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>README - rubyXL 3.3.15</title>
7
+ <title>README - rubyXL 3.3.16</title>
8
8
 
9
9
  <script type="text/javascript">
10
10
  var rdoc_rel_prefix = "./";
@@ -138,7 +138,7 @@ preserving as much of the structure as possible.</p>
138
138
 
139
139
  <h2 id="label-To+Use-3A">To Use:<span><a href="#label-To+Use-3A">&para;</a> <a href="#top">&uarr;</a></span></h2>
140
140
 
141
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'rubyXL'</span> <span class="ruby-comment"># Assuming rubygems is already required</span>
141
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;rubyXL&#39;</span> <span class="ruby-comment"># Assuming rubygems is already required</span>
142
142
  </pre>
143
143
 
144
144
  <h3 id="label-Parsing+an+existing+workbook">Parsing an existing workbook<span><a href="#label-Parsing+an+existing+workbook">&para;</a> <a href="#top">&uarr;</a></span></h3>
@@ -157,11 +157,14 @@ preserving as much of the structure as possible.</p>
157
157
 
158
158
  <pre class="ruby"><span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">worksheets</span>[<span class="ruby-value">0</span>] <span class="ruby-comment"># Returns first worksheet</span>
159
159
  <span class="ruby-identifier">workbook</span>[<span class="ruby-value">0</span>] <span class="ruby-comment"># Returns first worksheet</span>
160
- <span class="ruby-identifier">workbook</span>[<span class="ruby-string">'Sheet1'</span>] <span class="ruby-comment"># Finds and returns worksheet titled &quot;Sheet1&quot;</span>
160
+ <span class="ruby-identifier">workbook</span>[<span class="ruby-string">&#39;Sheet1&#39;</span>] <span class="ruby-comment"># Finds and returns worksheet titled &quot;Sheet1&quot;</span>
161
161
  </pre>
162
162
 
163
163
  <h4 id="label-Accessing+a+Row+-28Array+of+Cells-29">Accessing a Row (Array of Cells)<span><a href="#label-Accessing+a+Row+-28Array+of+Cells-29">&para;</a> <a href="#top">&uarr;</a></span></h4>
164
164
 
165
+ <p>Please note that worksheets are sparse collections. Your code
166
+ <strong>must</strong> expect that any row it encounters may be `nil`.</p>
167
+
165
168
  <pre class="ruby"><span class="ruby-identifier">worksheet</span> = <span class="ruby-identifier">workbook</span>[<span class="ruby-value">0</span>]
166
169
  <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>] <span class="ruby-comment"># Returns first row of the worksheet</span>
167
170
  <span class="ruby-identifier">worksheet</span>[<span class="ruby-value">0</span>] <span class="ruby-comment"># Returns first row of the worksheet</span>
@@ -169,6 +172,9 @@ preserving as much of the structure as possible.</p>
169
172
 
170
173
  <h4 id="label-Accessing+a+Cell+object">Accessing a Cell object<span><a href="#label-Accessing+a+Cell+object">&para;</a> <a href="#top">&uarr;</a></span></h4>
171
174
 
175
+ <p>Please note that rows are sparse collections. Your code
176
+ <strong>must</strong> expect that any cell it encounters may be `nil`.</p>
177
+
172
178
  <pre class="ruby"><span class="ruby-identifier">worksheet</span> = <span class="ruby-identifier">workbook</span>[<span class="ruby-value">0</span>]
173
179
  <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>] <span class="ruby-comment"># Returns cell A1 in the worksheet</span>
174
180
  <span class="ruby-identifier">worksheet</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>] <span class="ruby-comment"># Returns cell A1 in the worksheet</span>
@@ -184,7 +190,7 @@ preserving as much of the structure as possible.</p>
184
190
  <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">fill_color</span>
185
191
  <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">horizontal_alignment</span>
186
192
  <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">vertical_alignment</span>
187
- <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">border_top</span>
193
+ <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">get_border</span>(:<span class="ruby-identifier">top</span>)
188
194
  </pre>
189
195
 
190
196
  <h4 id="label-Wrappers+for+accessing+Row+properties+">Wrappers for accessing Row properties <span><a href="#label-Wrappers+for+accessing+Row+properties+">&para;</a> <a href="#top">&uarr;</a></span></h4>
@@ -239,18 +245,18 @@ You should access and iterate through rows and cells directly:</p>
239
245
 
240
246
  <h4 id="label-Adding+Worksheets">Adding Worksheets<span><a href="#label-Adding+Worksheets">&para;</a> <a href="#top">&uarr;</a></span></h4>
241
247
 
242
- <pre class="ruby"><span class="ruby-identifier">worksheet</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">add_worksheet</span>(<span class="ruby-string">'Sheet2'</span>)
248
+ <pre class="ruby"><span class="ruby-identifier">worksheet</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">add_worksheet</span>(<span class="ruby-string">&#39;Sheet2&#39;</span>)
243
249
  </pre>
244
250
 
245
251
  <h4 id="label-Renaming+Worksheets">Renaming Worksheets<span><a href="#label-Renaming+Worksheets">&para;</a> <a href="#top">&uarr;</a></span></h4>
246
252
 
247
- <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_name</span> = <span class="ruby-string">'Cool New Name'</span>
253
+ <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_name</span> = <span class="ruby-string">&#39;Cool New Name&#39;</span>
248
254
  </pre>
249
255
 
250
256
  <h4 id="label-Adding+Cells">Adding Cells<span><a href="#label-Adding+Cells">&para;</a> <a href="#top">&uarr;</a></span></h4>
251
257
 
252
- <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">add_cell</span>(<span class="ruby-value">0</span>, <span class="ruby-value">0</span>, <span class="ruby-string">'A1'</span>) <span class="ruby-comment"># Sets cell A1 to string &quot;A1&quot;</span>
253
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">add_cell</span>(<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-string">''</span>, <span class="ruby-string">'A1'</span>) <span class="ruby-comment"># Sets formula in the cell B1 to '=A1'</span>
258
+ <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">add_cell</span>(<span class="ruby-value">0</span>, <span class="ruby-value">0</span>, <span class="ruby-string">&#39;A1&#39;</span>) <span class="ruby-comment"># Sets cell A1 to string &quot;A1&quot;</span>
259
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">add_cell</span>(<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-string">&#39;&#39;</span>, <span class="ruby-string">&#39;A1&#39;</span>) <span class="ruby-comment"># Sets formula in the cell B1 to &#39;=A1&#39;</span>
254
260
  </pre>
255
261
 
256
262
  <h4 id="label-Changing+Cells">Changing Cells<span><a href="#label-Changing+Cells">&para;</a> <a href="#top">&uarr;</a></span></h4>
@@ -262,23 +268,23 @@ You should access and iterate through rows and cells directly:</p>
262
268
 
263
269
  <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_font_bold</span>(<span class="ruby-keyword">true</span>) <span class="ruby-comment"># Makes A1 bold</span>
264
270
  <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_italics</span>(<span class="ruby-value">0</span>,<span class="ruby-keyword">true</span>) <span class="ruby-comment"># Makes first row italicized</span>
265
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_font_name</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'Courier'</span>) <span class="ruby-comment"># Makes first column have font Courier</span>
271
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_font_name</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;Courier&#39;</span>) <span class="ruby-comment"># Makes first column have font Courier</span>
266
272
  </pre>
267
273
 
268
274
  <h4 id="label-Changing+Fills+++++">Changing Fills <span><a href="#label-Changing+Fills+++++">&para;</a> <a href="#top">&uarr;</a></span></h4>
269
275
 
270
- <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_fill</span>(<span class="ruby-string">'0ba53d'</span>) <span class="ruby-comment"># Sets A1 to have fill #0ba53d</span>
271
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_fill</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'0ba53d'</span>) <span class="ruby-comment"># Sets first row to have fill #0ba53d</span>
272
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_fill</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'0ba53d'</span>) <span class="ruby-comment"># Sets first column to have fill #0ba53d</span>
276
+ <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_fill</span>(<span class="ruby-string">&#39;0ba53d&#39;</span>) <span class="ruby-comment"># Sets A1 to have fill #0ba53d</span>
277
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_fill</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;0ba53d&#39;</span>) <span class="ruby-comment"># Sets first row to have fill #0ba53d</span>
278
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_fill</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;0ba53d&#39;</span>) <span class="ruby-comment"># Sets first column to have fill #0ba53d</span>
273
279
  </pre>
274
280
 
275
281
  <h4 id="label-Changing+Borders">Changing Borders<span><a href="#label-Changing+Borders">&para;</a> <a href="#top">&uarr;</a></span></h4>
276
282
 
277
283
  <pre class="ruby"><span class="ruby-comment"># Possible weights: hairline, thin, medium, thick</span>
278
284
  <span class="ruby-comment"># Possible &quot;directions&quot;: top, bottom, left, right, diagonal</span>
279
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_border</span>(:<span class="ruby-identifier">top</span>, <span class="ruby-string">'thin'</span>) <span class="ruby-comment"># Sets A1 to have a top, thin border</span>
280
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_border</span>(<span class="ruby-value">0</span>, :<span class="ruby-identifier">left</span>, <span class="ruby-string">'hairline'</span>) <span class="ruby-comment"># Sets first row to have a left, hairline border</span>
281
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_border</span>(<span class="ruby-value">0</span>, :<span class="ruby-identifier">diagonal</span>, <span class="ruby-string">'medium'</span>) <span class="ruby-comment"># Sets first column to have diagonal, medium border</span>
285
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_border</span>(:<span class="ruby-identifier">top</span>, <span class="ruby-string">&#39;thin&#39;</span>) <span class="ruby-comment"># Sets A1 to have a top, thin border</span>
286
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_border</span>(<span class="ruby-value">0</span>, :<span class="ruby-identifier">left</span>, <span class="ruby-string">&#39;hairline&#39;</span>) <span class="ruby-comment"># Sets first row to have a left, hairline border</span>
287
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_border</span>(<span class="ruby-value">0</span>, :<span class="ruby-identifier">diagonal</span>, <span class="ruby-string">&#39;medium&#39;</span>) <span class="ruby-comment"># Sets first column to have diagonal, medium border</span>
282
288
  </pre>
283
289
 
284
290
  <h4 id="label-Changing+Alignment">Changing Alignment<span><a href="#label-Changing+Alignment">&para;</a> <a href="#top">&uarr;</a></span></h4>
@@ -287,18 +293,18 @@ You should access and iterate through rows and cells directly:</p>
287
293
 
288
294
  <p>center, distributed, justify, left, right</p>
289
295
 
290
- <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_horizontal_alignment</span>(<span class="ruby-string">'center'</span>) <span class="ruby-comment"># Sets A1 to be centered</span>
291
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_horizontal_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'justify'</span>) <span class="ruby-comment"># Sets first row to be justified</span>
292
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_horizontal_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'right'</span>) <span class="ruby-comment"># Sets first column to be right-aligned</span>
296
+ <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_horizontal_alignment</span>(<span class="ruby-string">&#39;center&#39;</span>) <span class="ruby-comment"># Sets A1 to be centered</span>
297
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_horizontal_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;justify&#39;</span>) <span class="ruby-comment"># Sets first row to be justified</span>
298
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_horizontal_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;right&#39;</span>) <span class="ruby-comment"># Sets first column to be right-aligned</span>
293
299
  </pre>
294
300
 
295
301
  <h5 id="label-Vertical">Vertical<span><a href="#label-Vertical">&para;</a> <a href="#top">&uarr;</a></span></h5>
296
302
 
297
303
  <p>bottom, center, distributed, top</p>
298
304
 
299
- <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_vertical_alignment</span>(<span class="ruby-string">'bottom'</span>) <span class="ruby-comment"># Sets A1 to be bottom aligned</span>
300
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_vertical_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'distributed'</span>) <span class="ruby-comment"># Sets first row to be distributed vertically</span>
301
- <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_vertical_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">'top'</span>) <span class="ruby-comment"># Sets first column to be top aligned</span>
305
+ <pre class="ruby"><span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">sheet_data</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>].<span class="ruby-identifier">change_vertical_alignment</span>(<span class="ruby-string">&#39;bottom&#39;</span>) <span class="ruby-comment"># Sets A1 to be bottom aligned</span>
306
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_row_vertical_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;distributed&#39;</span>) <span class="ruby-comment"># Sets first row to be distributed vertically</span>
307
+ <span class="ruby-identifier">worksheet</span>.<span class="ruby-identifier">change_column_vertical_alignment</span>(<span class="ruby-value">0</span>, <span class="ruby-string">&#39;top&#39;</span>) <span class="ruby-comment"># Sets first column to be top aligned</span>
302
308
  </pre>
303
309
 
304
310
  <h4 id="label-Changing+Row+Height">Changing Row Height<span><a href="#label-Changing+Row+Height">&para;</a> <a href="#top">&uarr;</a></span></h4>
@@ -392,7 +398,7 @@ have been moved, as the formulas do not adapt to the shifted cells</p>
392
398
  <h4 id="label-Modifying+Cell+Format">Modifying Cell Format<span><a href="#label-Modifying+Cell+Format">&para;</a> <a href="#top">&uarr;</a></span></h4>
393
399
 
394
400
  <pre class="ruby"><span class="ruby-identifier">cell</span> = <span class="ruby-identifier">worksheet</span>[<span class="ruby-value">0</span>][<span class="ruby-value">0</span>]
395
- <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">set_number_format</span> <span class="ruby-string">'0.0000%'</span> <span class="ruby-comment"># For formats, see https://support.office.com/en-us/article/5026bbd6-04bc-48cd-bf33-80f18b4eae68</span>
401
+ <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">set_number_format</span> <span class="ruby-string">&#39;0.0000%&#39;</span> <span class="ruby-comment"># For formats, see https://support.office.com/en-us/article/5026bbd6-04bc-48cd-bf33-80f18b4eae68</span>
396
402
  </pre>
397
403
 
398
404
  <h2 id="label-I-2FO">I/O<span><a href="#label-I-2FO">&para;</a> <a href="#top">&uarr;</a></span></h2>
@@ -413,8 +419,8 @@ handy for web servers.</p>
413
419
 
414
420
  <h2 id="label-Miscellaneous">Miscellaneous<span><a href="#label-Miscellaneous">&para;</a> <a href="#top">&uarr;</a></span></h2>
415
421
 
416
- <pre class="ruby"><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ind2ref</span>(<span class="ruby-value">0</span>,<span class="ruby-value">0</span>) <span class="ruby-operator">==</span> <span class="ruby-string">'A1'</span> <span class="ruby-comment"># Converts row and column index to Excel-style cell reference</span>
417
- <span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ref2ind</span>(<span class="ruby-string">'A1'</span>) <span class="ruby-operator">==</span> [<span class="ruby-value">0</span>, <span class="ruby-value">0</span>] <span class="ruby-comment"># Converts Excel-style cell reference to row and column index</span>
422
+ <pre class="ruby"><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ind2ref</span>(<span class="ruby-value">0</span>,<span class="ruby-value">0</span>) <span class="ruby-operator">==</span> <span class="ruby-string">&#39;A1&#39;</span> <span class="ruby-comment"># Converts row and column index to Excel-style cell reference</span>
423
+ <span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ref2ind</span>(<span class="ruby-string">&#39;A1&#39;</span>) <span class="ruby-operator">==</span> [<span class="ruby-value">0</span>, <span class="ruby-value">0</span>] <span class="ruby-comment"># Converts Excel-style cell reference to row and column index</span>
418
424
  </pre>
419
425
 
420
426
  <h2 id="label-For+more+information">For more information<span><a href="#label-For+more+information">&para;</a> <a href="#top">&uarr;</a></span></h2>
@@ -423,11 +429,11 @@ handy for web servers.</p>
423
429
 
424
430
  <h2 id="label-Contributing+to+rubyXL">Contributing to rubyXL<span><a href="#label-Contributing+to+rubyXL">&para;</a> <a href="#top">&uarr;</a></span></h2>
425
431
  <ul><li>
426
- <p>Check out the latest master to make sure the feature hasnt been
427
- implemented or the bug hasnt been fixed yet</p>
432
+ <p>Check out the latest master to make sure the feature hasn&#39;t been
433
+ implemented or the bug hasn&#39;t been fixed yet</p>
428
434
  </li><li>
429
- <p>Check out the issue tracker to make sure someone already hasnt requested
430
- it and/or contributed it</p>
435
+ <p>Check out the issue tracker to make sure someone already hasn&#39;t
436
+ requested it and/or contributed it</p>
431
437
  </li><li>
432
438
  <p>Fork the project</p>
433
439
  </li><li>
@@ -435,8 +441,8 @@ it and/or contributed it</p>
435
441
  </li><li>
436
442
  <p>Commit and push until you are happy with your contribution</p>
437
443
  </li><li>
438
- <p>Make sure to add tests for it. This is important so I dont break it in a
439
- future version unintentionally.</p>
444
+ <p>Make sure to add tests for it. This is important so I don&#39;t break it in
445
+ a future version unintentionally.</p>
440
446
  </li><li>
441
447
  <p>Please try not to mess with the Rakefile, version, or history. If you want
442
448
  to have your own version, or is otherwise necessary, that is fine, but
@@ -453,7 +459,7 @@ further details.</p>
453
459
 
454
460
  <footer id="validator-badges" role="contentinfo">
455
461
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
456
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
462
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
457
463
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
458
464
  </footer>
459
465