rubyXL 3.4.11 → 3.4.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (419) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -1
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +38 -34
  5. data/LICENSE.txt +1 -1
  6. data/README.rdoc +6 -1
  7. data/VERSION +1 -1
  8. data/lib/rubyXL/convenience_methods/cell.rb +1 -1
  9. data/lib/rubyXL/convenience_methods/color.rb +5 -3
  10. data/lib/rubyXL/convenience_methods/worksheet.rb +72 -0
  11. data/lib/rubyXL/objects/chartsheet.rb +1 -1
  12. data/lib/rubyXL/objects/data_validation.rb +2 -0
  13. data/lib/rubyXL/objects/document_properties.rb +2 -2
  14. data/lib/rubyXL/objects/external_links.rb +25 -1
  15. data/lib/rubyXL/objects/ooxml_object.rb +10 -0
  16. data/lib/rubyXL/objects/relationships.rb +1 -1
  17. data/lib/rubyXL/objects/sheet_data.rb +2 -1
  18. data/lib/rubyXL/objects/storage.rb +1 -0
  19. data/lib/rubyXL/objects/theme.rb +1 -1
  20. data/lib/rubyXL/objects/workbook.rb +12 -6
  21. data/lib/rubyXL/objects/worksheet.rb +7 -7
  22. data/lib/rubyXL/worksheet.rb +1 -1
  23. data/rdoc/README_rdoc.html +12 -7
  24. data/rdoc/RubyXL.html +6 -319
  25. data/rdoc/RubyXL/AExtension.html +9 -49
  26. data/rdoc/RubyXL/AExtensionStorageArea.html +5 -12
  27. data/rdoc/RubyXL/ActiveX.html +11 -40
  28. data/rdoc/RubyXL/ActiveXBinary.html +5 -17
  29. data/rdoc/RubyXL/AdjustHandleList.html +5 -12
  30. data/rdoc/RubyXL/Alignment.html +5 -12
  31. data/rdoc/RubyXL/AlternateContent.html +5 -12
  32. data/rdoc/RubyXL/Authors.html +5 -12
  33. data/rdoc/RubyXL/AutoFilter.html +5 -12
  34. data/rdoc/RubyXL/AutoFilterColumn.html +5 -12
  35. data/rdoc/RubyXL/BinaryImageFile.html +5 -20
  36. data/rdoc/RubyXL/BodyProperties.html +5 -12
  37. data/rdoc/RubyXL/BooleanNode.html +5 -12
  38. data/rdoc/RubyXL/BooleanValue.html +5 -12
  39. data/rdoc/RubyXL/Border.html +8 -68
  40. data/rdoc/RubyXL/BorderEdge.html +8 -42
  41. data/rdoc/RubyXL/Borders.html +8 -29
  42. data/rdoc/RubyXL/Break.html +5 -12
  43. data/rdoc/RubyXL/BreakList.html +5 -12
  44. data/rdoc/RubyXL/CT_AdjPoint2D.html +5 -12
  45. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +5 -12
  46. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +5 -12
  47. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +5 -12
  48. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +5 -12
  49. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +5 -12
  50. data/rdoc/RubyXL/CT_Backdrop.html +5 -12
  51. data/rdoc/RubyXL/CT_Bevel.html +5 -12
  52. data/rdoc/RubyXL/CT_BiLevelEffect.html +5 -12
  53. data/rdoc/RubyXL/CT_BlendEffect.html +5 -12
  54. data/rdoc/RubyXL/CT_Blip.html +5 -12
  55. data/rdoc/RubyXL/CT_BlipFillProperties.html +5 -12
  56. data/rdoc/RubyXL/CT_BlurEffect.html +5 -12
  57. data/rdoc/RubyXL/CT_Camera.html +5 -12
  58. data/rdoc/RubyXL/CT_Color.html +5 -12
  59. data/rdoc/RubyXL/CT_ColorChangeEffect.html +5 -12
  60. data/rdoc/RubyXL/CT_ColorMapping.html +5 -12
  61. data/rdoc/RubyXL/CT_ColorScheme.html +5 -12
  62. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +5 -12
  63. data/rdoc/RubyXL/CT_ConnectionSite.html +5 -12
  64. data/rdoc/RubyXL/CT_ConnectionSiteList.html +5 -12
  65. data/rdoc/RubyXL/CT_DashStop.html +5 -12
  66. data/rdoc/RubyXL/CT_DashStopList.html +5 -12
  67. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +5 -12
  68. data/rdoc/RubyXL/CT_DuotoneEffect.html +5 -12
  69. data/rdoc/RubyXL/CT_EffectContainer.html +5 -12
  70. data/rdoc/RubyXL/CT_EffectList.html +5 -12
  71. data/rdoc/RubyXL/CT_EffectReference.html +5 -12
  72. data/rdoc/RubyXL/CT_EffectStyleItem.html +5 -12
  73. data/rdoc/RubyXL/CT_EffectStyleList.html +5 -12
  74. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +5 -12
  75. data/rdoc/RubyXL/CT_FillEffect.html +5 -12
  76. data/rdoc/RubyXL/CT_FillOverlayEffect.html +5 -12
  77. data/rdoc/RubyXL/CT_FillStyleList.html +5 -12
  78. data/rdoc/RubyXL/CT_FlatText.html +5 -12
  79. data/rdoc/RubyXL/CT_FontCollection.html +5 -12
  80. data/rdoc/RubyXL/CT_FontReference.html +5 -12
  81. data/rdoc/RubyXL/CT_GeomGuideList.html +5 -12
  82. data/rdoc/RubyXL/CT_GlowEffect.html +5 -12
  83. data/rdoc/RubyXL/CT_GradientFillProperties.html +5 -12
  84. data/rdoc/RubyXL/CT_GradientStop.html +5 -12
  85. data/rdoc/RubyXL/CT_GradientStopList.html +5 -12
  86. data/rdoc/RubyXL/CT_HSLEffect.html +5 -12
  87. data/rdoc/RubyXL/CT_HslColor.html +5 -12
  88. data/rdoc/RubyXL/CT_Hyperlink.html +5 -12
  89. data/rdoc/RubyXL/CT_InnerShadowEffect.html +5 -12
  90. data/rdoc/RubyXL/CT_LightRig.html +5 -12
  91. data/rdoc/RubyXL/CT_LineEndProperties.html +5 -12
  92. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +5 -12
  93. data/rdoc/RubyXL/CT_LineProperties.html +5 -12
  94. data/rdoc/RubyXL/CT_LineStyleList.html +5 -12
  95. data/rdoc/RubyXL/CT_LinearShadeProperties.html +5 -12
  96. data/rdoc/RubyXL/CT_LuminanceEffect.html +5 -12
  97. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +5 -12
  98. data/rdoc/RubyXL/CT_OuterShadowEffect.html +5 -12
  99. data/rdoc/RubyXL/CT_Path2D.html +5 -12
  100. data/rdoc/RubyXL/CT_Path2DArcTo.html +5 -12
  101. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +5 -12
  102. data/rdoc/RubyXL/CT_Path2DList.html +5 -12
  103. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +5 -12
  104. data/rdoc/RubyXL/CT_Path2DTo.html +5 -12
  105. data/rdoc/RubyXL/CT_PathShadeProperties.html +5 -12
  106. data/rdoc/RubyXL/CT_PatternFillProperties.html +5 -12
  107. data/rdoc/RubyXL/CT_Point3D.html +5 -12
  108. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +5 -12
  109. data/rdoc/RubyXL/CT_PresetColor.html +5 -12
  110. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +5 -12
  111. data/rdoc/RubyXL/CT_PresetShadowEffect.html +5 -12
  112. data/rdoc/RubyXL/CT_PresetTextShape.html +5 -12
  113. data/rdoc/RubyXL/CT_ReflectionEffect.html +5 -12
  114. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +5 -12
  115. data/rdoc/RubyXL/CT_RelativeRect.html +5 -12
  116. data/rdoc/RubyXL/CT_SRgbColor.html +5 -12
  117. data/rdoc/RubyXL/CT_ScRgbColor.html +5 -12
  118. data/rdoc/RubyXL/CT_Scene3D.html +5 -12
  119. data/rdoc/RubyXL/CT_SchemeColor.html +5 -12
  120. data/rdoc/RubyXL/CT_Shape3D.html +5 -12
  121. data/rdoc/RubyXL/CT_ShapeStyle.html +5 -12
  122. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +5 -12
  123. data/rdoc/RubyXL/CT_SphereCoords.html +5 -12
  124. data/rdoc/RubyXL/CT_StretchInfoProperties.html +5 -12
  125. data/rdoc/RubyXL/CT_StyleMatrix.html +5 -12
  126. data/rdoc/RubyXL/CT_StyleMatrixReference.html +5 -12
  127. data/rdoc/RubyXL/CT_SupplementalFont.html +5 -12
  128. data/rdoc/RubyXL/CT_SystemColor.html +5 -12
  129. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +5 -12
  130. data/rdoc/RubyXL/CT_TextBlipBullet.html +5 -12
  131. data/rdoc/RubyXL/CT_TextCharBullet.html +5 -12
  132. data/rdoc/RubyXL/CT_TextCharacterProperties.html +5 -12
  133. data/rdoc/RubyXL/CT_TextFont.html +5 -12
  134. data/rdoc/RubyXL/CT_TextListStyle.html +5 -12
  135. data/rdoc/RubyXL/CT_TextNormalAutofit.html +5 -12
  136. data/rdoc/RubyXL/CT_TextParagraphProperties.html +5 -12
  137. data/rdoc/RubyXL/CT_TextSpacing.html +5 -12
  138. data/rdoc/RubyXL/CT_TextTabStop.html +5 -12
  139. data/rdoc/RubyXL/CT_TextTabStopList.html +5 -12
  140. data/rdoc/RubyXL/CT_TileInfoProperties.html +5 -12
  141. data/rdoc/RubyXL/CT_TintEffect.html +5 -12
  142. data/rdoc/RubyXL/CT_Transform2D.html +5 -12
  143. data/rdoc/RubyXL/CT_TransformEffect.html +5 -12
  144. data/rdoc/RubyXL/CT_Vector3D.html +5 -12
  145. data/rdoc/RubyXL/CT_XYAdjustHandle.html +5 -12
  146. data/rdoc/RubyXL/CalculationChain.html +8 -37
  147. data/rdoc/RubyXL/CalculationChainCell.html +5 -12
  148. data/rdoc/RubyXL/CalculationProperties.html +5 -12
  149. data/rdoc/RubyXL/Cell.html +13 -215
  150. data/rdoc/RubyXL/CellConvenienceMethods.html +6 -455
  151. data/rdoc/RubyXL/CellExt.html +5 -12
  152. data/rdoc/RubyXL/CellSmartTag.html +5 -12
  153. data/rdoc/RubyXL/CellSmartTagProperty.html +5 -12
  154. data/rdoc/RubyXL/CellSmartTags.html +5 -12
  155. data/rdoc/RubyXL/CellStyle.html +5 -12
  156. data/rdoc/RubyXL/CellStyleXFs.html +8 -29
  157. data/rdoc/RubyXL/CellStyles.html +8 -29
  158. data/rdoc/RubyXL/CellValue.html +8 -29
  159. data/rdoc/RubyXL/CellWatch.html +5 -12
  160. data/rdoc/RubyXL/CellWatches.html +5 -12
  161. data/rdoc/RubyXL/CellXFs.html +8 -29
  162. data/rdoc/RubyXL/ChartColorsFile.html +5 -20
  163. data/rdoc/RubyXL/ChartFile.html +10 -42
  164. data/rdoc/RubyXL/ChartStyleFile.html +5 -20
  165. data/rdoc/RubyXL/ChartUserShapesFile.html +5 -20
  166. data/rdoc/RubyXL/Chartsheet.html +10 -59
  167. data/rdoc/RubyXL/ChartsheetPageSetup.html +5 -12
  168. data/rdoc/RubyXL/ChartsheetProperties.html +5 -12
  169. data/rdoc/RubyXL/ChartsheetProtection.html +5 -12
  170. data/rdoc/RubyXL/ChartsheetView.html +5 -12
  171. data/rdoc/RubyXL/ChartsheetViews.html +5 -12
  172. data/rdoc/RubyXL/Color.html +8 -34
  173. data/rdoc/RubyXL/ColorConvenienceClasses.html +3 -9
  174. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +10 -58
  175. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +14 -74
  176. data/rdoc/RubyXL/ColorConvenienceMethods.html +6 -26
  177. data/rdoc/RubyXL/ColorFilter.html +5 -12
  178. data/rdoc/RubyXL/ColorScale.html +5 -12
  179. data/rdoc/RubyXL/ColorSet.html +5 -12
  180. data/rdoc/RubyXL/Colors.html +5 -12
  181. data/rdoc/RubyXL/ColumnRange.html +8 -60
  182. data/rdoc/RubyXL/ColumnRanges.html +8 -68
  183. data/rdoc/RubyXL/Comment.html +5 -12
  184. data/rdoc/RubyXL/CommentList.html +5 -12
  185. data/rdoc/RubyXL/CommentsFile.html +8 -42
  186. data/rdoc/RubyXL/ConditionalFormatValue.html +5 -12
  187. data/rdoc/RubyXL/ConditionalFormatting.html +5 -12
  188. data/rdoc/RubyXL/ConditionalFormattingRule.html +5 -12
  189. data/rdoc/RubyXL/Connection.html +5 -12
  190. data/rdoc/RubyXL/ConnectionTable.html +5 -12
  191. data/rdoc/RubyXL/ConnectionTables.html +5 -12
  192. data/rdoc/RubyXL/ConnectionTextField.html +5 -12
  193. data/rdoc/RubyXL/ConnectionTextFields.html +5 -12
  194. data/rdoc/RubyXL/Connections.html +8 -37
  195. data/rdoc/RubyXL/ContentTypeDefault.html +5 -12
  196. data/rdoc/RubyXL/ContentTypeOverride.html +5 -12
  197. data/rdoc/RubyXL/ContentTypes.html +8 -50
  198. data/rdoc/RubyXL/ControlPropertiesFile.html +7 -17
  199. data/rdoc/RubyXL/CorePropertiesFile.html +10 -148
  200. data/rdoc/RubyXL/CustomColor.html +5 -12
  201. data/rdoc/RubyXL/CustomColorList.html +5 -12
  202. data/rdoc/RubyXL/CustomFilter.html +5 -12
  203. data/rdoc/RubyXL/CustomFilters.html +5 -12
  204. data/rdoc/RubyXL/CustomGeometry.html +5 -12
  205. data/rdoc/RubyXL/CustomProperties.html +5 -12
  206. data/rdoc/RubyXL/CustomPropertiesFile.html +5 -20
  207. data/rdoc/RubyXL/CustomProperty.html +5 -12
  208. data/rdoc/RubyXL/CustomPropertyFile.html +5 -20
  209. data/rdoc/RubyXL/CustomSheetView.html +5 -12
  210. data/rdoc/RubyXL/CustomSheetViews.html +5 -12
  211. data/rdoc/RubyXL/CustomWorkbookView.html +5 -12
  212. data/rdoc/RubyXL/CustomWorkbookViews.html +5 -12
  213. data/rdoc/RubyXL/CustomXMLFile.html +5 -17
  214. data/rdoc/RubyXL/DXF.html +5 -12
  215. data/rdoc/RubyXL/DXFs.html +5 -12
  216. data/rdoc/RubyXL/DataBar.html +5 -12
  217. data/rdoc/RubyXL/DataConsolidate.html +5 -12
  218. data/rdoc/RubyXL/DataConsolidationReference.html +5 -12
  219. data/rdoc/RubyXL/DataConsolidationReferences.html +5 -12
  220. data/rdoc/RubyXL/DataType.html +3 -32
  221. data/rdoc/RubyXL/DataValidation.html +5 -12
  222. data/rdoc/RubyXL/DataValidations.html +5 -12
  223. data/rdoc/RubyXL/DateGroupItem.html +5 -12
  224. data/rdoc/RubyXL/DefinedName.html +5 -12
  225. data/rdoc/RubyXL/DefinedNameExt.html +5 -12
  226. data/rdoc/RubyXL/DefinedNames.html +5 -12
  227. data/rdoc/RubyXL/DefinedNamesExt.html +5 -12
  228. data/rdoc/RubyXL/DocumentPropertiesFile.html +8 -55
  229. data/rdoc/RubyXL/DrawingFile.html +10 -42
  230. data/rdoc/RubyXL/DynamicFilter.html +5 -12
  231. data/rdoc/RubyXL/EmbeddedControl.html +5 -12
  232. data/rdoc/RubyXL/EmbeddedControls.html +5 -12
  233. data/rdoc/RubyXL/Extension.html +5 -12
  234. data/rdoc/RubyXL/ExtensionStorageArea.html +5 -12
  235. data/rdoc/RubyXL/Extents.html +5 -12
  236. data/rdoc/RubyXL/ExternalBook.html +5 -12
  237. data/rdoc/RubyXL/ExternalLinksFile.html +11 -43
  238. data/rdoc/RubyXL/ExternalReference.html +5 -12
  239. data/rdoc/RubyXL/ExternalReferences.html +5 -12
  240. data/rdoc/RubyXL/ExtraColorSchemeList.html +5 -12
  241. data/rdoc/RubyXL/FieldItem.html +5 -12
  242. data/rdoc/RubyXL/FileRecoveryProperties.html +5 -12
  243. data/rdoc/RubyXL/FileSharing.html +5 -12
  244. data/rdoc/RubyXL/FileVersion.html +5 -12
  245. data/rdoc/RubyXL/Fill.html +8 -29
  246. data/rdoc/RubyXL/Fills.html +8 -29
  247. data/rdoc/RubyXL/FilterContainer.html +5 -12
  248. data/rdoc/RubyXL/FloatNode.html +5 -12
  249. data/rdoc/RubyXL/FloatValue.html +5 -12
  250. data/rdoc/RubyXL/Font.html +8 -34
  251. data/rdoc/RubyXL/FontConvenienceMethods.html +6 -195
  252. data/rdoc/RubyXL/FontScheme.html +5 -12
  253. data/rdoc/RubyXL/Fonts.html +8 -29
  254. data/rdoc/RubyXL/Formula.html +5 -12
  255. data/rdoc/RubyXL/FunctionGroup.html +5 -12
  256. data/rdoc/RubyXL/FunctionGroups.html +5 -12
  257. data/rdoc/RubyXL/GenericStorageObject.html +9 -73
  258. data/rdoc/RubyXL/GradientFill.html +5 -12
  259. data/rdoc/RubyXL/HeaderFooterSettings.html +5 -12
  260. data/rdoc/RubyXL/Hyperlink.html +5 -12
  261. data/rdoc/RubyXL/HyperlinkRelFile.html +5 -17
  262. data/rdoc/RubyXL/Hyperlinks.html +5 -12
  263. data/rdoc/RubyXL/IconFilter.html +5 -12
  264. data/rdoc/RubyXL/IconSet.html +5 -12
  265. data/rdoc/RubyXL/IgnoredError.html +5 -12
  266. data/rdoc/RubyXL/IgnoredErrors.html +5 -12
  267. data/rdoc/RubyXL/IndexedColors.html +5 -12
  268. data/rdoc/RubyXL/InputCells.html +5 -12
  269. data/rdoc/RubyXL/IntegerNode.html +5 -12
  270. data/rdoc/RubyXL/IntegerValue.html +5 -12
  271. data/rdoc/RubyXL/LegacyCell.html +6 -26
  272. data/rdoc/RubyXL/LegacyWorksheet.html +10 -87
  273. data/rdoc/RubyXL/MRUColors.html +5 -12
  274. data/rdoc/RubyXL/MacrosFile.html +5 -20
  275. data/rdoc/RubyXL/MergedCell.html +5 -12
  276. data/rdoc/RubyXL/MergedCells.html +5 -12
  277. data/rdoc/RubyXL/NumFmt.html +5 -12
  278. data/rdoc/RubyXL/NumberFormat.html +8 -29
  279. data/rdoc/RubyXL/NumberFormats.html +8 -34
  280. data/rdoc/RubyXL/OLEObject.html +5 -12
  281. data/rdoc/RubyXL/OLEObjectFile.html +5 -20
  282. data/rdoc/RubyXL/OLEObjects.html +5 -12
  283. data/rdoc/RubyXL/OLESize.html +5 -12
  284. data/rdoc/RubyXL/OOXMLContainerObject.html +19 -114
  285. data/rdoc/RubyXL/OOXMLIgnored.html +9 -44
  286. data/rdoc/RubyXL/OOXMLObject.html +7 -17
  287. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +31 -81
  288. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +23 -139
  289. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +10 -167
  290. data/rdoc/RubyXL/OOXMLTopLevelObject.html +14 -101
  291. data/rdoc/RubyXL/OdbcOleDbProperties.html +5 -12
  292. data/rdoc/RubyXL/Offset.html +5 -12
  293. data/rdoc/RubyXL/OlapProperties.html +5 -12
  294. data/rdoc/RubyXL/OleItem.html +99 -0
  295. data/rdoc/RubyXL/OleItems.html +99 -0
  296. data/rdoc/RubyXL/OleLink.html +99 -0
  297. data/rdoc/RubyXL/OutlineProperties.html +5 -12
  298. data/rdoc/RubyXL/PageMargins.html +5 -12
  299. data/rdoc/RubyXL/PageSetup.html +5 -12
  300. data/rdoc/RubyXL/PageSetupProperties.html +5 -12
  301. data/rdoc/RubyXL/Pane.html +5 -12
  302. data/rdoc/RubyXL/Parser.html +8 -42
  303. data/rdoc/RubyXL/PatternFill.html +5 -12
  304. data/rdoc/RubyXL/PhoneticProperties.html +5 -12
  305. data/rdoc/RubyXL/PhoneticRun.html +5 -12
  306. data/rdoc/RubyXL/PivotArea.html +5 -12
  307. data/rdoc/RubyXL/PivotCache.html +5 -12
  308. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +7 -25
  309. data/rdoc/RubyXL/PivotCacheRecordsFile.html +5 -20
  310. data/rdoc/RubyXL/PivotCaches.html +5 -12
  311. data/rdoc/RubyXL/PivotReference.html +5 -12
  312. data/rdoc/RubyXL/PivotReferences.html +5 -12
  313. data/rdoc/RubyXL/PivotTableFile.html +7 -25
  314. data/rdoc/RubyXL/PivotTableSelection.html +5 -12
  315. data/rdoc/RubyXL/PresetGeometry.html +5 -12
  316. data/rdoc/RubyXL/PrintOptions.html +5 -12
  317. data/rdoc/RubyXL/PrinterSettingsFile.html +5 -20
  318. data/rdoc/RubyXL/ProtectedRange.html +5 -12
  319. data/rdoc/RubyXL/ProtectedRanges.html +5 -12
  320. data/rdoc/RubyXL/Protection.html +5 -12
  321. data/rdoc/RubyXL/QueryParameter.html +5 -12
  322. data/rdoc/RubyXL/QueryParameters.html +5 -12
  323. data/rdoc/RubyXL/QueryTable.html +10 -42
  324. data/rdoc/RubyXL/QueryTableDeletedField.html +5 -12
  325. data/rdoc/RubyXL/QueryTableDeletedFields.html +5 -12
  326. data/rdoc/RubyXL/QueryTableField.html +5 -12
  327. data/rdoc/RubyXL/QueryTableFields.html +5 -12
  328. data/rdoc/RubyXL/QueryTableRefresh.html +5 -12
  329. data/rdoc/RubyXL/RID.html +5 -12
  330. data/rdoc/RubyXL/RawOOXML.html +9 -49
  331. data/rdoc/RubyXL/Reference.html +9 -190
  332. data/rdoc/RubyXL/Relationship.html +5 -12
  333. data/rdoc/RubyXL/RelationshipSupport.html +9 -106
  334. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +6 -26
  335. data/rdoc/RubyXL/RevisionPointer.html +5 -12
  336. data/rdoc/RubyXL/RichText.html +8 -29
  337. data/rdoc/RubyXL/RichTextRun.html +8 -29
  338. data/rdoc/RubyXL/Row.html +17 -152
  339. data/rdoc/RubyXL/RowExt.html +5 -12
  340. data/rdoc/RubyXL/RunProperties.html +5 -12
  341. data/rdoc/RubyXL/Scenario.html +5 -12
  342. data/rdoc/RubyXL/Scenarios.html +5 -12
  343. data/rdoc/RubyXL/Selection.html +8 -29
  344. data/rdoc/RubyXL/ShapeGuide.html +5 -12
  345. data/rdoc/RubyXL/ShapeTextRectangle.html +5 -12
  346. data/rdoc/RubyXL/SharedStringsTable.html +9 -119
  347. data/rdoc/RubyXL/Sheet.html +5 -12
  348. data/rdoc/RubyXL/SheetCalculationProperties.html +5 -12
  349. data/rdoc/RubyXL/SheetData.html +10 -44
  350. data/rdoc/RubyXL/SheetDataExt.html +5 -12
  351. data/rdoc/RubyXL/SheetDataSet.html +5 -12
  352. data/rdoc/RubyXL/SheetName.html +5 -12
  353. data/rdoc/RubyXL/SheetNames.html +5 -12
  354. data/rdoc/RubyXL/Sheets.html +5 -12
  355. data/rdoc/RubyXL/SlicerCacheFile.html +5 -20
  356. data/rdoc/RubyXL/SlicerFile.html +5 -20
  357. data/rdoc/RubyXL/SmartTagProperties.html +5 -12
  358. data/rdoc/RubyXL/SmartTagType.html +5 -12
  359. data/rdoc/RubyXL/SmartTagTypes.html +5 -12
  360. data/rdoc/RubyXL/SmartTags.html +5 -12
  361. data/rdoc/RubyXL/SortCondition.html +5 -12
  362. data/rdoc/RubyXL/SortState.html +5 -12
  363. data/rdoc/RubyXL/Sqref.html +9 -44
  364. data/rdoc/RubyXL/Stop.html +5 -12
  365. data/rdoc/RubyXL/StringNode.html +5 -12
  366. data/rdoc/RubyXL/StringNodeW3C.html +9 -44
  367. data/rdoc/RubyXL/StringValue.html +5 -12
  368. data/rdoc/RubyXL/Stylesheet.html +9 -92
  369. data/rdoc/RubyXL/TableFile.html +5 -20
  370. data/rdoc/RubyXL/TableParts.html +5 -12
  371. data/rdoc/RubyXL/TableStyle.html +5 -12
  372. data/rdoc/RubyXL/TableStyles.html +5 -12
  373. data/rdoc/RubyXL/Text.html +8 -50
  374. data/rdoc/RubyXL/TextImportSettings.html +5 -12
  375. data/rdoc/RubyXL/Theme.html +9 -65
  376. data/rdoc/RubyXL/ThemeElements.html +5 -12
  377. data/rdoc/RubyXL/ThumbnailFile.html +5 -20
  378. data/rdoc/RubyXL/Top10.html +5 -12
  379. data/rdoc/RubyXL/VMLDrawingFile.html +7 -25
  380. data/rdoc/RubyXL/Variant.html +5 -12
  381. data/rdoc/RubyXL/Vector.html +8 -29
  382. data/rdoc/RubyXL/VectorValue.html +5 -12
  383. data/rdoc/RubyXL/VisualProperties.html +5 -12
  384. data/rdoc/RubyXL/WebPublishObject.html +5 -12
  385. data/rdoc/RubyXL/WebPublishObjects.html +5 -12
  386. data/rdoc/RubyXL/WebPublishingItem.html +5 -12
  387. data/rdoc/RubyXL/WebPublishingItems.html +5 -12
  388. data/rdoc/RubyXL/WebPublishingProperties.html +5 -12
  389. data/rdoc/RubyXL/WebQueryProperties.html +5 -12
  390. data/rdoc/RubyXL/Workbook.html +40 -460
  391. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +6 -221
  392. data/rdoc/RubyXL/WorkbookProperties.html +5 -12
  393. data/rdoc/RubyXL/WorkbookProtection.html +5 -12
  394. data/rdoc/RubyXL/WorkbookRoot.html +11 -99
  395. data/rdoc/RubyXL/WorkbookView.html +5 -12
  396. data/rdoc/RubyXL/WorkbookViews.html +5 -12
  397. data/rdoc/RubyXL/Worksheet.html +11 -130
  398. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +161 -985
  399. data/rdoc/RubyXL/WorksheetDimensions.html +5 -12
  400. data/rdoc/RubyXL/WorksheetFormatProperties.html +5 -12
  401. data/rdoc/RubyXL/WorksheetProperties.html +5 -12
  402. data/rdoc/RubyXL/WorksheetProtection.html +5 -12
  403. data/rdoc/RubyXL/WorksheetView.html +5 -12
  404. data/rdoc/RubyXL/WorksheetViews.html +5 -12
  405. data/rdoc/RubyXL/XF.html +5 -12
  406. data/rdoc/created.rid +20 -20
  407. data/rdoc/css/rdoc.css +1 -1
  408. data/rdoc/index.html +8 -388
  409. data/rdoc/js/navigation.js.gz +0 -0
  410. data/rdoc/js/search_index.js +1 -1
  411. data/rdoc/js/search_index.js.gz +0 -0
  412. data/rdoc/js/searcher.js.gz +0 -0
  413. data/rdoc/table_of_contents.html +23 -5
  414. data/rubyXL.gemspec +20 -27
  415. data/spec/lib/cell_spec.rb +28 -3
  416. data/spec/lib/rgb_color_spec.rb +16 -0
  417. data/spec/lib/worksheet_spec.rb +265 -0
  418. metadata +9 -7
  419. data/test/output/test.xlsx +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1b04f515e5389f84549bd151482024475fda99ee8c2184f9e54a42b16f8179a
