rubyXL 3.2.7 → 3.3.0

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 (361) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/Rakefile +28 -2
  4. data/VERSION +1 -1
  5. data/lib/rubyXL/cell.rb +0 -5
  6. data/lib/rubyXL/convenience_methods.rb +30 -52
  7. data/lib/rubyXL/objects/ooxml_object.rb +2 -0
  8. data/lib/rubyXL/objects/root.rb +16 -2
  9. data/lib/rubyXL/parser.rb +3 -32
  10. data/lib/rubyXL/worksheet.rb +29 -91
  11. data/rdoc/README_rdoc.html +1 -1
  12. data/rdoc/RubyXL.html +1 -1
  13. data/rdoc/RubyXL/AExtension.html +1 -1
  14. data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
  15. data/rdoc/RubyXL/AdjustHandleList.html +1 -1
  16. data/rdoc/RubyXL/Alignment.html +1 -1
  17. data/rdoc/RubyXL/AlternateContent.html +1 -1
  18. data/rdoc/RubyXL/Authors.html +1 -1
  19. data/rdoc/RubyXL/AutoFilter.html +1 -1
  20. data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
  21. data/rdoc/RubyXL/BinaryImageFile.html +1 -1
  22. data/rdoc/RubyXL/BodyProperties.html +1 -1
  23. data/rdoc/RubyXL/BooleanNode.html +1 -1
  24. data/rdoc/RubyXL/BooleanValue.html +1 -1
  25. data/rdoc/RubyXL/Border.html +1 -1
  26. data/rdoc/RubyXL/BorderEdge.html +1 -1
  27. data/rdoc/RubyXL/Borders.html +1 -1
  28. data/rdoc/RubyXL/Break.html +1 -1
  29. data/rdoc/RubyXL/BreakList.html +1 -1
  30. data/rdoc/RubyXL/CT_AdjPoint2D.html +1 -1
  31. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +1 -1
  32. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +1 -1
  33. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +1 -1
  34. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +1 -1
  35. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +1 -1
  36. data/rdoc/RubyXL/CT_Backdrop.html +1 -1
  37. data/rdoc/RubyXL/CT_Bevel.html +1 -1
  38. data/rdoc/RubyXL/CT_BiLevelEffect.html +1 -1
  39. data/rdoc/RubyXL/CT_BlendEffect.html +1 -1
  40. data/rdoc/RubyXL/CT_Blip.html +1 -1
  41. data/rdoc/RubyXL/CT_BlipFillProperties.html +1 -1
  42. data/rdoc/RubyXL/CT_BlurEffect.html +1 -1
  43. data/rdoc/RubyXL/CT_Camera.html +1 -1
  44. data/rdoc/RubyXL/CT_Color.html +1 -1
  45. data/rdoc/RubyXL/CT_ColorChangeEffect.html +1 -1
  46. data/rdoc/RubyXL/CT_ColorMapping.html +1 -1
  47. data/rdoc/RubyXL/CT_ColorScheme.html +1 -1
  48. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +1 -1
  49. data/rdoc/RubyXL/CT_ConnectionSite.html +1 -1
  50. data/rdoc/RubyXL/CT_ConnectionSiteList.html +1 -1
  51. data/rdoc/RubyXL/CT_DashStop.html +1 -1
  52. data/rdoc/RubyXL/CT_DashStopList.html +1 -1
  53. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +1 -1
  54. data/rdoc/RubyXL/CT_DuotoneEffect.html +1 -1
  55. data/rdoc/RubyXL/CT_EffectContainer.html +1 -1
  56. data/rdoc/RubyXL/CT_EffectList.html +1 -1
  57. data/rdoc/RubyXL/CT_EffectReference.html +1 -1
  58. data/rdoc/RubyXL/CT_EffectStyleItem.html +1 -1
  59. data/rdoc/RubyXL/CT_EffectStyleList.html +1 -1
  60. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +1 -1
  61. data/rdoc/RubyXL/CT_FillEffect.html +1 -1
  62. data/rdoc/RubyXL/CT_FillOverlayEffect.html +1 -1
  63. data/rdoc/RubyXL/CT_FillStyleList.html +1 -1
  64. data/rdoc/RubyXL/CT_FlatText.html +1 -1
  65. data/rdoc/RubyXL/CT_FontCollection.html +1 -1
  66. data/rdoc/RubyXL/CT_FontReference.html +1 -1
  67. data/rdoc/RubyXL/CT_GeomGuideList.html +1 -1
  68. data/rdoc/RubyXL/CT_GlowEffect.html +1 -1
  69. data/rdoc/RubyXL/CT_GradientFillProperties.html +1 -1
  70. data/rdoc/RubyXL/CT_GradientStop.html +1 -1
  71. data/rdoc/RubyXL/CT_GradientStopList.html +1 -1
  72. data/rdoc/RubyXL/CT_HSLEffect.html +1 -1
  73. data/rdoc/RubyXL/CT_HslColor.html +1 -1
  74. data/rdoc/RubyXL/CT_Hyperlink.html +1 -1
  75. data/rdoc/RubyXL/CT_InnerShadowEffect.html +1 -1
  76. data/rdoc/RubyXL/CT_LightRig.html +1 -1
  77. data/rdoc/RubyXL/CT_LineEndProperties.html +1 -1
  78. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +1 -1
  79. data/rdoc/RubyXL/CT_LineProperties.html +1 -1
  80. data/rdoc/RubyXL/CT_LineStyleList.html +1 -1
  81. data/rdoc/RubyXL/CT_LinearShadeProperties.html +1 -1
  82. data/rdoc/RubyXL/CT_LuminanceEffect.html +1 -1
  83. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +1 -1
  84. data/rdoc/RubyXL/CT_OuterShadowEffect.html +1 -1
  85. data/rdoc/RubyXL/CT_Path2D.html +1 -1
  86. data/rdoc/RubyXL/CT_Path2DArcTo.html +1 -1
  87. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +1 -1
  88. data/rdoc/RubyXL/CT_Path2DList.html +1 -1
  89. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +1 -1
  90. data/rdoc/RubyXL/CT_Path2DTo.html +1 -1
  91. data/rdoc/RubyXL/CT_PathShadeProperties.html +1 -1
  92. data/rdoc/RubyXL/CT_PatternFillProperties.html +1 -1
  93. data/rdoc/RubyXL/CT_Point3D.html +1 -1
  94. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +1 -1
  95. data/rdoc/RubyXL/CT_PresetColor.html +1 -1
  96. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +1 -1
  97. data/rdoc/RubyXL/CT_PresetShadowEffect.html +1 -1
  98. data/rdoc/RubyXL/CT_PresetTextShape.html +1 -1
  99. data/rdoc/RubyXL/CT_ReflectionEffect.html +1 -1
  100. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +1 -1
  101. data/rdoc/RubyXL/CT_RelativeRect.html +1 -1
  102. data/rdoc/RubyXL/CT_SRgbColor.html +1 -1
  103. data/rdoc/RubyXL/CT_ScRgbColor.html +1 -1
  104. data/rdoc/RubyXL/CT_Scene3D.html +1 -1
  105. data/rdoc/RubyXL/CT_SchemeColor.html +1 -1
  106. data/rdoc/RubyXL/CT_Shape3D.html +1 -1
  107. data/rdoc/RubyXL/CT_ShapeStyle.html +1 -1
  108. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +1 -1
  109. data/rdoc/RubyXL/CT_SphereCoords.html +1 -1
  110. data/rdoc/RubyXL/CT_StretchInfoProperties.html +1 -1
  111. data/rdoc/RubyXL/CT_StyleMatrix.html +1 -1
  112. data/rdoc/RubyXL/CT_StyleMatrixReference.html +1 -1
  113. data/rdoc/RubyXL/CT_SupplementalFont.html +1 -1
  114. data/rdoc/RubyXL/CT_SystemColor.html +1 -1
  115. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +1 -1
  116. data/rdoc/RubyXL/CT_TextBlipBullet.html +1 -1
  117. data/rdoc/RubyXL/CT_TextCharBullet.html +1 -1
  118. data/rdoc/RubyXL/CT_TextCharacterProperties.html +1 -1
  119. data/rdoc/RubyXL/CT_TextFont.html +1 -1
  120. data/rdoc/RubyXL/CT_TextListStyle.html +1 -1
  121. data/rdoc/RubyXL/CT_TextNormalAutofit.html +1 -1
  122. data/rdoc/RubyXL/CT_TextParagraphProperties.html +1 -1
  123. data/rdoc/RubyXL/CT_TextSpacing.html +1 -1
  124. data/rdoc/RubyXL/CT_TextTabStop.html +1 -1
  125. data/rdoc/RubyXL/CT_TextTabStopList.html +1 -1
  126. data/rdoc/RubyXL/CT_TileInfoProperties.html +1 -1
  127. data/rdoc/RubyXL/CT_TintEffect.html +1 -1
  128. data/rdoc/RubyXL/CT_Transform2D.html +1 -1
  129. data/rdoc/RubyXL/CT_TransformEffect.html +1 -1
  130. data/rdoc/RubyXL/CT_Vector3D.html +1 -1
  131. data/rdoc/RubyXL/CT_XYAdjustHandle.html +1 -1
  132. data/rdoc/RubyXL/CalculationChain.html +1 -1
  133. data/rdoc/RubyXL/CalculationChainCell.html +1 -1
  134. data/rdoc/RubyXL/CalculationProperties.html +1 -1
  135. data/rdoc/RubyXL/Cell.html +1 -1
  136. data/rdoc/RubyXL/CellConvenienceMethods.html +1 -1
  137. data/rdoc/RubyXL/CellSmartTag.html +1 -1
  138. data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
  139. data/rdoc/RubyXL/CellSmartTags.html +1 -1
  140. data/rdoc/RubyXL/CellStyle.html +1 -1
  141. data/rdoc/RubyXL/CellStyleXFs.html +1 -1
  142. data/rdoc/RubyXL/CellStyles.html +1 -1
  143. data/rdoc/RubyXL/CellValue.html +1 -1
  144. data/rdoc/RubyXL/CellWatch.html +1 -1
  145. data/rdoc/RubyXL/CellWatches.html +1 -1
  146. data/rdoc/RubyXL/CellXFs.html +1 -1
  147. data/rdoc/RubyXL/ChartColorsFile.html +1 -1
  148. data/rdoc/RubyXL/ChartFile.html +1 -1
  149. data/rdoc/RubyXL/ChartStyleFile.html +1 -1
  150. data/rdoc/RubyXL/ChartUserShapesFile.html +1 -1
  151. data/rdoc/RubyXL/Chartsheet.html +1 -1
  152. data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
  153. data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
  154. data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
  155. data/rdoc/RubyXL/ChartsheetView.html +1 -1
  156. data/rdoc/RubyXL/ChartsheetViews.html +1 -1
  157. data/rdoc/RubyXL/Color.html +1 -1
  158. data/rdoc/RubyXL/ColorFilter.html +1 -1
  159. data/rdoc/RubyXL/ColorScale.html +1 -1
  160. data/rdoc/RubyXL/ColorSet.html +1 -1
  161. data/rdoc/RubyXL/Colors.html +1 -1
  162. data/rdoc/RubyXL/ColumnRange.html +1 -1
  163. data/rdoc/RubyXL/ColumnRanges.html +1 -1
  164. data/rdoc/RubyXL/Comment.html +1 -1
  165. data/rdoc/RubyXL/CommentList.html +1 -1
  166. data/rdoc/RubyXL/CommentsFile.html +1 -1
  167. data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
  168. data/rdoc/RubyXL/ConditionalFormatting.html +1 -1
  169. data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
  170. data/rdoc/RubyXL/ContentTypeDefault.html +1 -1
  171. data/rdoc/RubyXL/ContentTypeOverride.html +1 -1
  172. data/rdoc/RubyXL/ContentTypes.html +1 -1
  173. data/rdoc/RubyXL/ControlPropertiesFile.html +1 -1
  174. data/rdoc/RubyXL/CorePropertiesFile.html +1 -1
  175. data/rdoc/RubyXL/CustomColor.html +1 -1
  176. data/rdoc/RubyXL/CustomColorList.html +1 -1
  177. data/rdoc/RubyXL/CustomFilter.html +1 -1
  178. data/rdoc/RubyXL/CustomFilters.html +1 -1
  179. data/rdoc/RubyXL/CustomGeometry.html +1 -1
  180. data/rdoc/RubyXL/CustomProperties.html +1 -1
  181. data/rdoc/RubyXL/CustomPropertiesFile.html +1 -1
  182. data/rdoc/RubyXL/CustomProperty.html +1 -1
  183. data/rdoc/RubyXL/CustomSheetView.html +1 -1
  184. data/rdoc/RubyXL/CustomSheetViews.html +1 -1
  185. data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
  186. data/rdoc/RubyXL/CustomWorkbookViews.html +1 -1
  187. data/rdoc/RubyXL/CustomXMLFile.html +1 -1
  188. data/rdoc/RubyXL/DXF.html +1 -1
  189. data/rdoc/RubyXL/DXFs.html +1 -1
  190. data/rdoc/RubyXL/DataBar.html +1 -1
  191. data/rdoc/RubyXL/DataConsolidate.html +1 -1
  192. data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
  193. data/rdoc/RubyXL/DataConsolidationReferences.html +1 -1
  194. data/rdoc/RubyXL/DataType.html +1 -1
  195. data/rdoc/RubyXL/DataValidation.html +1 -1
  196. data/rdoc/RubyXL/DataValidations.html +1 -1
  197. data/rdoc/RubyXL/DateGroupItem.html +1 -1
  198. data/rdoc/RubyXL/DefinedName.html +1 -1
  199. data/rdoc/RubyXL/DefinedNames.html +1 -1
  200. data/rdoc/RubyXL/DocumentPropertiesFile.html +1 -1
  201. data/rdoc/RubyXL/DrawingFile.html +1 -1
  202. data/rdoc/RubyXL/DynamicFilter.html +1 -1
  203. data/rdoc/RubyXL/EmbeddedControl.html +1 -1
  204. data/rdoc/RubyXL/EmbeddedControls.html +1 -1
  205. data/rdoc/RubyXL/Extension.html +1 -1
  206. data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
  207. data/rdoc/RubyXL/Extents.html +1 -1
  208. data/rdoc/RubyXL/ExternalLinksFile.html +1 -1
  209. data/rdoc/RubyXL/ExternalReference.html +1 -1
  210. data/rdoc/RubyXL/ExternalReferences.html +1 -1
  211. data/rdoc/RubyXL/ExtraColorSchemeList.html +1 -1
  212. data/rdoc/RubyXL/FieldItem.html +1 -1
  213. data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
  214. data/rdoc/RubyXL/FileSharing.html +1 -1
  215. data/rdoc/RubyXL/FileVersion.html +1 -1
  216. data/rdoc/RubyXL/Fill.html +1 -1
  217. data/rdoc/RubyXL/Fills.html +1 -1
  218. data/rdoc/RubyXL/FilterContainer.html +1 -1
  219. data/rdoc/RubyXL/FloatNode.html +1 -1
  220. data/rdoc/RubyXL/FloatValue.html +1 -1
  221. data/rdoc/RubyXL/Font.html +1 -1
  222. data/rdoc/RubyXL/FontScheme.html +1 -1
  223. data/rdoc/RubyXL/Fonts.html +1 -1
  224. data/rdoc/RubyXL/Formula.html +1 -1
  225. data/rdoc/RubyXL/FunctionGroup.html +1 -1
  226. data/rdoc/RubyXL/FunctionGroups.html +1 -1
  227. data/rdoc/RubyXL/GenericStorageObject.html +1 -1
  228. data/rdoc/RubyXL/GradientFill.html +1 -1
  229. data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
  230. data/rdoc/RubyXL/Hyperlink.html +1 -1
  231. data/rdoc/RubyXL/HyperlinkRelFile.html +1 -1
  232. data/rdoc/RubyXL/Hyperlinks.html +1 -1
  233. data/rdoc/RubyXL/IconFilter.html +1 -1
  234. data/rdoc/RubyXL/IconSet.html +1 -1
  235. data/rdoc/RubyXL/IgnoredError.html +1 -1
  236. data/rdoc/RubyXL/IgnoredErrors.html +1 -1
  237. data/rdoc/RubyXL/IndexedColors.html +1 -1
  238. data/rdoc/RubyXL/InputCells.html +1 -1
  239. data/rdoc/RubyXL/IntegerNode.html +1 -1
  240. data/rdoc/RubyXL/IntegerValue.html +1 -1
  241. data/rdoc/RubyXL/LegacyCell.html +1 -1
  242. data/rdoc/RubyXL/LegacyWorksheet.html +37 -37
  243. data/rdoc/RubyXL/MRUColors.html +1 -1
  244. data/rdoc/RubyXL/MacrosFile.html +1 -1
  245. data/rdoc/RubyXL/MergedCell.html +1 -1
  246. data/rdoc/RubyXL/MergedCells.html +1 -1
  247. data/rdoc/RubyXL/NumFmt.html +1 -1
  248. data/rdoc/RubyXL/NumberFormat.html +1 -1
  249. data/rdoc/RubyXL/NumberFormats.html +1 -1
  250. data/rdoc/RubyXL/OLEObject.html +1 -1
  251. data/rdoc/RubyXL/OLEObjects.html +1 -1
  252. data/rdoc/RubyXL/OLESize.html +1 -1
  253. data/rdoc/RubyXL/OOXMLContainerObject.html +1 -1
  254. data/rdoc/RubyXL/OOXMLObject.html +1 -1
  255. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +6 -6
  256. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +1 -1
  257. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +1 -1
  258. data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
  259. data/rdoc/RubyXL/Offset.html +1 -1
  260. data/rdoc/RubyXL/OutlineProperties.html +1 -1
  261. data/rdoc/RubyXL/PageMargins.html +1 -1
  262. data/rdoc/RubyXL/PageSetup.html +1 -1
  263. data/rdoc/RubyXL/PageSetupProperties.html +1 -1
  264. data/rdoc/RubyXL/Pane.html +1 -1
  265. data/rdoc/RubyXL/Parser.html +5 -99
  266. data/rdoc/RubyXL/PatternFill.html +1 -1
  267. data/rdoc/RubyXL/PhoneticProperties.html +1 -1
  268. data/rdoc/RubyXL/PhoneticRun.html +1 -1
  269. data/rdoc/RubyXL/PivotArea.html +1 -1
  270. data/rdoc/RubyXL/PivotCache.html +1 -1
  271. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +1 -1
  272. data/rdoc/RubyXL/PivotCaches.html +1 -1
  273. data/rdoc/RubyXL/PivotReference.html +1 -1
  274. data/rdoc/RubyXL/PivotReferences.html +1 -1
  275. data/rdoc/RubyXL/PivotTableFile.html +1 -1
  276. data/rdoc/RubyXL/PivotTableSelection.html +1 -1
  277. data/rdoc/RubyXL/PresetGeometry.html +1 -1
  278. data/rdoc/RubyXL/PrintOptions.html +1 -1
  279. data/rdoc/RubyXL/PrinterSettingsFile.html +1 -1
  280. data/rdoc/RubyXL/ProtectedRange.html +1 -1
  281. data/rdoc/RubyXL/ProtectedRanges.html +1 -1
  282. data/rdoc/RubyXL/Protection.html +1 -1
  283. data/rdoc/RubyXL/RID.html +1 -1
  284. data/rdoc/RubyXL/RawOOXML.html +1 -1
  285. data/rdoc/RubyXL/Reference.html +1 -1
  286. data/rdoc/RubyXL/Relationship.html +1 -1
  287. data/rdoc/RubyXL/RelationshipSupport.html +1 -1
  288. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +1 -1
  289. data/rdoc/RubyXL/RichText.html +1 -1
  290. data/rdoc/RubyXL/RichTextRun.html +1 -1
  291. data/rdoc/RubyXL/Row.html +1 -1
  292. data/rdoc/RubyXL/RunProperties.html +1 -1
  293. data/rdoc/RubyXL/Scenario.html +1 -1
  294. data/rdoc/RubyXL/Scenarios.html +1 -1
  295. data/rdoc/RubyXL/Selection.html +1 -1
  296. data/rdoc/RubyXL/ShapeGuide.html +1 -1
  297. data/rdoc/RubyXL/ShapeTextRectangle.html +1 -1
  298. data/rdoc/RubyXL/SharedStringsTable.html +1 -1
  299. data/rdoc/RubyXL/Sheet.html +1 -1
  300. data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
  301. data/rdoc/RubyXL/SheetData.html +1 -1
  302. data/rdoc/RubyXL/Sheets.html +1 -1
  303. data/rdoc/RubyXL/SlicerCacheFile.html +1 -1
  304. data/rdoc/RubyXL/SlicerFile.html +1 -1
  305. data/rdoc/RubyXL/SmartTagProperties.html +1 -1
  306. data/rdoc/RubyXL/SmartTagType.html +1 -1
  307. data/rdoc/RubyXL/SmartTagTypes.html +1 -1
  308. data/rdoc/RubyXL/SmartTags.html +1 -1
  309. data/rdoc/RubyXL/SortCondition.html +1 -1
  310. data/rdoc/RubyXL/SortState.html +1 -1
  311. data/rdoc/RubyXL/Sqref.html +1 -1
  312. data/rdoc/RubyXL/Stop.html +1 -1
  313. data/rdoc/RubyXL/StringNode.html +1 -1
  314. data/rdoc/RubyXL/StringNodeW3C.html +1 -1
  315. data/rdoc/RubyXL/StringValue.html +1 -1
  316. data/rdoc/RubyXL/Stylesheet.html +1 -1
  317. data/rdoc/RubyXL/TableFile.html +1 -1
  318. data/rdoc/RubyXL/TableParts.html +1 -1
  319. data/rdoc/RubyXL/TableStyle.html +1 -1
  320. data/rdoc/RubyXL/TableStyles.html +1 -1
  321. data/rdoc/RubyXL/Text.html +1 -1
  322. data/rdoc/RubyXL/Theme.html +1 -1
  323. data/rdoc/RubyXL/ThemeElements.html +1 -1
  324. data/rdoc/RubyXL/ThumbnailFile.html +1 -1
  325. data/rdoc/RubyXL/Top10.html +1 -1
  326. data/rdoc/RubyXL/VMLDrawingFile.html +1 -1
  327. data/rdoc/RubyXL/Variant.html +1 -1
  328. data/rdoc/RubyXL/Vector.html +1 -1
  329. data/rdoc/RubyXL/VectorValue.html +1 -1
  330. data/rdoc/RubyXL/VisualProperties.html +1 -1
  331. data/rdoc/RubyXL/WebPublishObject.html +1 -1
  332. data/rdoc/RubyXL/WebPublishObjects.html +1 -1
  333. data/rdoc/RubyXL/WebPublishingItem.html +1 -1
  334. data/rdoc/RubyXL/WebPublishingItems.html +1 -1
  335. data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
  336. data/rdoc/RubyXL/Workbook.html +1 -1
  337. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1 -1
  338. data/rdoc/RubyXL/WorkbookProperties.html +1 -1
  339. data/rdoc/RubyXL/WorkbookProtection.html +1 -1
  340. data/rdoc/RubyXL/WorkbookRoot.html +18 -4
  341. data/rdoc/RubyXL/WorkbookView.html +1 -1
  342. data/rdoc/RubyXL/WorkbookViews.html +1 -1
  343. data/rdoc/RubyXL/Worksheet.html +1 -1
  344. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +1 -1
  345. data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
  346. data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
  347. data/rdoc/RubyXL/WorksheetProperties.html +1 -1
  348. data/rdoc/RubyXL/WorksheetProtection.html +1 -1
  349. data/rdoc/RubyXL/WorksheetView.html +1 -1
  350. data/rdoc/RubyXL/WorksheetViews.html +1 -1
  351. data/rdoc/RubyXL/XF.html +1 -1
  352. data/rdoc/created.rid +21 -21
  353. data/rdoc/index.html +2 -2
  354. data/rdoc/js/search_index.js +1 -1
  355. data/rdoc/table_of_contents.html +62 -72
  356. data/rubyXL.gemspec +8 -4
  357. data/spec/lib/cell_spec.rb +15 -15
  358. data/spec/lib/parser_spec.rb +0 -8
  359. data/spec/lib/worksheet_spec.rb +107 -369
  360. data/tmp/.gitignore +1 -0
  361. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78d8560310cff3db8a14ada15250fd8ccc4a0cf4
