rubyXL 2.5.5 → 2.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (326) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/rubyXL/parser.rb +84 -77
  4. data/lib/rubyXL/worksheet.rb +22 -18
  5. data/rdoc/README_rdoc.html +1 -1
  6. data/rdoc/RubyXL.html +1 -1
  7. data/rdoc/RubyXL/AExtension.html +1 -1
  8. data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
  9. data/rdoc/RubyXL/AdjustHandleList.html +1 -1
  10. data/rdoc/RubyXL/Alignment.html +1 -1
  11. data/rdoc/RubyXL/AlternateContent.html +1 -1
  12. data/rdoc/RubyXL/AutoFilter.html +1 -1
  13. data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
  14. data/rdoc/RubyXL/BodyProperties.html +1 -1
  15. data/rdoc/RubyXL/BooleanNode.html +1 -1
  16. data/rdoc/RubyXL/BooleanValue.html +1 -1
  17. data/rdoc/RubyXL/Border.html +1 -1
  18. data/rdoc/RubyXL/BorderEdge.html +1 -1
  19. data/rdoc/RubyXL/Borders.html +1 -1
  20. data/rdoc/RubyXL/Break.html +1 -1
  21. data/rdoc/RubyXL/BreakList.html +1 -1
  22. data/rdoc/RubyXL/CT_AdjPoint2D.html +1 -1
  23. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +1 -1
  24. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +1 -1
  25. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +1 -1
  26. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +1 -1
  27. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +1 -1
  28. data/rdoc/RubyXL/CT_Backdrop.html +1 -1
  29. data/rdoc/RubyXL/CT_Bevel.html +1 -1
  30. data/rdoc/RubyXL/CT_BiLevelEffect.html +1 -1
  31. data/rdoc/RubyXL/CT_BlendEffect.html +1 -1
  32. data/rdoc/RubyXL/CT_Blip.html +1 -1
  33. data/rdoc/RubyXL/CT_BlipFillProperties.html +1 -1
  34. data/rdoc/RubyXL/CT_BlurEffect.html +1 -1
  35. data/rdoc/RubyXL/CT_Camera.html +1 -1
  36. data/rdoc/RubyXL/CT_Color.html +1 -1
  37. data/rdoc/RubyXL/CT_ColorChangeEffect.html +1 -1
  38. data/rdoc/RubyXL/CT_ColorMapping.html +1 -1
  39. data/rdoc/RubyXL/CT_ColorScheme.html +1 -1
  40. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +1 -1
  41. data/rdoc/RubyXL/CT_ConnectionSite.html +1 -1
  42. data/rdoc/RubyXL/CT_ConnectionSiteList.html +1 -1
  43. data/rdoc/RubyXL/CT_DashStop.html +1 -1
  44. data/rdoc/RubyXL/CT_DashStopList.html +1 -1
  45. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +1 -1
  46. data/rdoc/RubyXL/CT_DuotoneEffect.html +1 -1
  47. data/rdoc/RubyXL/CT_EffectContainer.html +1 -1
  48. data/rdoc/RubyXL/CT_EffectList.html +1 -1
  49. data/rdoc/RubyXL/CT_EffectReference.html +1 -1
  50. data/rdoc/RubyXL/CT_EffectStyleItem.html +1 -1
  51. data/rdoc/RubyXL/CT_EffectStyleList.html +1 -1
  52. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +1 -1
  53. data/rdoc/RubyXL/CT_FillEffect.html +1 -1
  54. data/rdoc/RubyXL/CT_FillOverlayEffect.html +1 -1
  55. data/rdoc/RubyXL/CT_FillStyleList.html +1 -1
  56. data/rdoc/RubyXL/CT_FlatText.html +1 -1
  57. data/rdoc/RubyXL/CT_FontCollection.html +1 -1
  58. data/rdoc/RubyXL/CT_FontReference.html +1 -1
  59. data/rdoc/RubyXL/CT_GeomGuideList.html +1 -1
  60. data/rdoc/RubyXL/CT_GlowEffect.html +1 -1
  61. data/rdoc/RubyXL/CT_GradientFillProperties.html +1 -1
  62. data/rdoc/RubyXL/CT_GradientStop.html +1 -1
  63. data/rdoc/RubyXL/CT_GradientStopList.html +1 -1
  64. data/rdoc/RubyXL/CT_HSLEffect.html +1 -1
  65. data/rdoc/RubyXL/CT_HslColor.html +1 -1
  66. data/rdoc/RubyXL/CT_Hyperlink.html +1 -1
  67. data/rdoc/RubyXL/CT_InnerShadowEffect.html +1 -1
  68. data/rdoc/RubyXL/CT_LightRig.html +1 -1
  69. data/rdoc/RubyXL/CT_LineEndProperties.html +1 -1
  70. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +1 -1
  71. data/rdoc/RubyXL/CT_LineProperties.html +1 -1
  72. data/rdoc/RubyXL/CT_LineStyleList.html +1 -1
  73. data/rdoc/RubyXL/CT_LinearShadeProperties.html +1 -1
  74. data/rdoc/RubyXL/CT_LuminanceEffect.html +1 -1
  75. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +1 -1
  76. data/rdoc/RubyXL/CT_OuterShadowEffect.html +1 -1
  77. data/rdoc/RubyXL/CT_Path2D.html +1 -1
  78. data/rdoc/RubyXL/CT_Path2DArcTo.html +1 -1
  79. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +1 -1
  80. data/rdoc/RubyXL/CT_Path2DList.html +1 -1
  81. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +1 -1
  82. data/rdoc/RubyXL/CT_Path2DTo.html +1 -1
  83. data/rdoc/RubyXL/CT_PathShadeProperties.html +1 -1
  84. data/rdoc/RubyXL/CT_PatternFillProperties.html +1 -1
  85. data/rdoc/RubyXL/CT_Point3D.html +1 -1
  86. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +1 -1
  87. data/rdoc/RubyXL/CT_PresetColor.html +1 -1
  88. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +1 -1
  89. data/rdoc/RubyXL/CT_PresetShadowEffect.html +1 -1
  90. data/rdoc/RubyXL/CT_PresetTextShape.html +1 -1
  91. data/rdoc/RubyXL/CT_ReflectionEffect.html +1 -1
  92. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +1 -1
  93. data/rdoc/RubyXL/CT_RelativeRect.html +1 -1
  94. data/rdoc/RubyXL/CT_SRgbColor.html +1 -1
  95. data/rdoc/RubyXL/CT_ScRgbColor.html +1 -1
  96. data/rdoc/RubyXL/CT_Scene3D.html +1 -1
  97. data/rdoc/RubyXL/CT_SchemeColor.html +1 -1
  98. data/rdoc/RubyXL/CT_Shape3D.html +1 -1
  99. data/rdoc/RubyXL/CT_ShapeStyle.html +1 -1
  100. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +1 -1
  101. data/rdoc/RubyXL/CT_SphereCoords.html +1 -1
  102. data/rdoc/RubyXL/CT_StretchInfoProperties.html +1 -1
  103. data/rdoc/RubyXL/CT_StyleMatrix.html +1 -1
  104. data/rdoc/RubyXL/CT_StyleMatrixReference.html +1 -1
  105. data/rdoc/RubyXL/CT_SupplementalFont.html +1 -1
  106. data/rdoc/RubyXL/CT_SystemColor.html +1 -1
  107. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +1 -1
  108. data/rdoc/RubyXL/CT_TextBlipBullet.html +1 -1
  109. data/rdoc/RubyXL/CT_TextCharBullet.html +1 -1
  110. data/rdoc/RubyXL/CT_TextCharacterProperties.html +1 -1
  111. data/rdoc/RubyXL/CT_TextFont.html +1 -1
  112. data/rdoc/RubyXL/CT_TextListStyle.html +1 -1
  113. data/rdoc/RubyXL/CT_TextNormalAutofit.html +1 -1
  114. data/rdoc/RubyXL/CT_TextParagraphProperties.html +1 -1
  115. data/rdoc/RubyXL/CT_TextSpacing.html +1 -1
  116. data/rdoc/RubyXL/CT_TextTabStop.html +1 -1
  117. data/rdoc/RubyXL/CT_TextTabStopList.html +1 -1
  118. data/rdoc/RubyXL/CT_TileInfoProperties.html +1 -1
  119. data/rdoc/RubyXL/CT_TintEffect.html +1 -1
  120. data/rdoc/RubyXL/CT_Transform2D.html +1 -1
  121. data/rdoc/RubyXL/CT_TransformEffect.html +1 -1
  122. data/rdoc/RubyXL/CT_Vector3D.html +1 -1
  123. data/rdoc/RubyXL/CT_XYAdjustHandle.html +1 -1
  124. data/rdoc/RubyXL/CalculationChain.html +1 -1
  125. data/rdoc/RubyXL/CalculationChainCell.html +1 -1
  126. data/rdoc/RubyXL/CalculationProperties.html +1 -1
  127. data/rdoc/RubyXL/Cell.html +1 -1
  128. data/rdoc/RubyXL/CellSmartTag.html +1 -1
  129. data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
  130. data/rdoc/RubyXL/CellSmartTags.html +1 -1
  131. data/rdoc/RubyXL/CellStyle.html +1 -1
  132. data/rdoc/RubyXL/CellStyleXFs.html +1 -1
  133. data/rdoc/RubyXL/CellStyles.html +1 -1
  134. data/rdoc/RubyXL/CellValue.html +1 -1
  135. data/rdoc/RubyXL/CellWatch.html +1 -1
  136. data/rdoc/RubyXL/CellWatches.html +1 -1
  137. data/rdoc/RubyXL/CellXFs.html +1 -1
  138. data/rdoc/RubyXL/Chartsheet.html +1 -1
  139. data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
  140. data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
  141. data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
  142. data/rdoc/RubyXL/ChartsheetView.html +1 -1
  143. data/rdoc/RubyXL/ChartsheetViews.html +1 -1
  144. data/rdoc/RubyXL/Color.html +1 -1
  145. data/rdoc/RubyXL/ColorFilter.html +1 -1
  146. data/rdoc/RubyXL/ColorScale.html +1 -1
  147. data/rdoc/RubyXL/ColorSet.html +1 -1
  148. data/rdoc/RubyXL/Colors.html +1 -1
  149. data/rdoc/RubyXL/ColumnRange.html +1 -1
  150. data/rdoc/RubyXL/ColumnRanges.html +1 -1
  151. data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
  152. data/rdoc/RubyXL/ConditionalFormatting.html +1 -1
  153. data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
  154. data/rdoc/RubyXL/ContentTypeDefault.html +1 -1
  155. data/rdoc/RubyXL/ContentTypeOverride.html +1 -1
  156. data/rdoc/RubyXL/ContentTypes.html +1 -1
  157. data/rdoc/RubyXL/CoreProperties.html +1 -1
  158. data/rdoc/RubyXL/CustomColor.html +1 -1
  159. data/rdoc/RubyXL/CustomColorList.html +1 -1
  160. data/rdoc/RubyXL/CustomFilter.html +1 -1
  161. data/rdoc/RubyXL/CustomFilters.html +1 -1
  162. data/rdoc/RubyXL/CustomGeometry.html +1 -1
  163. data/rdoc/RubyXL/CustomProperties.html +1 -1
  164. data/rdoc/RubyXL/CustomProperty.html +1 -1
  165. data/rdoc/RubyXL/CustomSheetView.html +1 -1
  166. data/rdoc/RubyXL/CustomSheetViews.html +1 -1
  167. data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
  168. data/rdoc/RubyXL/CustomWorkbookViews.html +1 -1
  169. data/rdoc/RubyXL/DXF.html +1 -1
  170. data/rdoc/RubyXL/DXFs.html +1 -1
  171. data/rdoc/RubyXL/DataBar.html +1 -1
  172. data/rdoc/RubyXL/DataConsolidate.html +1 -1
  173. data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
  174. data/rdoc/RubyXL/DataConsolidationReferences.html +1 -1
  175. data/rdoc/RubyXL/DataType.html +1 -1
  176. data/rdoc/RubyXL/DataValidation.html +1 -1
  177. data/rdoc/RubyXL/DataValidations.html +1 -1
  178. data/rdoc/RubyXL/DateGroupItem.html +1 -1
  179. data/rdoc/RubyXL/DefinedName.html +1 -1
  180. data/rdoc/RubyXL/DefinedNames.html +1 -1
  181. data/rdoc/RubyXL/DocumentProperties.html +1 -1
  182. data/rdoc/RubyXL/DynamicFilter.html +1 -1
  183. data/rdoc/RubyXL/EmbeddedControl.html +1 -1
  184. data/rdoc/RubyXL/EmbeddedControls.html +1 -1
  185. data/rdoc/RubyXL/Extension.html +1 -1
  186. data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
  187. data/rdoc/RubyXL/Extents.html +1 -1
  188. data/rdoc/RubyXL/ExternalReference.html +1 -1
  189. data/rdoc/RubyXL/ExternalReferences.html +1 -1
  190. data/rdoc/RubyXL/ExtraColorSchemeList.html +1 -1
  191. data/rdoc/RubyXL/FieldItem.html +1 -1
  192. data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
  193. data/rdoc/RubyXL/FileSharing.html +1 -1
  194. data/rdoc/RubyXL/FileVersion.html +1 -1
  195. data/rdoc/RubyXL/Fill.html +1 -1
  196. data/rdoc/RubyXL/Fills.html +1 -1
  197. data/rdoc/RubyXL/FilterContainer.html +1 -1
  198. data/rdoc/RubyXL/FloatNode.html +1 -1
  199. data/rdoc/RubyXL/FloatValue.html +1 -1
  200. data/rdoc/RubyXL/Font.html +1 -1
  201. data/rdoc/RubyXL/FontScheme.html +1 -1
  202. data/rdoc/RubyXL/Fonts.html +1 -1
  203. data/rdoc/RubyXL/Formula.html +1 -1
  204. data/rdoc/RubyXL/FunctionGroup.html +1 -1
  205. data/rdoc/RubyXL/FunctionGroups.html +1 -1
  206. data/rdoc/RubyXL/GenericStorage.html +1 -1
  207. data/rdoc/RubyXL/GradientFill.html +1 -1
  208. data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
  209. data/rdoc/RubyXL/Hyperlink.html +1 -1
  210. data/rdoc/RubyXL/Hyperlinks.html +1 -1
  211. data/rdoc/RubyXL/IconFilter.html +1 -1
  212. data/rdoc/RubyXL/IconSet.html +1 -1
  213. data/rdoc/RubyXL/IgnoredError.html +1 -1
  214. data/rdoc/RubyXL/IgnoredErrors.html +1 -1
  215. data/rdoc/RubyXL/IndexedColors.html +1 -1
  216. data/rdoc/RubyXL/InputCells.html +1 -1
  217. data/rdoc/RubyXL/IntegerNode.html +1 -1
  218. data/rdoc/RubyXL/IntegerValue.html +1 -1
  219. data/rdoc/RubyXL/LegacyCell.html +1 -1
  220. data/rdoc/RubyXL/LegacyWorkbook.html +1 -1
  221. data/rdoc/RubyXL/LegacyWorksheet.html +62 -59
  222. data/rdoc/RubyXL/MRUColors.html +1 -1
  223. data/rdoc/RubyXL/MergedCell.html +1 -1
  224. data/rdoc/RubyXL/MergedCells.html +1 -1
  225. data/rdoc/RubyXL/NumFmt.html +1 -1
  226. data/rdoc/RubyXL/NumberFormat.html +1 -1
  227. data/rdoc/RubyXL/NumberFormats.html +1 -1
  228. data/rdoc/RubyXL/OLEObject.html +1 -1
  229. data/rdoc/RubyXL/OLEObjects.html +1 -1
  230. data/rdoc/RubyXL/OLESize.html +1 -1
  231. data/rdoc/RubyXL/OOXMLContainerObject.html +1 -1
  232. data/rdoc/RubyXL/OOXMLObject.html +1 -1
  233. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +1 -1
  234. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +1 -1
  235. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +1 -1
  236. data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
  237. data/rdoc/RubyXL/Offset.html +1 -1
  238. data/rdoc/RubyXL/OutlineProperties.html +1 -1
  239. data/rdoc/RubyXL/PageMargins.html +1 -1
  240. data/rdoc/RubyXL/PageSetup.html +1 -1
  241. data/rdoc/RubyXL/PageSetupProperties.html +1 -1
  242. data/rdoc/RubyXL/Pane.html +1 -1
  243. data/rdoc/RubyXL/Parser.html +90 -83
  244. data/rdoc/RubyXL/PatternFill.html +1 -1
  245. data/rdoc/RubyXL/PhoneticProperties.html +1 -1
  246. data/rdoc/RubyXL/PhoneticRun.html +1 -1
  247. data/rdoc/RubyXL/PivotArea.html +1 -1
  248. data/rdoc/RubyXL/PivotCache.html +1 -1
  249. data/rdoc/RubyXL/PivotCaches.html +1 -1
  250. data/rdoc/RubyXL/PivotReference.html +1 -1
  251. data/rdoc/RubyXL/PivotReferences.html +1 -1
  252. data/rdoc/RubyXL/PivotTableSelection.html +1 -1
  253. data/rdoc/RubyXL/PresetGeometry.html +1 -1
  254. data/rdoc/RubyXL/PrintOptions.html +1 -1
  255. data/rdoc/RubyXL/ProtectedRange.html +1 -1
  256. data/rdoc/RubyXL/ProtectedRanges.html +1 -1
  257. data/rdoc/RubyXL/Protection.html +1 -1
  258. data/rdoc/RubyXL/RID.html +1 -1
  259. data/rdoc/RubyXL/RawOOXML.html +1 -1
  260. data/rdoc/RubyXL/Reference.html +1 -1
  261. data/rdoc/RubyXL/Relationship.html +1 -1
  262. data/rdoc/RubyXL/RichText.html +1 -1
  263. data/rdoc/RubyXL/RichTextRun.html +1 -1
  264. data/rdoc/RubyXL/RootRelationships.html +1 -1
  265. data/rdoc/RubyXL/Row.html +1 -1
  266. data/rdoc/RubyXL/RunProperties.html +1 -1
  267. data/rdoc/RubyXL/Scenario.html +1 -1
  268. data/rdoc/RubyXL/Scenarios.html +1 -1
  269. data/rdoc/RubyXL/Selection.html +1 -1
  270. data/rdoc/RubyXL/ShapeGuide.html +1 -1
  271. data/rdoc/RubyXL/ShapeTextRectangle.html +1 -1
  272. data/rdoc/RubyXL/SharedStringsTable.html +1 -1
  273. data/rdoc/RubyXL/Sheet.html +1 -1
  274. data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
  275. data/rdoc/RubyXL/SheetData.html +1 -1
  276. data/rdoc/RubyXL/Sheets.html +1 -1
  277. data/rdoc/RubyXL/SmartTagProperties.html +1 -1
  278. data/rdoc/RubyXL/SmartTagType.html +1 -1
  279. data/rdoc/RubyXL/SmartTagTypes.html +1 -1
  280. data/rdoc/RubyXL/SmartTags.html +1 -1
  281. data/rdoc/RubyXL/SortCondition.html +1 -1
  282. data/rdoc/RubyXL/SortState.html +1 -1
  283. data/rdoc/RubyXL/Sqref.html +1 -1
  284. data/rdoc/RubyXL/Stop.html +1 -1
  285. data/rdoc/RubyXL/StringNode.html +1 -1
  286. data/rdoc/RubyXL/StringNodeW3C.html +1 -1
  287. data/rdoc/RubyXL/StringValue.html +1 -1
  288. data/rdoc/RubyXL/Stylesheet.html +1 -1
  289. data/rdoc/RubyXL/TableParts.html +1 -1
  290. data/rdoc/RubyXL/TableStyle.html +1 -1
  291. data/rdoc/RubyXL/TableStyles.html +1 -1
  292. data/rdoc/RubyXL/Text.html +1 -1
  293. data/rdoc/RubyXL/Theme.html +1 -1
  294. data/rdoc/RubyXL/ThemeElements.html +1 -1
  295. data/rdoc/RubyXL/Top10.html +1 -1
  296. data/rdoc/RubyXL/Variant.html +1 -1
  297. data/rdoc/RubyXL/Vector.html +1 -1
  298. data/rdoc/RubyXL/VectorValue.html +1 -1
  299. data/rdoc/RubyXL/VisualProperties.html +1 -1
  300. data/rdoc/RubyXL/WebPublishObject.html +1 -1
  301. data/rdoc/RubyXL/WebPublishObjects.html +1 -1
  302. data/rdoc/RubyXL/WebPublishingItem.html +1 -1
  303. data/rdoc/RubyXL/WebPublishingItems.html +1 -1
  304. data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
  305. data/rdoc/RubyXL/Workbook.html +1 -1
  306. data/rdoc/RubyXL/WorkbookProperties.html +1 -1
  307. data/rdoc/RubyXL/WorkbookProtection.html +1 -1
  308. data/rdoc/RubyXL/WorkbookRelationships.html +1 -1
  309. data/rdoc/RubyXL/WorkbookView.html +1 -1
  310. data/rdoc/RubyXL/WorkbookViews.html +1 -1
  311. data/rdoc/RubyXL/Worksheet.html +1 -1
  312. data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
  313. data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
  314. data/rdoc/RubyXL/WorksheetProperties.html +1 -1
  315. data/rdoc/RubyXL/WorksheetProtection.html +1 -1
  316. data/rdoc/RubyXL/WorksheetView.html +1 -1
  317. data/rdoc/RubyXL/WorksheetViews.html +1 -1
  318. data/rdoc/RubyXL/XF.html +1 -1
  319. data/rdoc/created.rid +20 -20
  320. data/rdoc/index.html +2 -2
  321. data/rdoc/js/search_index.js +1 -1
  322. data/rdoc/table_of_contents.html +2 -2
  323. data/rubyXL.gemspec +3 -3
  324. data/spec/lib/worksheet_spec.rb +13 -0
  325. data/test/test_parse_write.rb +1 -1
  326. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73b72075ba552948163cd05f66ce5ba9c7df31ac