4
- data.tar.gz: b8e5c9e69831ec49303a3a2a59d719cbda4c26486cd84d78d13c5be401ee50d5
3
+ metadata.gz: 51db2d850a23f726d765f58fdaad378dd910becb0e468216095a1473a5770b9c
4
+ data.tar.gz: 56fbd84fb09a54fe29dcdb6f734c6ade11737d11dbe2130633dccc35999e85cd
5
5
  SHA512:
6
- metadata.gz: a216a03be415d7c6eb735718f4c78e51185cb443881f87ecd41c08d5a994146cf2a0432537a5554a8c9f7d638d726cb0e733e9650421bf84d31eab9f0b638637
7
- data.tar.gz: 9511ff073542c85c0fc61c4408b6f9bc35c36a4854c90b945c193225c96cf2a68929bc588f7bff882b1e1a7790e367fd759576f9d78e64e4848ee821f69251c6
6
+ metadata.gz: e8a733f1ba635667d621ae7f02990c0ac4aeac8554b554ed9474c0b28b0e265c2a5e1071be43d6cc968911da58887a78dcedbe6fbae18d79be0fddc9093e1c4c
7
+ data.tar.gz: 4ac723e0a0508a9f6235e57c702c453dfa01a7941a1a27fe072f4a411bd186cfc76de15150f8a4a4cf80779885e7623012f2d9c3ba6fa30e48bedff262f94bbf
data/.circleci/config.yml CHANGED
@@ -7,7 +7,7 @@ jobs:
7
7
  build:
8
8
  docker:
9
9
  # specify the version you desire here
10
- - image: circleci/ruby:2.4.1-node-browsers
10
+ - image: circleci/ruby:2.6.6-buster
11
11
 
12
12
  # Specify service dependencies here if necessary
13
13
  # CircleCI maintains a library of pre-built images
@@ -29,6 +29,7 @@ jobs:
29
29
  - run:
30
30
  name: install dependencies
31
31
  command: |
32
+ gem install bundler
32
33
  bundle install --jobs=4 --retry=3 --path vendor/bundle
33
34
 
34
35
  - save_cache:
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  # Dependencies required to run this gem.
4
- gem "nokogiri", ">= 1.4.4"
4
+ gem "nokogiri", ">= 1.10.8"
5
5
  gem "rubyzip", ">= 1.3.0" , :require => 'zip'
6
6
 
7
7
  # Development dependencies.
data/Gemfile.lock CHANGED
@@ -5,11 +5,12 @@ GEM
5
5
  builder (3.2.4)
6
6
  descendants_tracker (0.0.4)
7
7
  thread_safe (~> 0.3, >= 0.3.1)
8
- diff-lcs (1.3)
9
- docile (1.3.2)
8
+ diff-lcs (1.4.4)
9
+ docile (1.3.5)
10
10
  faraday (0.9.2)