4
- data.tar.gz: 934202bae68313dbc61ee8e35b1b70d3e36b856e
3
+ metadata.gz: 4de40cef47a71af3b19e027b2508941f63d82f1d
4
+ data.tar.gz: 0b2696764fdf2513922baafc8c84c4c224641156
5
5
  SHA512:
6
- metadata.gz: 8abe16d619a9ef123a2b621fcf4bb17f8e7266fbceb1919a3b9d1ad6ab3ce21a597d15900834883e12ecba77a271fc2071ddf3b05dfbe28de7164324aaea06b9
7
- data.tar.gz: 9580942eb45bca0b491622c16bd82e528444340c22e90345b772f6b3903ab2a3fae815cc5e0d1c3c6b78f98039c2c41b05570afe643bcaf442ff3b59acf1fb02
6
+ metadata.gz: 9893bbaebe5a580c6d9fb78c9949e7baf407640eea6e127435c502c301442abb4256165e8a7aa7031033ab68ddfbd03fdad7c7d5ae9e6ae4f65a09623d69e221
7
+ data.tar.gz: 0c41ea643f4a75692f66e7eeb2d6bdc260d42c86263e021be1aeb197fc5ab477a16c937e590a3236ba2b2422b1cbf26e2238060aed17d3286fac6cd04ee385f4
data/Gemfile CHANGED
@@ -11,4 +11,6 @@ group :development do
11
11
  gem "jeweler"