4
- data.tar.gz: 3baf324bb4179983d316d71fb117535ae664336b
3
+ metadata.gz: e5d4de6685adea206ea016f0836086e35756a016
4
+ data.tar.gz: 808c2f74761873580278873b28644650244aa003
5
5
  SHA512:
6
- metadata.gz: a42cc82b1a82fdffb5e687c003a8e61c99c5e5d2bb8d9d128697e71bc5a6b71eed82a4898c7253c664a4c6b915f54115b9f6d90a833e6f0fd78f727ef0d2aa46
7
- data.tar.gz: 115d6753e60167ec4f38f4b7db5beec1cc88965ff7847c3346c3a6b3556e68e0a50e7e18ac87d9d9757c7fb9878d019de85f8808f07614ad6053f8c34874ff8a
6
+ metadata.gz: c48ceac803b8088420747e52fff0700aab2ebfce5355bd128c0334f6da73327a509b2c7300560297463ad0663405df237941b69cfc4a78e874155e8a3a141540
7
+ data.tar.gz: e6cd7b075274dc1cd319ca32e56b4602acdbda72ae39a67a2d46bc2baae3c6881df57966decc8febaef3606fc010bc7e2ee23c0c827be8f778deabcc0f256577
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.5
1
+ 2.5.6
@@ -10,11 +10,13 @@ module RubyXL
10
10
  self.new(opts).parse(file_path)