11
11
  multipart-post (>= 1.2, < 3)
12
- git (1.5.0)
12
+ git (1.8.1)
13
+ rchardet (~> 1.8)
13
14
  github_api (0.16.0)
14
15
  addressable (~> 2.4.0)
15
16
  descendants_tracker (~> 0.0.4)
@@ -17,7 +18,7 @@ GEM
17
18
  hashie (>= 3.4)
18
19
  mime-types (>= 1.16, < 3.0)
19
20
  oauth2 (~> 1.0)
20
- hashie (4.0.0)
21
+ hashie (4.1.0)
21
22
  highline (2.0.3)
22
23
  jeweler (2.3.9)
23
24
  builder
@@ -30,48 +31,51 @@ GEM
30
31
  rake
31
32
  rdoc
32
33
  semver2
33
- json (2.3.0)
34
- jwt (2.2.1)
34
+ jwt (2.2.2)
35
35
  mime-types (2.99.3)
36
- mini_portile2 (2.4.0)
37
- multi_json (1.14.1)
36
+ mini_portile2 (2.5.0)
37
+ multi_json (1.15.0)
38
38
  multi_xml (0.6.0)
39
39
  multipart-post (2.1.1)
40
- nokogiri (1.10.7)
41
- mini_portile2 (~> 2.4.0)
42
- oauth2 (1.4.2)
40
+ nokogiri (1.11.1)
41
+ mini_portile2 (~> 2.5.0)
42
+ racc (~> 1.4)
43
+ oauth2 (1.4.4)
43
44
  faraday (>= 0.8, < 2.0)