12
12
  gem "simplecov", ">= 0"
13
13
  gem "rspec", ">= 1.3.4"
14
+
15
+ gem 'stackprof'
14
16
  end
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
-
3
2
  require 'rubygems'
4
3
  require 'bundler'
4
+
5
5
  begin
6
6
  Bundler.setup(:default, :development)
7
7
  rescue Bundler::BundlerError => e
@@ -44,7 +44,6 @@ end
44
44
 
45
45
  require 'rspec/core/rake_task'
46
46
  RSpec::Core::RakeTask.new(:spec)
47
-
48
47
  task :default => :spec
49
48
 
50
49
  require 'rdoc/task'
@@ -56,3 +55,30 @@ Rake::RDocTask.new do |rdoc|
56
55
  rdoc.rdoc_files.include('README*')
57
56
  rdoc.rdoc_files.include('lib/**/*.rb')
58
57
  end
58
+
59
+ desc "Dump profiling data"
60
+ task :profile do
61
+ require 'benchmark'
62
+ require 'stackprof'
63
+
64
+ $:.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
65
+ require './lib/rubyXL'
66
+
67
+ spreadsheets = Dir.glob(File.join("test", "input", "*.xls?")).sort!
68
+
69
+ spreadsheets.each { |input|
70
+ puts "<<<--- Profiling parsing #{input}..."
71
+ doc = nil
72
+ StackProf.run(:mode => :cpu, :interval => 100,
73
+ :out => "tmp/stackprof-cpu-parse-#{File.basename(input)}.dump") {
74
+ doc = RubyXL::Parser.parse(input)
75
+ }
76
+
77
+ output = File.join("test", "output", File.basename(input))
78
+ puts "--->>> Profiling writing of #{output}..."
79
+ StackProf.run(:mode => :cpu, :interval => 100,
80
+ :out => "tmp/stackprof-cpu-write-#{File.basename(input)}.dump") {
81
+ doc.write(output)
82
+ }
83
+ }
84
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.7
1
+ 3.3.0
@@ -204,11 +204,6 @@ module RubyXL
204
204
 