11
11
  end
12
12
 
13
- # +:data_only+ allows only the sheet data to be parsed, so as to speed up parsing
14
- # However, using this option will result in date-formatted cells being interpreted as numbers
13
+ # +keep_tempfiles_on_error+ prevents temp files to be erased if exception was thrown during parsing.
14
+ # +:data_only+ allows only the sheet data to be parsed, so as to speed up parsing.
15
+ # However, using this option will result in date-formatted cells being interpreted as numbers.
15
16
  def initialize(opts = {})
16
17
  @data_only = opts.is_a?(TrueClass) || opts[:data_only]
17
18
  @skip_filename_check = opts[:skip_filename_check]
19
+ @delete_tempfiles_on_error = !opts[:keep_tempfiles_on_error]
18
20
  end
19
21
 
20
22
  def data_only
@@ -22,90 +24,95 @@ module RubyXL
22
24
  self
23
25
  end
24
26
 
25
- def parse(xl_file_path, opts = {})
27
+ def parse(xl_file_path)
26
28
  raise 'Not .xlsx or .xlsm excel file' unless @skip_filename_check ||
27
29
  %w{.xlsx .xlsm}.include?(File.extname(xl_file_path))
28
30
 
29
31
  dir_path = File.join(File.dirname(xl_file_path), Dir::Tmpname.make_tmpname(['rubyXL', '.tmp'], nil))