44
45
  jwt (>= 1.0, < 3.0)
45
46
  multi_json (~> 1.3)
46
47
  multi_xml (~> 0.5)
47
48
  rack (>= 1.2, < 3)
48
- psych (3.1.0)
49
- rack (2.0.8)
50
- rake (13.0.1)
51
- rdoc (6.2.0)
52
- rspec (3.9.0)
53
- rspec-core (~> 3.9.0)
54
- rspec-expectations (~> 3.9.0)
55
- rspec-mocks (~> 3.9.0)
56
- rspec-core (3.9.0)
57
- rspec-support (~> 3.9.0)
58
- rspec-expectations (3.9.0)
49
+ psych (3.3.0)
50
+ racc (1.5.2)
51
+ rack (2.2.3)
52
+ rake (13.0.3)
53
+ rchardet (1.8.0)
54
+ rdoc (6.3.0)
55
+ rspec (3.10.0)
56
+ rspec-core (~> 3.10.0)
57
+ rspec-expectations (~> 3.10.0)
58
+ rspec-mocks (~> 3.10.0)
59
+ rspec-core (3.10.1)
60
+ rspec-support (~> 3.10.0)
61
+ rspec-expectations (3.10.1)
59
62
  diff-lcs (>= 1.2.0, < 2.0)