205
205
  private
206
206
 
207
- def get_border(direction)
208
- validate_worksheet
209
- get_cell_border.get_edge_style(direction)
210
- end
211
-
212
207
  def validate_workbook()
213
208
  unless workbook.nil? || workbook.worksheets.nil?
214
209
  workbook.worksheets.each { |sheet|
@@ -221,11 +221,18 @@ module RubyXL
221
221
  def get_row_height(row = 0)
222
222
  validate_workbook
223
223
  validate_nonnegative(row)
224
- return nil unless row_exists(row)
225
224
  row = sheet_data.rows[row]
226
225
  row && row.ht || 13
227
226
  end
228
227
 
228
+ def get_row_border(row, border_direction)
229
+ validate_workbook
230
+ validate_nonnegative(row)
231
+
232
+ border = @workbook.borders[get_row_xf(row).border_id]
233
+ border && border.get_edge_style(border_direction)
234
+ end
235
+
229
236
  def get_row_horizontal_alignment(row = 0)
230
237
  return get_row_alignment(row, true)
231
238
  end
@@ -314,11 +321,27 @@ module RubyXL
314
321
  def get_column_fill(col=0)
315
322
  validate_workbook
316
323
  validate_nonnegative(col)
317
- return nil unless column_exists(col)
318
324
 
319
325
  @workbook.get_fill_color(get_col_xf(col))
320
326
  end
321
327
 
328
+ def get_column_border(col, border_direction)
329
+ validate_workbook
330
+ validate_nonnegative(col)
331
+
332
+ xf = @workbook.cell_xfs[get_cols_style_index(col)]
333
+ border = @workbook.borders[xf.border_id]
334
+ border && border.get_edge_style(border_direction)
335
+ end
336
+
337
+ def get_column_alignment(col, type)
338
+ validate_workbook
339
+ validate_nonnegative(col)
340
+
341
+ xf = @workbook.cell_xfs[get_cols_style_index(col)]
342
+ xf.alignment && xf.alignment.send(type)
343
+ end
344
+
322
345
  def get_column_horizontal_alignment(col=0)
323
346
  warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_alignment` instead."
324
347
  get_column_alignment(col, :horizontal)
@@ -599,6 +622,11 @@ module RubyXL
599
622
 
600
623
  module CellConvenienceMethods
601
624
 
625
+ def get_border(direction)
626
+ validate_worksheet
627
+ get_cell_border.get_edge_style(direction)
628
+ end
629
+
602
630
  def change_horizontal_alignment(alignment = 'center')
603
631
  validate_worksheet
604
632
  self.style_index = workbook.modify_alignment(self.style_index) { |a| a.horizontal = alignment }
@@ -619,56 +647,6 @@ module RubyXL
619
647
  self.style_index = workbook.modify_border(self.style_index, direction, weight)
620
648
  end
621
649
 
622
- def change_border_top(weight = 'thin')
623
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
624
- change_border(:top, weight)
625
- end
626
-
627
- def change_border_left(weight = 'thin')
628
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
629
- change_border(:left, weight)
630
- end
631
-
632
- def change_border_right(weight = 'thin')
633
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
634
- change_border(:right, weight)
635
- end
636
-
637
- def change_border_bottom(weight = 'thin')
638
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
639
- change_border(:bottom, weight)
640
- end
641
-
642
- def change_border_diagonal(weight = 'thin')
643
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
644
- change_border(:diagonal, weight)
645
- end
646
-
647
- def border_top()
648
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
649
- return get_border(:top)
650
- end
651
-
652
- def border_left()
653
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
654
- return get_border(:left)
655
- end
656
-
657
- def border_right()
658
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
659
- return get_border(:right)
660
- end
661
-
662
- def border_bottom()
663
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
664
- return get_border(:bottom)
665
- end
666
-
667
- def border_diagonal()
668
- warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
669
- return get_border(:diagonal)
670
- end
671
-
672
650
  end
673
651
 
674
652
  end
@@ -1,3 +1,4 @@
1
+ require 'nokogiri'
1
2
  require 'pathname'
2
3
  require 'rubyXL/objects/reference'
3
4
 
@@ -381,6 +382,7 @@ module RubyXL
381
382
  "<#{self.class}: #{super} #{vars.join(", ")}>"
382
383
  end
383
384
 
385
+
384
386
  class << self
385
387
  def define_count_attribute
386
388
  # Count will be inherited from Array. so no need to define it explicitly.
@@ -59,14 +59,28 @@ module RubyXL
59
59
  OOXMLTopLevelObject::ROOT
60
60
  end
61
61
 
62
- def self.parse_file(xl_file_path, opts)
62
+ def self.parse_file(xl_file_path, opts = {})
63
63
  begin
64
64
  ::Zip::File.open(xl_file_path) { |zip_file|
65
65
  root = self.new
66
66
  root.filepath = xl_file_path
67
67
  root.content_types = RubyXL::ContentTypes.parse_file(zip_file, ContentTypes::XLSX_PATH)
68
68
  root.load_relationships(zip_file, OOXMLTopLevelObject::ROOT)
69
- root.workbook.root = root
69
+
70
+ wb = root.workbook
71
+ wb.root = root
72
+
73
+ wb.sheets.each_with_index { |sheet, i|
74
+ sheet_obj = wb.relationship_container.related_files[sheet.r_id]
75
+
76
+ wb.worksheets[i] = sheet_obj # Must be done first so the sheet becomes aware of its number
77
+ sheet_obj.workbook = wb
78
+
79
+ sheet_obj.sheet_name = sheet.name
80
+ sheet_obj.sheet_id = sheet.sheet_id
81
+ sheet_obj.state = sheet.state
82
+ }
83
+
70
84
  root
71
85
  }
72
86
  rescue ::Zip::Error => e
@@ -1,37 +1,8 @@
1
- require 'nokogiri'
2
- require 'tmpdir'
3
-
4
1
  module RubyXL
5
-
6
2
  class Parser
7
- def self.parse(file_path, opts = {})
8
- self.new(opts).parse(file_path)
3
+ def self.parse(xl_file_path)
4
+ root = RubyXL::WorkbookRoot.parse_file(xl_file_path)
5
+ root.workbook
9
6
  end
10
-
11
- # +:data_only+ allows only the sheet data to be parsed, so as to speed up parsing.
12
- # However, using this option will result in date-formatted cells being interpreted as numbers.
13
- def initialize(opts = {})
14
- @opts = opts
15
- end
16
-
17
- def parse(xl_file_path)
18
- root = RubyXL::WorkbookRoot.parse_file(xl_file_path, @opts)
19
-
20
- wb = root.workbook
21
-
22
- wb.sheets.each_with_index { |sheet, i|
23
- sheet_obj = wb.relationship_container.related_files[sheet.r_id]
24
-
25
- wb.worksheets[i] = sheet_obj # Must be done first so the sheet becomes aware of its number
26
- sheet_obj.workbook = wb
27
-
28
- sheet_obj.sheet_name = sheet.name
29
- sheet_obj.sheet_id = sheet.sheet_id
30
- sheet_obj.state = sheet.state
31
- }
32
-
33
- wb
34
- end
35
-
36
7
  end
37
8
  end
@@ -135,38 +135,40 @@ module LegacyWorksheet
135
135
  merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(row1, row2, col1, col2))
136
136
  end
137
137
 
138
- def add_row(row = 0, params = {})
138
+ def add_row(row_index = 0, params = {})
139
139
  new_row = RubyXL::Row.new(params)
140
140
  new_row.worksheet = self
141
- sheet_data.rows[row] = new_row
141
+ sheet_data.rows[row_index] = new_row
142
142
  end
143
143
 
144
- def add_cell(row = 0, column = 0, data = '', formula = nil, overwrite = true)
144
+ def add_cell(row_index = 0, column_index = 0, data = '', formula = nil, overwrite = true)
145
145
  validate_workbook
146
- ensure_cell_exists(row, column)
146
+ validate_nonnegative(row_index)
147
+ validate_nonnegative(column_index)
148
+ row = sheet_data.rows[row_index] || add_row(row_index)
149
+
150
+ c = row.cells[column_index]
147
151
 
148
- if overwrite || sheet_data.rows[row].cells[column].nil?
152
+ if overwrite || c.nil?
149
153
  c = RubyXL::Cell.new
150
154
  c.worksheet = self
151
- c.row = row
152
- c.column = column
155
+ c.row = row_index
156
+ c.column = column_index
153
157
  c.raw_value = data
154
158
  c.datatype = RubyXL::DataType::RAW_STRING unless formula || data.is_a?(Numeric)
155
159
  c.formula = RubyXL::Formula.new(:expression => formula) if formula
156
160
 
157
- range = cols && cols.locate_range(column)
158
- c.style_index = sheet_data.rows[row].style_index || (range && range.style_index) || 0
159
-
160
- sheet_data.rows[row].cells[column] = c
161
+ range = cols && cols.locate_range(column_index)
162
+ c.style_index = row.style_index || (range && range.style_index) || 0
163
+ row.cells[column_index] = c
161
164
  end
162
165
 
163
- sheet_data.rows[row].cells[column]
166
+ c
164
167
  end
165
168
 
166
169
  def delete_row(row_index=0)
167
170
  validate_workbook
168
171
  validate_nonnegative(row_index)
169
- return nil unless row_exists(row_index)
170
172
 
171
173
  deleted = sheet_data.rows.delete_at(row_index)
172
174
 
@@ -216,8 +218,7 @@ module LegacyWorksheet
216
218
  validate_workbook
217
219
  validate_nonnegative(column_index)
218
220
 
219
- return nil unless column_exists(column_index)
220
-
221
+ #delete column
221
222
  sheet_data.rows.each { |row| row.cells.delete_at(column_index) }
222
223
 
223
224
  # Change column numbers for cells to the right of the deleted column
@@ -271,7 +272,7 @@ module LegacyWorksheet
271
272
  add_row(sheet_data.size, :cells => Array.new(sheet_data.rows[row].size))
272
273
  (sheet_data.size - 1).downto(row+1) { |index|
273
274
  sheet_data.rows[index].cells[col] = sheet_data.rows[index-1].cells[col]
274
- }
275
+ }
275
276
  else
276
277
  raise 'invalid shift option'
277
278
  end
@@ -282,30 +283,29 @@ module LegacyWorksheet
282
283
  # by default, only sets cell to nil
283
284
  # if :left is specified, method will shift row contents to the right of the deleted cell to the left
284
285
  # if :up is specified, method will shift column contents below the deleted cell upward
285
- def delete_cell(row = 0, col=0, shift=nil)
286
+ def delete_cell(row_index = 0, column_index=0, shift=nil)
286
287
  validate_workbook
287
- validate_nonnegative(row)
288
- validate_nonnegative(col)
289
-
290
- return nil unless row_exists(row) && column_exists(col)
288
+ validate_nonnegative(row_index)
289
+ validate_nonnegative(column_index)
291
290
 
292
- cell = sheet_data[row][col]
291
+ row = sheet_data[row_index]
292
+ old_cell = row && row[column_index]
293
293
 
294
294
  case shift
295
295
  when nil then
296
- sheet_data.rows[row].cells[col] = nil
296
+ row.cells[column_index] = nil if row
297
297
  when :left then
298
- sheet_data.rows[row].delete_cell_shift_left(col)
298
+ row.delete_cell_shift_left(column_index) if row
299
299
  when :up then
300
- (row...(sheet_data.size - 1)).each { |index|
301
- c = sheet_data.rows[index].cells[col] = sheet_data.rows[index + 1].cells[col]
300
+ (row_index...(sheet_data.size - 1)).each { |index|
301
+ c = sheet_data.rows[index].cells[column_index] = sheet_data.rows[index + 1].cells[column_index]
302
302
  c.row -= 1 if c.is_a?(Cell)
303
303
  }
304
304
  else
305
305
  raise 'invalid shift option'
306
306
  end
307
307
 
308
- return cell
308
+ return old_cell
309
309
  end
310
310
 
311
311
  private
@@ -326,8 +326,6 @@ module LegacyWorksheet
326
326
  validate_workbook
327
327
  validate_nonnegative(row)
328
328
 
329
- return nil unless row_exists(row)
330
-
331
329
  xf_obj = get_row_xf(row)
332
330
  return nil if xf_obj.alignment.nil?
333
331
 
@@ -336,43 +334,13 @@ module LegacyWorksheet
336
334
  end
337
335
  end
338
336
 
339
- def get_row_border(row, border_direction)
340
- validate_workbook
341
- validate_nonnegative(row)
342
-
343
- return nil unless row_exists(row)
344
-
345
- border = @workbook.borders[get_row_xf(row).border_id]
346
- border && border.get_edge_style(border_direction)
347
- end
348
-
349
337
  def column_font(col)
350
338
  validate_workbook
351
339
  validate_nonnegative(col)
352
- return nil unless column_exists(col)
353
340
 
354
341
  @workbook.fonts[@workbook.cell_xfs[get_cols_style_index(col)].font_id]
355
342
  end
356
343
 
357
- def get_column_alignment(col, type)
358
- validate_workbook
359
- validate_nonnegative(col)
360
- return nil unless column_exists(col)
361
-
362
- xf = @workbook.cell_xfs[get_cols_style_index(col)]
363
- xf.alignment && xf.alignment.send(type)
364
- end
365
-
366
- def get_column_border(col, border_direction)
367
- validate_workbook
368
- validate_nonnegative(col)
369
- return nil unless column_exists(col)
370
-
371
- xf = @workbook.cell_xfs[get_cols_style_index(col)]
372
- border = @workbook.borders[xf.border_id]
373
- border && border.get_edge_style(border_direction)
374
- end
375
-
376
344
  #validates Workbook, ensures that this worksheet is in @workbook
377
345
  def validate_workbook()
378
346
  unless @workbook.nil? || @workbook.worksheets.nil?
@@ -421,29 +389,8 @@ module LegacyWorksheet
421
389
  validate_nonnegative(row_index)
422
390
  validate_nonnegative(column_index)
423
391
 
424
- existing_row_count = sheet_data.rows.size
425
-
426
- # Expand cell arrays in existing rows, if necessary.
427
- # Writing anything to a cell in the array automatically creates all the members
428
- # with lower indices, filling them with +nil+s. But, we can't just write +nil+
429
- # to +column_index+ because it may be less than +size+! So we read from that index
430
- # (if it didn't exist, we will get nil) and write right back.
431
- sheet_data.rows.each { |r| r.cells[column_index] = r.cells[column_index] unless r.nil? }
432
-
433
- first_row = sheet_data.rows.first
434
- col_size = [ first_row && first_row.cells.size || 0, column_index ].max
435
-
436
- # Now create new rows with the required number of cells.
437
- # Doing +.downto()+ here so the reallocation of row array has to only happen once,
438
- # when it is extended to max size; after that, we will be writing into existing
439
- # (but empty) members. Additional checks are not necessary, because if +row_index+
440
- # is less than +size+, then +.downto()+ will not execute, and if it equals +size+,
441
- # then the block will be invoked exactly once, which takes care of the case when
442
- # +row_index+ is greater than the current max index by exactly 1.
443
- row_index.downto(existing_row_count) { |r|
444
- add_row(r, :cells => Array.new(col_size))
445
- }
446
- end
392
+ row = sheet_data.rows[row_index] || add_row(row_index)
393
+ end
447
394
 
448
395
  # Helper method to get the style index for a column
449
396
  def get_col_style(column_index)
@@ -469,14 +416,5 @@ module LegacyWorksheet
469
416
  end
470
417
  private :validate_nonnegative
471
418
 
472
- def column_exists(col)
473
- sheet_data.rows.any? { |r| r && (r.cells.size > col) }
474
- end
475
-
476
- def row_exists(row)
477
- sheet_data.rows.size > row
478
- end
479
-
480
-
481
419
  end #end class
482
420
  end