32
+ parse_success = false
33
+
34
+ begin
35
+ ::Zip::File.open(xl_file_path) { |zip_file|
36
+ zip_file.each { |f|
37
+ fpath = File.join(dir_path, f.name)
38
+ FileUtils.mkdir_p(File.dirname(fpath))
39
+ zip_file.extract(f, fpath) unless File.exist?(fpath)
40
+ }
41
+ }
30
42
 
31
- ::Zip::File.open(xl_file_path) { |zip_file|
32
- zip_file.each { |f|
33
- fpath = File.join(dir_path, f.name)
34
- FileUtils.mkdir_p(File.dirname(fpath))
35
- zip_file.extract(f, fpath) unless File.exist?(fpath)
43
+ wb = RubyXL::Workbook.parse_file(dir_path)
44
+ wb.filepath = xl_file_path
45
+
46
+ wb.content_types = RubyXL::ContentTypes.parse_file(dir_path)
47
+ wb.relationship_container = RubyXL::WorkbookRelationships.parse_file(dir_path)
48
+ wb.root_relationship_container = RubyXL::RootRelationships.parse_file(dir_path)
49
+ wb.shared_strings_container = RubyXL::SharedStringsTable.parse_file(dir_path)
50
+
51
+ # We must always load the stylesheet because it tells us which values are actually dates/times.
52
+ wb.stylesheet = RubyXL::Stylesheet.parse_file(dir_path)
53
+
54
+ unless @data_only
55
+ wb.media.load_dir(dir_path)
56
+ wb.external_links.load_dir(dir_path)
57
+ wb.external_links_rels.load_dir(dir_path)
58
+ wb.drawings.load_dir(dir_path)
59
+ wb.drawings_rels.load_dir(dir_path)
60
+ wb.charts.load_dir(dir_path)
61
+ wb.chart_rels.load_dir(dir_path)
62
+ wb.printer_settings.load_dir(dir_path)
63
+ wb.worksheet_rels.load_dir(dir_path)
64
+ wb.chartsheet_rels.load_dir(dir_path)
65
+ wb.macros.load_file(dir_path, 'vbaProject.bin')
66
+ wb.thumbnail.load_file(dir_path, 'thumbnail.jpeg')
67
+
68
+ wb.theme = RubyXL::Theme.parse_file(dir_path)
69
+ wb.core_properties = RubyXL::CoreProperties.parse_file(dir_path)
70
+ wb.document_properties = RubyXL::DocumentProperties.parse_file(dir_path)
71
+ wb.calculation_chain = RubyXL::CalculationChain.parse_file(dir_path)
72
+ end
73
+
74
+ #fills out count information for each font, fill, and border
75
+ wb.cell_xfs.each { |style|
76
+ id = style.font_id
77
+ wb.fonts[id].count += 1 #unless id.nil?
78
+
79
+ id = style.fill_id
80
+ wb.fills[id].count += 1 #unless id.nil?
81
+
82
+ id = style.border_id
83
+ wb.borders[id].count += 1 #unless id.nil?
36
84
  }
37
- }
38
-
39
- wb = RubyXL::Workbook.parse_file(dir_path)
40
- wb.filepath = xl_file_path
41
-
42
- wb.content_types = RubyXL::ContentTypes.parse_file(dir_path)
43
- wb.relationship_container = RubyXL::WorkbookRelationships.parse_file(dir_path)
44
- wb.root_relationship_container = RubyXL::RootRelationships.parse_file(dir_path)
45
- wb.shared_strings_container = RubyXL::SharedStringsTable.parse_file(dir_path)
46
-
47
- # We must always load the stylesheet because it tells us which values are actually dates/times.
48
- wb.stylesheet = RubyXL::Stylesheet.parse_file(dir_path)
49
-
50
- unless @data_only
51
- wb.media.load_dir(dir_path)
52
- wb.external_links.load_dir(dir_path)
53
- wb.external_links_rels.load_dir(dir_path)
54
- wb.drawings.load_dir(dir_path)
55
- wb.drawings_rels.load_dir(dir_path)
56
- wb.charts.load_dir(dir_path)
57
- wb.chart_rels.load_dir(dir_path)
58
- wb.printer_settings.load_dir(dir_path)
59
- wb.worksheet_rels.load_dir(dir_path)
60
- wb.chartsheet_rels.load_dir(dir_path)
61
- wb.macros.load_file(dir_path, 'vbaProject.bin')
62
- wb.thumbnail.load_file(dir_path, 'thumbnail.jpeg')
63
-
64
- wb.theme = RubyXL::Theme.parse_file(dir_path)
65
- wb.core_properties = RubyXL::CoreProperties.parse_file(dir_path)
66
- wb.document_properties = RubyXL::DocumentProperties.parse_file(dir_path)
67
- wb.calculation_chain = RubyXL::CalculationChain.parse_file(dir_path)
68
- end
69
85
 
70
- #fills out count information for each font, fill, and border
71
- wb.cell_xfs.each { |style|
72
- id = style.font_id
73
- wb.fonts[id].count += 1 #unless id.nil?
74
-
75
- id = style.fill_id
76
- wb.fills[id].count += 1 #unless id.nil?
77
-
78
- id = style.border_id
79
- wb.borders[id].count += 1 #unless id.nil?
80
- }
81
-
82
- wb.sheets.each_with_index { |sheet, i|
83
- sheet_rel = wb.relationship_container.find_by_rid(sheet.r_id)
84
-
85
- # Making sure that the file will be automatically closed immediately after it has been read
86
- File.open(File.join(dir_path, 'xl', sheet_rel.target)) { |sheet_file|
87
- case File::basename(sheet_rel.type)
88
- when 'worksheet' then
89
- sheet_obj = RubyXL::Worksheet.parse(sheet_file)
90
- sheet_obj.sheet_data.rows.each { |r|
91
- next if r.nil?
92
- r.worksheet = sheet
93
- r.cells.each { |c| c.worksheet = sheet_obj unless c.nil? }
94
- }
95
- when 'chartsheet' then
96
- sheet_obj = RubyXL::Chartsheet.parse(sheet_file)
97
- end
98
-
99
- sheet_obj.workbook = wb
100
- sheet_obj.sheet_name = sheet.name
101
- sheet_obj.sheet_id = sheet.sheet_id
102
- sheet_obj.state = sheet.state
103
-
104
- wb.worksheets[i] = sheet_obj
86
+ wb.sheets.each_with_index { |sheet, i|
87
+ sheet_rel = wb.relationship_container.find_by_rid(sheet.r_id)
88
+
89
+ # Making sure that the file will be automatically closed immediately after it has been read
90
+ File.open(File.join(dir_path, 'xl', sheet_rel.target)) { |sheet_file|
91
+ case File::basename(sheet_rel.type)
92
+ when 'worksheet' then
93
+ sheet_obj = RubyXL::Worksheet.parse(sheet_file)
94
+ sheet_obj.sheet_data.rows.each { |r|
95
+ next if r.nil?
96
+ r.worksheet = sheet
97
+ r.cells.each { |c| c.worksheet = sheet_obj unless c.nil? }
98
+ }
99
+ when 'chartsheet' then
100
+ sheet_obj = RubyXL::Chartsheet.parse(sheet_file)
101
+ end
102
+
103
+ sheet_obj.workbook = wb
104
+ sheet_obj.sheet_name = sheet.name
105
+ sheet_obj.sheet_id = sheet.sheet_id
106
+ sheet_obj.state = sheet.state
107
+
108
+ wb.worksheets[i] = sheet_obj
109
+ }
105
110
  }
106
- }
107
111
 
108
- FileUtils.remove_entry_secure(dir_path)
112
+ parse_success = true
113
+ ensure
114
+ FileUtils.remove_entry_secure(dir_path) if parse_success || @delete_tempfiles_on_error
115
+ end
109
116
 
110
117
  return wb
111
118
  end
@@ -23,7 +23,7 @@ module LegacyWorksheet
23
23
  #returns 2d array of just the cell values (without style or formula information)
24
24
  def extract_data(args = {})
25
25
  sheet_data.rows.map { |row|
26
- row && row.cells.map { |c| c && c.value(args) }
26
+ row.cells.map { |c| c && c.value(args) } unless row.nil?
27
27
  }
28
28
  end
29
29
 
@@ -369,28 +369,33 @@ module LegacyWorksheet
369
369
  end
370
370
 
371
371
  # Inserts row at row_index, pushes down, copies style from the row above (that's what Excel 2013 does!)
372
- #USE OF THIS METHOD will break formulas which reference cells which are being "pushed down"
372
+ # NOTE: use of this method will break formulas which reference cells which are being "pushed down"
373
373
  def insert_row(row_index = 0)
374
374
  validate_workbook
375
375
  ensure_cell_exists(row_index)
376
376
 
377
- if row_index == 0 then
378
- old_row = nil
379
- new_cells = Array.new(sheet_data.rows[0].cells.size)
380
- else
381
- old_row = sheet_data.rows[row_index - 1]
382
- new_cells = old_row.cells.collect { |c|
383
- if c.nil? then nil
384
- else RubyXL::Cell.new(:style_index => c.style_index)
385
- end }
377
+ old_row = new_cells = nil
378
+
379
+ if row_index > 0 then
380
+ old_row = sheet_data.rows[row_index - 1]
381
+ if old_row then
382
+ new_cells = old_row.cells.collect { |c|
383
+ if c.nil? then nil
384
+ else RubyXL::Cell.new(:style_index => c.style_index)
385
+ end }
386
+ end
386
387
  end
387
388
 
389
+ row0 = sheet_data.rows[0]
390
+ new_cells ||= Array.new((row0 && row0.cells.size) || 0)
391
+
388
392
  sheet_data.rows.insert(row_index, nil)
389
393
  new_row = add_row(row_index, :cells => new_cells, :style_index => old_row && old_row.style_index)
390
394
 
391
- #update row value for all rows below
395
+ # Update row values for all rows below
392
396
  row_index.upto(sheet_data.rows.size - 1) { |i|
393
397
  row = sheet_data.rows[i]
398
+ next if row.nil?
394
399
  row.cells.each { |c| c.row = i unless c.nil? }
395
400
  }
396
401
 
@@ -403,21 +408,20 @@ module LegacyWorksheet
403
408
 
404
409
  return nil unless column_exists(column_index)
405
410
 
406
- #delete column
407
411
  sheet_data.rows.each { |row| row.cells.delete_at(column_index) }
408
412
 
409
- #change column numbers for cells to right of deleted column
413
+ # Change column numbers for cells to the right of the deleted column
410
414
  sheet_data.rows.each_with_index { |row, row_index|
411
415
  row.cells.each_with_index { |c, column_index|
412
- c.column -= 1 if c.is_a?(Cell)
416
+ c.column = column_index if c.is_a?(Cell)
413
417
  }
414
418
  }
415
419
 
416
420
  cols.column_ranges.each { |range| range.delete_column(column_index) }
417
421
  end
418
422
 
419
- # inserts column at +column_index+, pushes everything right, takes styles from column to left
420
- # USE OF THIS METHOD will break formulas which reference cells which are being "pushed down"
423
+ # Inserts column at +column_index+, pushes everything right, takes styles from column to left
424
+ # NOTE: use of this method will break formulas which reference cells which are being "pushed right"
421
425
  def insert_column(column_index = 0)
422
426
  validate_workbook
423
427
  ensure_cell_exists(0, column_index)
@@ -816,7 +820,7 @@ module LegacyWorksheet
816
820
  # with lower indices, filling them with +nil+s. But, we can't just write +nil+
817
821
  # to +column_index+ because it may be less than +size+! So we read from that index
818
822
  # (if it didn't exist, we will get nil) and write right back.
819
- sheet_data.rows.each { |r| r.cells[column_index] = r.cells[column_index] }
823
+ sheet_data.rows.each { |r| r.cells[column_index] = r.cells[column_index] unless r.nil? }
820
824
 
821
825
  first_row = sheet_data.rows.first
822
826
  col_size = [ first_row && first_row.cells.size || 0, column_index ].max
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>README - rubyXL 2.5.5</title>
7
+ <title>README - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="./fonts.css" rel="stylesheet">
10
10
  <link href="./rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>module RubyXL - rubyXL 2.5.5</title>
7
+ <title>module RubyXL - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="./fonts.css" rel="stylesheet">
10
10
  <link href="./rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::AExtension - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::AExtension - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::AExtensionStorageArea - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::AExtensionStorageArea - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::AdjustHandleList - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::AdjustHandleList - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::Alignment - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::Alignment - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::AlternateContent - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::AlternateContent - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::AutoFilter - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::AutoFilter - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::AutoFilterColumn - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::AutoFilterColumn - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::BodyProperties - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::BodyProperties - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::BooleanNode - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::BooleanNode - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::BooleanValue - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::BooleanValue - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::Border - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::Border - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::BorderEdge - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::BorderEdge - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::Borders - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::Borders - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>class RubyXL::Break - rubyXL 2.5.5</title>
7
+ <title>class RubyXL::Break - rubyXL 2.5.6</title>
8
8
 
9
9
  <link href="../fonts.css" rel="stylesheet">
10
10
  <link href="../rdoc.css" rel="stylesheet">