60
- rspec-support (~> 3.9.0)
61
- rspec-mocks (3.9.0)
63
+ rspec-support (~> 3.10.0)
64
+ rspec-mocks (3.10.2)
62
65
  diff-lcs (>= 1.2.0, < 2.0)
63
- rspec-support (~> 3.9.0)
64
- rspec-support (3.9.0)
66
+ rspec-support (~> 3.10.0)
67
+ rspec-support (3.10.2)
65
68
  rspec_junit_formatter (0.4.1)
66
69
  rspec-core (>= 2, < 4, != 2.12.0)
67
- ruby-prof (1.1.0)
68
- rubyzip (2.0.0)
70
+ ruby-prof (1.4.2)
71
+ rubyzip (2.3.0)
69
72
  semver2 (3.4.2)
70
- simplecov (0.17.1)
73
+ simplecov (0.21.2)
71
74
  docile (~> 1.1)
72
- json (>= 1.8, < 3)
73
- simplecov-html (~> 0.10.0)
74
- simplecov-html (0.10.2)
75
+ simplecov-html (~> 0.11)
76
+ simplecov_json_formatter (~> 0.1)
77
+ simplecov-html (0.12.3)
78
+ simplecov_json_formatter (0.1.2)
75
79
  thread_safe (0.3.6)
76
80
 
77
81
  PLATFORMS
@@ -80,7 +84,7 @@ PLATFORMS
80
84
  DEPENDENCIES
81
85
  bundler
82
86
  jeweler
83
- nokogiri (>= 1.4.4)
87
+ nokogiri (>= 1.10.8)
84
88
  rake
85
89
  rspec
86
90
  rspec_junit_formatter
@@ -89,4 +93,4 @@ DEPENDENCIES
89
93
  simplecov
90
94
 
91
95
  BUNDLED WITH
92
- 1.17.3
96
+ 2.1.4
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Vivek Bhagwat, 2013-2014 Wesha
1
+ Copyright (c) 2011 Vivek Bhagwat, 2013-2020 Wesha
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -229,6 +229,11 @@ It can also operate on +StringIO+ objects, thus eliminating the need to save the
229
229
 
230
230
  RubyXL.class_variable_set(:@@suppress_warnings, true)
231
231
 
232
+ == Data validation ("dropdown list")
233
+
234
+ worksheet.add_validation_list("A1", [ "value1", "value2" ])
235
+
236
+
232
237
  == For more information
233
238
  Take a look at the files in spec/lib/ for rspecs on most methods
234
239
 
@@ -244,5 +249,5 @@ Take a look at the files in spec/lib/ for rspecs on most methods
244
249
 
245
250
  == Copyright
246
251
 
247
- Copyright (c) 2011 Vivek Bhagwat, 2013-2016 Wesha.
252
+ Copyright (c) 2011 Vivek Bhagwat, 2013-2020 Wesha.
248
253
  See LICENSE.txt for further details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.4.11
1
+ 3.4.17
@@ -253,7 +253,7 @@ module RubyXL
253
253
  def add_hyperlink(l)
254
254
  worksheet.hyperlinks ||= RubyXL::Hyperlinks.new
255
255
  worksheet.hyperlinks << RubyXL::Hyperlink.new(:ref => self.r, :location => l)
256
- # define_attribute(:'r:id', :string)
256
+ # define_relationship
257
257
  # define_attribute(:location, :string)
258
258
  # define_attribute(:tooltip, :string)
259
259
  # define_attribute(:display, :string)
@@ -72,9 +72,11 @@ module RubyXL
72
72
  end
73
73
 
74
74
  def to_s
75
- str = r.to_s(16) + g.to_s(16) + b.to_s(16)
76
- str += a.to_s(16) if a && a != 0
77
- str
75
+ if a && a != 0 then
76
+ "%02x%02x%02x%02x" % [ r, g, b, a ]
77
+ else
78
+ "%02x%02x%02x" % [ r, g, b ]
79
+ end
78
80
  end
79
81
 
80
82
  end
@@ -106,6 +106,20 @@ module RubyXL
106
106
  }
107
107
  }
108
108
 
109
+ # Update merged cells for all rows below
110
+ self.merged_cells ||= RubyXL::MergedCells.new
111
+ merged_cells.each { |mc|
112
+ next if mc.ref.row_range.last < row_index
113
+
114
+ in_merged_cell = mc.ref.row_range.first < row_index
115
+ mc.ref = RubyXL::Reference.new(
116
+ mc.ref.row_range.first + (in_merged_cell ? 0 : 1),
117
+ mc.ref.row_range.last + 1,
118
+ mc.ref.col_range.first,
119
+ mc.ref.col_range.last,
120
+ )
121
+ }
122
+
109
123
  return new_row
110
124
  end
111
125
 
@@ -121,6 +135,22 @@ module RubyXL
121
135
  row && row.cells.each{ |c| c.row -= 1 unless c.nil? }
122
136
  }
123
137
 
138
+ # Update row number of merged cells
139
+ self.merged_cells ||= RubyXL::MergedCells.new
140
+ merged_cells.delete_if { |mc| mc.ref.row_range == (row_index..row_index) }
141
+ merged_cells.each { |mc|
142
+ next if mc.ref.row_range.last < row_index
143
+
144
+ in_merged_cell = mc.ref.row_range.first <= row_index
145
+ mc.ref = RubyXL::Reference.new(
146
+ mc.ref.row_range.first - (in_merged_cell ? 0 : 1),
147
+ mc.ref.row_range.last - 1,
148
+ mc.ref.col_range.first,
149
+ mc.ref.col_range.last,
150
+ )
151
+ }
152
+ merged_cells.delete_if { |mc| mc.ref.single_cell? }
153
+
124
154
  return deleted
125
155
  end
126
156
 
@@ -152,6 +182,20 @@ module RubyXL
152
182
 
153
183
  cols.insert_column(column_index)
154
184
 
185
+ # Update merged cells for all rows below
186
+ self.merged_cells ||= RubyXL::MergedCells.new
187
+ merged_cells.each { |mc|
188
+ next if mc.ref.col_range.last < column_index
189
+
190
+ in_merged_cell = mc.ref.row_range.first < column_index
191
+ mc.ref = RubyXL::Reference.new(
192
+ mc.ref.row_range.first,
193
+ mc.ref.row_range.last,
194
+ mc.ref.col_range.first + (in_merged_cell ? 0 : 1),
195
+ mc.ref.col_range.last + 1,
196
+ )
197
+ }
198
+
155
199
  # TODO: update column numbers
156
200
  end
157
201
 
@@ -171,6 +215,22 @@ module RubyXL
171
215
  }
172
216
 
173
217
  cols.each { |range| range.delete_column(column_index) }
218
+
219
+ # Update row number of merged cells
220
+ self.merged_cells ||= RubyXL::MergedCells.new
221
+ merged_cells.delete_if { |mc| mc.ref.col_range == (column_index..column_index) }
222
+ merged_cells.each { |mc|
223
+ next if mc.ref.col_range.last < column_index
224
+
225
+ in_merged_cell = mc.ref.col_range.first <= column_index
226
+ mc.ref = RubyXL::Reference.new(
227
+ mc.ref.row_range.first,
228
+ mc.ref.row_range.last,
229
+ mc.ref.col_range.first - (in_merged_cell ? 0 : 1),
230
+ mc.ref.col_range.last - 1,
231
+ )
232
+ }
233
+ merged_cells.delete_if { |mc| mc.ref.single_cell? }
174
234
  end
175
235
 
176
236
  def get_row_style(row_index)
@@ -632,6 +692,18 @@ module RubyXL
632
692
  # TODO: add validation to make sure ranges are not intersecting with existing ones
633
693
  merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(start_row, end_row, start_col, end_col))
634
694
  end
695
+
696
+ def add_validation_list(ref, list_arr)
697
+ # "Any double quote characters in the value should be escaped with another double quote.
698
+ # If the value does not contain a comma, newline or double quote, then the String value should be returned unchanged.
699
+ # If the value contains a comma, newline or double quote, then the String value should be returned enclosed in double quotes."
700
+ expr = '"' + list_arr.collect{|str| str.gsub('"', '""')}.join(',') + '"'
701
+ self.data_validations ||= RubyXL::DataValidations.new
702
+ self.data_validations <<
703
+ RubyXL::DataValidation.new({:sqref => RubyXL::Reference.new(ref),
704
+ :formula1 => RubyXL::Formula.new(:expression => expr),
705
+ :type => 'list'})
706
+ end
635
707
  end
636
708
 
637
709
  RubyXL::Worksheet.send(:include, RubyXL::WorksheetConvenienceMethods) # ruby 2.1 compat
@@ -34,7 +34,7 @@ module RubyXL
34
34
  define_attribute(:horizontalDpi, :int, :default => 600)
35
35
  define_attribute(:verticalDpi, :int, :default => 600)
36
36
  define_attribute(:copies, :int, :default => 1)
37
- define_attribute(:'r:id', :string)
37
+ define_relationship
38
38
  define_element_name 'pageSetup'
39
39
  end
40
40
 
@@ -11,6 +11,8 @@ module RubyXL
11
11
  define_attribute(:imeMode, RubyXL::ST_DataValidationImeMode, :default => 'noControl')
12
12
  define_attribute(:operator, RubyXL::ST_DataValidationOperator, :default => 'between')
13
13
  define_attribute(:allowBlank, :bool, :default => false)
14
+ # Documentation lies. This property should have been called "HIDE dropdown",
15
+ # since that's what happens when it is set to true.
14
16
  define_attribute(:showDropDown, :bool, :default => false)
15
17
  define_attribute(:showInputMessage, :bool, :default => false)
16
18
  define_attribute(:showErrorMessage, :bool, :default => false)
@@ -127,7 +127,7 @@ module RubyXL
127
127
  end
128
128
 
129
129
  def creator=(v)
130
- self.dc_creator = v && RubyXL::StringNodeW3C.new(:value => v)
130
+ self.dc_creator = v && RubyXL::StringNode.new(:value => v)
131
131
  end
132
132
 
133
133
  def modifier
@@ -135,7 +135,7 @@ module RubyXL
135
135
  end
136
136
 
137
137
  def modifier=(v)
138
- self.cp_last_modified_by = v && RubyXL::StringNodeW3C.new(:value => v)
138
+ self.cp_last_modified_by = v && RubyXL::StringNode.new(:value => v)
139
139
  end
140
140
 
141
141
  def created_at
@@ -61,16 +61,40 @@ module RubyXL
61
61
  define_child_node(RubyXL::SheetNames)
62
62
  define_child_node(RubyXL::DefinedNamesExt)
63
63
  define_child_node(RubyXL::SheetDataSet)
64
- define_attribute(:'r:id', :string, :required => true)
64
+ define_relationship(:required => true)
65
65
  define_element_name 'externalBook'
66
66
  end
67
67
 
68
+ # http://www.datypic.com/sc/ooxml/e-ssml_oleItem-1.html
69
+ class OleItem < OOXMLObject
70
+ define_attribute(:name, :string, :required => true)
71
+ define_attribute(:icon, :bool)
72
+ define_attribute(:advise, :bool)
73
+ define_attribute(:preferPic, :bool)
74
+ define_element_name 'oleItem'
75
+ end
76
+
77
+ # http://www.datypic.com/sc/ooxml/e-ssml_oleItems-1.html
78
+ class OleItems < OOXMLContainerObject
79
+ define_child_node(RubyXL::OleItem)
80
+ define_element_name 'oleItems'
81
+ end
82
+
83
+ # http://www.datypic.com/sc/ooxml/t-ssml_CT_OleLink.html
84
+ class OleLink < OOXMLObject
85
+ define_child_node(RubyXL::OleItems, :collection => true)
86
+ define_relationship(:required => true)
87
+ define_attribute(:progId, :string, :required => true)
88
+ define_element_name 'oleLink'
89
+ end
90
+
68
91
  class ExternalLinksFile < OOXMLTopLevelObject
69
92
  CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml'
70
93
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink'
71
94
 
72
95
  include RubyXL::RelationshipSupport
73
96
  define_child_node(RubyXL::ExternalBook)
97
+ define_child_node(RubyXL::OleLink)
74
98
 
75
99
  define_element_name 'externalLink'
76
100
  set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
@@ -53,6 +53,11 @@ module RubyXL
53
53
  self.send(:attr_accessor, attr_hash[:accessor]) unless attr_hash[:computed]
54
54
  end
55
55
 
56
+ # Defines a `r:id` attribute
57
+ def define_relationship(extra_params = {})
58
+ define_attribute(:'r:id', :string, extra_params)
59
+ end
60
+
56
61
  # Defines a child node of OOXML object.
57
62
  # === Parameters
58
63
  # * +klass+ - Class (descendant of RubyXL::OOXMLObject) of the child nodes. Child node objects will be produced by calling +parse+ method of that class.
@@ -272,6 +277,11 @@ module RubyXL
272
277
  if xml.nil? then
273
278
  seed_xml = Nokogiri::XML('<?xml version = "1.0" standalone ="yes"?>')
274
279
  seed_xml.encoding = 'UTF-8'
280
+
281
+ if Nokogiri.jruby? then # Issue 188 workaround for JRuby
282
+ seed_xml.to_java.strict_error_checking = false
283
+ end
284
+
275
285
  result = self.write_xml(seed_xml)
276
286
  return result if result == ''
277
287
  seed_xml << result
@@ -4,7 +4,7 @@ require 'rubyXL/objects/ooxml_object'
4
4
  module RubyXL
5
5
 
6
6
  class RID < OOXMLObject
7
- define_attribute(:'r:id', :string, :required => true)
7
+ define_relationship(:required => true)
8
8
  end
9
9
 
10
10
  class Relationship < OOXMLObject
@@ -113,7 +113,8 @@ module RubyXL
113
113
  when RubyXL::DataType::INLINE_STRING then is.to_s
114
114
  when RubyXL::DataType::RAW_STRING then raw_value
115
115
  else
116
- if is_date? then workbook.num_to_date(r.to_f)
116
+ if is then is.to_s
117
+ elsif is_date? then workbook.num_to_date(r.to_f)
117
118
  elsif r.is_a?(String) && (r =~ NUMBER_REGEXP) then # Numeric
118
119
  if $1 != '' then r.to_f
119
120
  else r.to_i