rubyXL-ptr 3.3.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (457) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +17 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.rdoc +229 -0
  5. data/Rakefile +103 -0
  6. data/VERSION +1 -0
  7. data/lib/rubyXL.rb +12 -0
  8. data/lib/rubyXL/cell.rb +54 -0
  9. data/lib/rubyXL/convenience_methods.rb +1122 -0
  10. data/lib/rubyXL/objects/border.rb +74 -0
  11. data/lib/rubyXL/objects/calculation_chain.rb +31 -0
  12. data/lib/rubyXL/objects/cell_style.rb +65 -0
  13. data/lib/rubyXL/objects/chartsheet.rb +92 -0
  14. data/lib/rubyXL/objects/color.rb +27 -0
  15. data/lib/rubyXL/objects/column_range.rb +92 -0
  16. data/lib/rubyXL/objects/comments.rb +47 -0
  17. data/lib/rubyXL/objects/container_nodes.rb +135 -0
  18. data/lib/rubyXL/objects/content_types.rb +77 -0
  19. data/lib/rubyXL/objects/data_validation.rb +37 -0
  20. data/lib/rubyXL/objects/document_properties.rb +159 -0
  21. data/lib/rubyXL/objects/extensions.rb +40 -0
  22. data/lib/rubyXL/objects/external_links.rb +85 -0
  23. data/lib/rubyXL/objects/fill.rb +55 -0
  24. data/lib/rubyXL/objects/filters.rb +120 -0
  25. data/lib/rubyXL/objects/font.rb +48 -0
  26. data/lib/rubyXL/objects/formula.rb +24 -0
  27. data/lib/rubyXL/objects/ooxml_object.rb +460 -0
  28. data/lib/rubyXL/objects/reference.rb +110 -0
  29. data/lib/rubyXL/objects/relationships.rb +213 -0
  30. data/lib/rubyXL/objects/root.rb +86 -0
  31. data/lib/rubyXL/objects/shared_strings.rb +70 -0
  32. data/lib/rubyXL/objects/sheet_common.rb +51 -0
  33. data/lib/rubyXL/objects/sheet_data.rb +188 -0
  34. data/lib/rubyXL/objects/simple_types.rb +232 -0
  35. data/lib/rubyXL/objects/storage.rb +182 -0
  36. data/lib/rubyXL/objects/stylesheet.rb +232 -0
  37. data/lib/rubyXL/objects/text.rb +94 -0
  38. data/lib/rubyXL/objects/theme.rb +1716 -0
  39. data/lib/rubyXL/objects/workbook.rb +464 -0
  40. data/lib/rubyXL/objects/worksheet.rb +748 -0
  41. data/lib/rubyXL/parser.rb +29 -0
  42. data/lib/rubyXL/worksheet.rb +105 -0
  43. data/rdoc/README_rdoc.html +475 -0
  44. data/rdoc/RubyXL.html +598 -0
  45. data/rdoc/RubyXL/AExtension.html +223 -0
  46. data/rdoc/RubyXL/AExtensionStorageArea.html +103 -0
  47. data/rdoc/RubyXL/ActiveX.html +182 -0
  48. data/rdoc/RubyXL/ActiveXBinary.html +117 -0
  49. data/rdoc/RubyXL/AdjustHandleList.html +106 -0
  50. data/rdoc/RubyXL/Alignment.html +106 -0
  51. data/rdoc/RubyXL/AlternateContent.html +103 -0
  52. data/rdoc/RubyXL/Authors.html +106 -0
  53. data/rdoc/RubyXL/AutoFilter.html +106 -0
  54. data/rdoc/RubyXL/AutoFilterColumn.html +106 -0
  55. data/rdoc/RubyXL/BinaryImageFile.html +122 -0
  56. data/rdoc/RubyXL/BodyProperties.html +106 -0
  57. data/rdoc/RubyXL/BooleanNode.html +103 -0
  58. data/rdoc/RubyXL/BooleanValue.html +103 -0
  59. data/rdoc/RubyXL/Border.html +275 -0
  60. data/rdoc/RubyXL/BorderEdge.html +189 -0
  61. data/rdoc/RubyXL/Borders.html +157 -0
  62. data/rdoc/RubyXL/Break.html +106 -0
  63. data/rdoc/RubyXL/BreakList.html +106 -0
  64. data/rdoc/RubyXL/CT_AdjPoint2D.html +106 -0
  65. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +106 -0
  66. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +106 -0
  67. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +106 -0
  68. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +106 -0
  69. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +106 -0
  70. data/rdoc/RubyXL/CT_Backdrop.html +106 -0
  71. data/rdoc/RubyXL/CT_Bevel.html +106 -0
  72. data/rdoc/RubyXL/CT_BiLevelEffect.html +106 -0
  73. data/rdoc/RubyXL/CT_BlendEffect.html +106 -0
  74. data/rdoc/RubyXL/CT_Blip.html +106 -0
  75. data/rdoc/RubyXL/CT_BlipFillProperties.html +106 -0
  76. data/rdoc/RubyXL/CT_BlurEffect.html +106 -0
  77. data/rdoc/RubyXL/CT_Camera.html +106 -0
  78. data/rdoc/RubyXL/CT_Color.html +106 -0
  79. data/rdoc/RubyXL/CT_ColorChangeEffect.html +106 -0
  80. data/rdoc/RubyXL/CT_ColorMapping.html +106 -0
  81. data/rdoc/RubyXL/CT_ColorScheme.html +106 -0
  82. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +106 -0
  83. data/rdoc/RubyXL/CT_ConnectionSite.html +106 -0
  84. data/rdoc/RubyXL/CT_ConnectionSiteList.html +106 -0
  85. data/rdoc/RubyXL/CT_DashStop.html +106 -0
  86. data/rdoc/RubyXL/CT_DashStopList.html +106 -0
  87. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +106 -0
  88. data/rdoc/RubyXL/CT_DuotoneEffect.html +106 -0
  89. data/rdoc/RubyXL/CT_EffectContainer.html +106 -0
  90. data/rdoc/RubyXL/CT_EffectList.html +106 -0
  91. data/rdoc/RubyXL/CT_EffectReference.html +106 -0
  92. data/rdoc/RubyXL/CT_EffectStyleItem.html +106 -0
  93. data/rdoc/RubyXL/CT_EffectStyleList.html +106 -0
  94. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +106 -0
  95. data/rdoc/RubyXL/CT_FillEffect.html +106 -0
  96. data/rdoc/RubyXL/CT_FillOverlayEffect.html +106 -0
  97. data/rdoc/RubyXL/CT_FillStyleList.html +106 -0
  98. data/rdoc/RubyXL/CT_FlatText.html +106 -0
  99. data/rdoc/RubyXL/CT_FontCollection.html +106 -0
  100. data/rdoc/RubyXL/CT_FontReference.html +106 -0
  101. data/rdoc/RubyXL/CT_GeomGuideList.html +106 -0
  102. data/rdoc/RubyXL/CT_GlowEffect.html +106 -0
  103. data/rdoc/RubyXL/CT_GradientFillProperties.html +106 -0
  104. data/rdoc/RubyXL/CT_GradientStop.html +106 -0
  105. data/rdoc/RubyXL/CT_GradientStopList.html +106 -0
  106. data/rdoc/RubyXL/CT_HSLEffect.html +106 -0
  107. data/rdoc/RubyXL/CT_HslColor.html +106 -0
  108. data/rdoc/RubyXL/CT_Hyperlink.html +106 -0
  109. data/rdoc/RubyXL/CT_InnerShadowEffect.html +106 -0
  110. data/rdoc/RubyXL/CT_LightRig.html +106 -0
  111. data/rdoc/RubyXL/CT_LineEndProperties.html +106 -0
  112. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +106 -0
  113. data/rdoc/RubyXL/CT_LineProperties.html +106 -0
  114. data/rdoc/RubyXL/CT_LineStyleList.html +106 -0
  115. data/rdoc/RubyXL/CT_LinearShadeProperties.html +106 -0
  116. data/rdoc/RubyXL/CT_LuminanceEffect.html +106 -0
  117. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +106 -0
  118. data/rdoc/RubyXL/CT_OuterShadowEffect.html +106 -0
  119. data/rdoc/RubyXL/CT_Path2D.html +106 -0
  120. data/rdoc/RubyXL/CT_Path2DArcTo.html +106 -0
  121. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +106 -0
  122. data/rdoc/RubyXL/CT_Path2DList.html +106 -0
  123. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +106 -0
  124. data/rdoc/RubyXL/CT_Path2DTo.html +106 -0
  125. data/rdoc/RubyXL/CT_PathShadeProperties.html +106 -0
  126. data/rdoc/RubyXL/CT_PatternFillProperties.html +106 -0
  127. data/rdoc/RubyXL/CT_Point3D.html +106 -0
  128. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +106 -0
  129. data/rdoc/RubyXL/CT_PresetColor.html +106 -0
  130. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +106 -0
  131. data/rdoc/RubyXL/CT_PresetShadowEffect.html +106 -0
  132. data/rdoc/RubyXL/CT_PresetTextShape.html +106 -0
  133. data/rdoc/RubyXL/CT_ReflectionEffect.html +106 -0
  134. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +106 -0
  135. data/rdoc/RubyXL/CT_RelativeRect.html +106 -0
  136. data/rdoc/RubyXL/CT_SRgbColor.html +106 -0
  137. data/rdoc/RubyXL/CT_ScRgbColor.html +106 -0
  138. data/rdoc/RubyXL/CT_Scene3D.html +106 -0
  139. data/rdoc/RubyXL/CT_SchemeColor.html +106 -0
  140. data/rdoc/RubyXL/CT_Shape3D.html +106 -0
  141. data/rdoc/RubyXL/CT_ShapeStyle.html +106 -0
  142. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +106 -0
  143. data/rdoc/RubyXL/CT_SphereCoords.html +106 -0
  144. data/rdoc/RubyXL/CT_StretchInfoProperties.html +106 -0
  145. data/rdoc/RubyXL/CT_StyleMatrix.html +106 -0
  146. data/rdoc/RubyXL/CT_StyleMatrixReference.html +106 -0
  147. data/rdoc/RubyXL/CT_SupplementalFont.html +106 -0
  148. data/rdoc/RubyXL/CT_SystemColor.html +106 -0
  149. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +106 -0
  150. data/rdoc/RubyXL/CT_TextBlipBullet.html +106 -0
  151. data/rdoc/RubyXL/CT_TextCharBullet.html +106 -0
  152. data/rdoc/RubyXL/CT_TextCharacterProperties.html +106 -0
  153. data/rdoc/RubyXL/CT_TextFont.html +106 -0
  154. data/rdoc/RubyXL/CT_TextListStyle.html +106 -0
  155. data/rdoc/RubyXL/CT_TextNormalAutofit.html +106 -0
  156. data/rdoc/RubyXL/CT_TextParagraphProperties.html +106 -0
  157. data/rdoc/RubyXL/CT_TextSpacing.html +106 -0
  158. data/rdoc/RubyXL/CT_TextTabStop.html +106 -0
  159. data/rdoc/RubyXL/CT_TextTabStopList.html +106 -0
  160. data/rdoc/RubyXL/CT_TileInfoProperties.html +106 -0
  161. data/rdoc/RubyXL/CT_TintEffect.html +106 -0
  162. data/rdoc/RubyXL/CT_Transform2D.html +106 -0
  163. data/rdoc/RubyXL/CT_TransformEffect.html +106 -0
  164. data/rdoc/RubyXL/CT_Vector3D.html +106 -0
  165. data/rdoc/RubyXL/CT_XYAdjustHandle.html +106 -0
  166. data/rdoc/RubyXL/CalculationChain.html +176 -0
  167. data/rdoc/RubyXL/CalculationChainCell.html +106 -0
  168. data/rdoc/RubyXL/CalculationProperties.html +106 -0
  169. data/rdoc/RubyXL/Cell.html +558 -0
  170. data/rdoc/RubyXL/CellConvenienceMethods.html +1211 -0
  171. data/rdoc/RubyXL/CellExt.html +106 -0
  172. data/rdoc/RubyXL/CellSmartTag.html +106 -0
  173. data/rdoc/RubyXL/CellSmartTagProperty.html +106 -0
  174. data/rdoc/RubyXL/CellSmartTags.html +106 -0
  175. data/rdoc/RubyXL/CellStyle.html +106 -0
  176. data/rdoc/RubyXL/CellStyleXFs.html +157 -0
  177. data/rdoc/RubyXL/CellStyles.html +157 -0
  178. data/rdoc/RubyXL/CellValue.html +158 -0
  179. data/rdoc/RubyXL/CellWatch.html +106 -0
  180. data/rdoc/RubyXL/CellWatches.html +106 -0
  181. data/rdoc/RubyXL/CellXFs.html +161 -0
  182. data/rdoc/RubyXL/ChartColorsFile.html +122 -0
  183. data/rdoc/RubyXL/ChartFile.html +189 -0
  184. data/rdoc/RubyXL/ChartStyleFile.html +122 -0
  185. data/rdoc/RubyXL/ChartUserShapesFile.html +122 -0
  186. data/rdoc/RubyXL/Chartsheet.html +260 -0
  187. data/rdoc/RubyXL/ChartsheetPageSetup.html +106 -0
  188. data/rdoc/RubyXL/ChartsheetProperties.html +106 -0
  189. data/rdoc/RubyXL/ChartsheetProtection.html +106 -0
  190. data/rdoc/RubyXL/ChartsheetView.html +106 -0
  191. data/rdoc/RubyXL/ChartsheetViews.html +106 -0
  192. data/rdoc/RubyXL/Color.html +175 -0
  193. data/rdoc/RubyXL/ColorFilter.html +106 -0
  194. data/rdoc/RubyXL/ColorScale.html +106 -0
  195. data/rdoc/RubyXL/ColorSet.html +106 -0
  196. data/rdoc/RubyXL/Colors.html +106 -0
  197. data/rdoc/RubyXL/ColumnRange.html +245 -0
  198. data/rdoc/RubyXL/ColumnRanges.html +289 -0
  199. data/rdoc/RubyXL/Comment.html +106 -0
  200. data/rdoc/RubyXL/CommentList.html +106 -0
  201. data/rdoc/RubyXL/CommentsFile.html +197 -0
  202. data/rdoc/RubyXL/ConditionalFormatValue.html +106 -0
  203. data/rdoc/RubyXL/ConditionalFormatting.html +106 -0
  204. data/rdoc/RubyXL/ConditionalFormattingRule.html +106 -0
  205. data/rdoc/RubyXL/ContentTypeDefault.html +103 -0
  206. data/rdoc/RubyXL/ContentTypeOverride.html +103 -0
  207. data/rdoc/RubyXL/ContentTypes.html +248 -0
  208. data/rdoc/RubyXL/ControlPropertiesFile.html +117 -0
  209. data/rdoc/RubyXL/CorePropertiesFile.html +474 -0
  210. data/rdoc/RubyXL/CustomColor.html +106 -0
  211. data/rdoc/RubyXL/CustomColorList.html +106 -0
  212. data/rdoc/RubyXL/CustomFilter.html +106 -0
  213. data/rdoc/RubyXL/CustomFilters.html +106 -0
  214. data/rdoc/RubyXL/CustomGeometry.html +106 -0
  215. data/rdoc/RubyXL/CustomProperties.html +106 -0
  216. data/rdoc/RubyXL/CustomPropertiesFile.html +122 -0
  217. data/rdoc/RubyXL/CustomProperty.html +106 -0
  218. data/rdoc/RubyXL/CustomSheetView.html +106 -0
  219. data/rdoc/RubyXL/CustomSheetViews.html +106 -0
  220. data/rdoc/RubyXL/CustomWorkbookView.html +106 -0
  221. data/rdoc/RubyXL/CustomWorkbookViews.html +106 -0
  222. data/rdoc/RubyXL/CustomXMLFile.html +117 -0
  223. data/rdoc/RubyXL/DXF.html +106 -0
  224. data/rdoc/RubyXL/DXFs.html +106 -0
  225. data/rdoc/RubyXL/DataBar.html +106 -0
  226. data/rdoc/RubyXL/DataConsolidate.html +106 -0
  227. data/rdoc/RubyXL/DataConsolidationReference.html +106 -0
  228. data/rdoc/RubyXL/DataConsolidationReferences.html +106 -0
  229. data/rdoc/RubyXL/DataType.html +143 -0
  230. data/rdoc/RubyXL/DataValidation.html +106 -0
  231. data/rdoc/RubyXL/DataValidations.html +106 -0
  232. data/rdoc/RubyXL/DateGroupItem.html +106 -0
  233. data/rdoc/RubyXL/DefinedName.html +106 -0
  234. data/rdoc/RubyXL/DefinedNameExt.html +106 -0
  235. data/rdoc/RubyXL/DefinedNames.html +106 -0
  236. data/rdoc/RubyXL/DefinedNamesExt.html +106 -0
  237. data/rdoc/RubyXL/DocumentPropertiesFile.html +255 -0
  238. data/rdoc/RubyXL/DrawingFile.html +188 -0
  239. data/rdoc/RubyXL/DynamicFilter.html +106 -0
  240. data/rdoc/RubyXL/EmbeddedControl.html +106 -0
  241. data/rdoc/RubyXL/EmbeddedControls.html +106 -0
  242. data/rdoc/RubyXL/Extension.html +106 -0
  243. data/rdoc/RubyXL/ExtensionStorageArea.html +106 -0
  244. data/rdoc/RubyXL/Extents.html +106 -0
  245. data/rdoc/RubyXL/ExternalBook.html +106 -0
  246. data/rdoc/RubyXL/ExternalLinksFile.html +184 -0
  247. data/rdoc/RubyXL/ExternalReference.html +106 -0
  248. data/rdoc/RubyXL/ExternalReferences.html +106 -0
  249. data/rdoc/RubyXL/ExtraColorSchemeList.html +106 -0
  250. data/rdoc/RubyXL/FieldItem.html +106 -0
  251. data/rdoc/RubyXL/FileRecoveryProperties.html +106 -0
  252. data/rdoc/RubyXL/FileSharing.html +106 -0
  253. data/rdoc/RubyXL/FileVersion.html +106 -0
  254. data/rdoc/RubyXL/Fill.html +157 -0
  255. data/rdoc/RubyXL/Fills.html +157 -0
  256. data/rdoc/RubyXL/FilterContainer.html +106 -0
  257. data/rdoc/RubyXL/FloatNode.html +103 -0
  258. data/rdoc/RubyXL/FloatValue.html +103 -0
  259. data/rdoc/RubyXL/Font.html +184 -0
  260. data/rdoc/RubyXL/FontConvenienceMethods.html +603 -0
  261. data/rdoc/RubyXL/FontScheme.html +106 -0
  262. data/rdoc/RubyXL/Fonts.html +157 -0
  263. data/rdoc/RubyXL/Formula.html +106 -0
  264. data/rdoc/RubyXL/FunctionGroup.html +106 -0
  265. data/rdoc/RubyXL/FunctionGroups.html +106 -0
  266. data/rdoc/RubyXL/GenericStorageObject.html +298 -0
  267. data/rdoc/RubyXL/GradientFill.html +106 -0
  268. data/rdoc/RubyXL/HeaderFooterSettings.html +106 -0
  269. data/rdoc/RubyXL/Hyperlink.html +106 -0
  270. data/rdoc/RubyXL/HyperlinkRelFile.html +117 -0
  271. data/rdoc/RubyXL/Hyperlinks.html +106 -0
  272. data/rdoc/RubyXL/IconFilter.html +106 -0
  273. data/rdoc/RubyXL/IconSet.html +106 -0
  274. data/rdoc/RubyXL/IgnoredError.html +106 -0
  275. data/rdoc/RubyXL/IgnoredErrors.html +106 -0
  276. data/rdoc/RubyXL/IndexedColors.html +106 -0
  277. data/rdoc/RubyXL/InputCells.html +106 -0
  278. data/rdoc/RubyXL/IntegerNode.html +103 -0
  279. data/rdoc/RubyXL/IntegerValue.html +103 -0
  280. data/rdoc/RubyXL/LegacyCell.html +181 -0
  281. data/rdoc/RubyXL/LegacyWorksheet.html +355 -0
  282. data/rdoc/RubyXL/MRUColors.html +106 -0
  283. data/rdoc/RubyXL/MacrosFile.html +122 -0
  284. data/rdoc/RubyXL/MergedCell.html +106 -0
  285. data/rdoc/RubyXL/MergedCells.html +106 -0
  286. data/rdoc/RubyXL/NumFmt.html +106 -0
  287. data/rdoc/RubyXL/NumberFormat.html +158 -0
  288. data/rdoc/RubyXL/NumberFormats.html +172 -0
  289. data/rdoc/RubyXL/OLEObject.html +106 -0
  290. data/rdoc/RubyXL/OLEObjectFile.html +122 -0
  291. data/rdoc/RubyXL/OLEObjects.html +106 -0
  292. data/rdoc/RubyXL/OLESize.html +106 -0
  293. data/rdoc/RubyXL/OOXMLContainerObject.html +394 -0
  294. data/rdoc/RubyXL/OOXMLObject.html +118 -0
  295. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +532 -0
  296. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +564 -0
  297. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +603 -0
  298. data/rdoc/RubyXL/OOXMLTopLevelObject.html +384 -0
  299. data/rdoc/RubyXL/Offset.html +106 -0
  300. data/rdoc/RubyXL/OutlineProperties.html +106 -0
  301. data/rdoc/RubyXL/PageMargins.html +106 -0
  302. data/rdoc/RubyXL/PageSetup.html +106 -0
  303. data/rdoc/RubyXL/PageSetupProperties.html +106 -0
  304. data/rdoc/RubyXL/Pane.html +106 -0
  305. data/rdoc/RubyXL/Parser.html +204 -0
  306. data/rdoc/RubyXL/PatternFill.html +106 -0
  307. data/rdoc/RubyXL/PhoneticProperties.html +106 -0
  308. data/rdoc/RubyXL/PhoneticRun.html +106 -0
  309. data/rdoc/RubyXL/PivotArea.html +106 -0
  310. data/rdoc/RubyXL/PivotCache.html +106 -0
  311. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +133 -0
  312. data/rdoc/RubyXL/PivotCacheRecordsFile.html +122 -0
  313. data/rdoc/RubyXL/PivotCaches.html +106 -0
  314. data/rdoc/RubyXL/PivotReference.html +106 -0
  315. data/rdoc/RubyXL/PivotReferences.html +106 -0
  316. data/rdoc/RubyXL/PivotTableFile.html +133 -0
  317. data/rdoc/RubyXL/PivotTableSelection.html +106 -0
  318. data/rdoc/RubyXL/PresetGeometry.html +106 -0
  319. data/rdoc/RubyXL/PrintOptions.html +106 -0
  320. data/rdoc/RubyXL/PrinterSettingsFile.html +122 -0
  321. data/rdoc/RubyXL/ProtectedRange.html +106 -0
  322. data/rdoc/RubyXL/ProtectedRanges.html +106 -0
  323. data/rdoc/RubyXL/Protection.html +106 -0
  324. data/rdoc/RubyXL/RID.html +103 -0
  325. data/rdoc/RubyXL/RawOOXML.html +223 -0
  326. data/rdoc/RubyXL/Reference.html +640 -0
  327. data/rdoc/RubyXL/Relationship.html +103 -0
  328. data/rdoc/RubyXL/RelationshipSupport.html +419 -0
  329. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +148 -0
  330. data/rdoc/RubyXL/RichText.html +159 -0
  331. data/rdoc/RubyXL/RichTextRun.html +157 -0
  332. data/rdoc/RubyXL/Row.html +439 -0
  333. data/rdoc/RubyXL/RowExt.html +106 -0
  334. data/rdoc/RubyXL/RunProperties.html +106 -0
  335. data/rdoc/RubyXL/Scenario.html +106 -0
  336. data/rdoc/RubyXL/Scenarios.html +106 -0
  337. data/rdoc/RubyXL/Selection.html +165 -0
  338. data/rdoc/RubyXL/ShapeGuide.html +106 -0
  339. data/rdoc/RubyXL/ShapeTextRectangle.html +106 -0
  340. data/rdoc/RubyXL/SharedStringsTable.html +424 -0
  341. data/rdoc/RubyXL/Sheet.html +106 -0
  342. data/rdoc/RubyXL/SheetCalculationProperties.html +106 -0
  343. data/rdoc/RubyXL/SheetData.html +192 -0
  344. data/rdoc/RubyXL/SheetDataExt.html +106 -0
  345. data/rdoc/RubyXL/SheetDataSet.html +106 -0
  346. data/rdoc/RubyXL/SheetName.html +106 -0
  347. data/rdoc/RubyXL/SheetNames.html +106 -0
  348. data/rdoc/RubyXL/Sheets.html +106 -0
  349. data/rdoc/RubyXL/SlicerCacheFile.html +122 -0
  350. data/rdoc/RubyXL/SlicerFile.html +122 -0
  351. data/rdoc/RubyXL/SmartTagProperties.html +106 -0
  352. data/rdoc/RubyXL/SmartTagType.html +106 -0
  353. data/rdoc/RubyXL/SmartTagTypes.html +106 -0
  354. data/rdoc/RubyXL/SmartTags.html +106 -0
  355. data/rdoc/RubyXL/SortCondition.html +106 -0
  356. data/rdoc/RubyXL/SortState.html +106 -0
  357. data/rdoc/RubyXL/Sqref.html +197 -0
  358. data/rdoc/RubyXL/Stop.html +106 -0
  359. data/rdoc/RubyXL/StringNode.html +103 -0
  360. data/rdoc/RubyXL/StringNodeW3C.html +197 -0
  361. data/rdoc/RubyXL/StringValue.html +103 -0
  362. data/rdoc/RubyXL/Stylesheet.html +354 -0
  363. data/rdoc/RubyXL/TableFile.html +122 -0
  364. data/rdoc/RubyXL/TableParts.html +103 -0
  365. data/rdoc/RubyXL/TableStyle.html +106 -0
  366. data/rdoc/RubyXL/TableStyles.html +106 -0
  367. data/rdoc/RubyXL/Text.html +216 -0
  368. data/rdoc/RubyXL/Theme.html +535 -0
  369. data/rdoc/RubyXL/ThemeElements.html +106 -0
  370. data/rdoc/RubyXL/ThumbnailFile.html +122 -0
  371. data/rdoc/RubyXL/Top10.html +106 -0
  372. data/rdoc/RubyXL/VMLDrawingFile.html +134 -0
  373. data/rdoc/RubyXL/Variant.html +106 -0
  374. data/rdoc/RubyXL/Vector.html +161 -0
  375. data/rdoc/RubyXL/VectorValue.html +103 -0
  376. data/rdoc/RubyXL/VisualProperties.html +106 -0
  377. data/rdoc/RubyXL/WebPublishObject.html +106 -0
  378. data/rdoc/RubyXL/WebPublishObjects.html +106 -0
  379. data/rdoc/RubyXL/WebPublishingItem.html +106 -0
  380. data/rdoc/RubyXL/WebPublishingItems.html +106 -0
  381. data/rdoc/RubyXL/WebPublishingProperties.html +106 -0
  382. data/rdoc/RubyXL/Workbook.html +633 -0
  383. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1321 -0
  384. data/rdoc/RubyXL/WorkbookProperties.html +106 -0
  385. data/rdoc/RubyXL/WorkbookProtection.html +106 -0
  386. data/rdoc/RubyXL/WorkbookRoot.html +402 -0
  387. data/rdoc/RubyXL/WorkbookView.html +106 -0
  388. data/rdoc/RubyXL/WorkbookViews.html +106 -0
  389. data/rdoc/RubyXL/Worksheet.html +433 -0
  390. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2861 -0
  391. data/rdoc/RubyXL/WorksheetDimensions.html +106 -0
  392. data/rdoc/RubyXL/WorksheetFormatProperties.html +103 -0
  393. data/rdoc/RubyXL/WorksheetProperties.html +106 -0
  394. data/rdoc/RubyXL/WorksheetProtection.html +106 -0
  395. data/rdoc/RubyXL/WorksheetView.html +106 -0
  396. data/rdoc/RubyXL/WorksheetViews.html +106 -0
  397. data/rdoc/RubyXL/XF.html +106 -0
  398. data/rdoc/created.rid +38 -0
  399. data/rdoc/css/fonts.css +167 -0
  400. data/rdoc/css/rdoc.css +590 -0
  401. data/rdoc/fonts/Lato-Light.ttf +0 -0
  402. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  403. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  404. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  405. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  406. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  407. data/rdoc/images/add.png +0 -0
  408. data/rdoc/images/arrow_up.png +0 -0
  409. data/rdoc/images/brick.png +0 -0
  410. data/rdoc/images/brick_link.png +0 -0
  411. data/rdoc/images/bug.png +0 -0
  412. data/rdoc/images/bullet_black.png +0 -0
  413. data/rdoc/images/bullet_toggle_minus.png +0 -0
  414. data/rdoc/images/bullet_toggle_plus.png +0 -0
  415. data/rdoc/images/date.png +0 -0
  416. data/rdoc/images/delete.png +0 -0
  417. data/rdoc/images/find.png +0 -0
  418. data/rdoc/images/loadingAnimation.gif +0 -0
  419. data/rdoc/images/macFFBgHack.png +0 -0
  420. data/rdoc/images/package.png +0 -0
  421. data/rdoc/images/page_green.png +0 -0
  422. data/rdoc/images/page_white_text.png +0 -0
  423. data/rdoc/images/page_white_width.png +0 -0
  424. data/rdoc/images/plugin.png +0 -0
  425. data/rdoc/images/ruby.png +0 -0
  426. data/rdoc/images/tag_blue.png +0 -0
  427. data/rdoc/images/tag_green.png +0 -0
  428. data/rdoc/images/transparent.png +0 -0
  429. data/rdoc/images/wrench.png +0 -0
  430. data/rdoc/images/wrench_orange.png +0 -0
  431. data/rdoc/images/zoom.png +0 -0
  432. data/rdoc/index.html +796 -0
  433. data/rdoc/js/darkfish.js +161 -0
  434. data/rdoc/js/jquery.js +4 -0
  435. data/rdoc/js/navigation.js +142 -0
  436. data/rdoc/js/navigation.js.gz +0 -0
  437. data/rdoc/js/search.js +109 -0
  438. data/rdoc/js/search_index.js +1 -0
  439. data/rdoc/js/search_index.js.gz +0 -0
  440. data/rdoc/js/searcher.js +229 -0
  441. data/rdoc/js/searcher.js.gz +0 -0
  442. data/rdoc/table_of_contents.html +2758 -0
  443. data/rubyXL.gemspec +516 -0
  444. data/spec/lib/cell_spec.rb +515 -0
  445. data/spec/lib/color_spec.rb +13 -0
  446. data/spec/lib/parser_spec.rb +118 -0
  447. data/spec/lib/reference_spec.rb +28 -0
  448. data/spec/lib/stylesheet_spec.rb +28 -0
  449. data/spec/lib/text_spec.rb +29 -0
  450. data/spec/lib/workbook_spec.rb +174 -0
  451. data/spec/lib/worksheet_spec.rb +1363 -0
  452. data/spec/spec_helper.rb +11 -0
  453. data/test/input/.gitkeep +0 -0
  454. data/test/output/.gitkeep +0 -0
  455. data/test/test_parse_write.rb +15 -0
  456. data/tmp/.gitignore +1 -0
  457. metadata +615 -0
@@ -0,0 +1,74 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/simple_types'
3
+
4
+ module RubyXL
5
+
6
+ class BorderEdge < OOXMLObject
7
+ define_attribute(:style, RubyXL::ST_BorderStyle, :default => 'none')
8
+ define_child_node(RubyXL::Color)
9
+
10
+ def set_rgb_color(font_color)
11
+ self.color = RubyXL::Color.new(:rgb => font_color.to_s)
12
+ end
13
+
14
+ def get_rgb_color
15
+ color && color.rgb
16
+ end
17
+ end
18
+
19
+ # http://www.datypic.com/sc/ooxml/e-ssml_border-2.html
20
+ class Border < OOXMLObject
21
+ define_attribute(:diagonalUp, :bool)
22
+ define_attribute(:diagonalDown, :bool)
23
+ define_attribute(:outline, :bool, :default => true)
24
+ define_child_node(RubyXL::BorderEdge, :node_name => :left)
25
+ define_child_node(RubyXL::BorderEdge, :node_name => :right)
26
+ define_child_node(RubyXL::BorderEdge, :node_name => :top)
27
+ define_child_node(RubyXL::BorderEdge, :node_name => :bottom)
28
+ define_child_node(RubyXL::BorderEdge, :node_name => :diagonal)
29
+ define_child_node(RubyXL::BorderEdge, :node_name => :vertical)
30
+ define_child_node(RubyXL::BorderEdge, :node_name => :horizontal)
31
+ define_element_name 'border'
32
+
33
+ def get_edge_style(direction)
34
+ edge = self.send(direction)
35
+ edge && edge.style
36
+ end
37
+
38
+ def set_edge_style(direction, style)
39
+ edge = self.send(direction)
40
+ if edge
41
+ edge.style = style
42
+ else
43
+ self.send("#{direction}=", RubyXL::BorderEdge.new(:style => style))
44
+ end
45
+ end
46
+
47
+ def get_edge_color(direction)
48
+ edge = self.send(direction)
49
+ edge && edge.get_rgb_color
50
+ end
51
+
52
+ def set_edge_color(direction, color)
53
+ edge = self.send(direction)
54
+ if edge
55
+ edge.set_rgb_color(color)
56
+ else
57
+ self.send("#{direction}=", RubyXL::BorderEdge.new)
58
+ self.send(direction).set_rgb_color(color)
59
+ end
60
+ end
61
+ end
62
+
63
+ # http://www.datypic.com/sc/ooxml/e-ssml_borders-1.html
64
+ class Borders < OOXMLContainerObject
65
+ define_child_node(RubyXL::Border, :collection => :with_count)
66
+ define_element_name 'borders'
67
+
68
+ def self.default
69
+ self.new(:_ => [ RubyXL::Border.new ])
70
+ end
71
+
72
+ end
73
+
74
+ end
@@ -0,0 +1,31 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/extensions'
3
+
4
+ module RubyXL
5
+ # http://www.datypic.com/sc/ooxml/e-ssml_c-1.html
6
+ class CalculationChainCell < OOXMLObject
7
+ define_attribute(:r, :ref, :accessor => :ref)
8
+ define_attribute(:i, :int, :accessor => :sheet_id, :default => 0)
9
+ define_attribute(:s, :bool, :accessor => :child_chain, :default => false)
10
+ define_attribute(:l, :bool, :accessor => :new_dep_lvl, :default => false)
11
+ define_attribute(:t, :bool, :accessor => :new_thread, :default => false)
12
+ define_attribute(:a, :bool, :accessor => :array, :default => false)
13
+ define_element_name 'c'
14
+ end
15
+
16
+ # http://www.datypic.com/sc/ooxml/e-ssml_calcChain.html
17
+ class CalculationChain < OOXMLTopLevelObject
18
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml'
19
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain'
20
+
21
+ define_child_node(RubyXL::CalculationChainCell, :collection => true, :accessor => :cells)
22
+ define_child_node(RubyXL::ExtensionStorageArea)
23
+
24
+ define_element_name 'calcChain'
25
+ set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil)
26
+
27
+ def xlsx_path
28
+ ROOT.join('xl', 'calcChain.xml')
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,65 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/simple_types'
3
+
4
+ module RubyXL
5
+
6
+ # http://www.datypic.com/sc/ooxml/e-ssml_cellStyle-1.html
7
+ class CellStyle < OOXMLObject
8
+ define_attribute(:name, :string)
9
+ define_attribute(:xfId, :int, :required => true)
10
+ define_attribute(:builtinId, :int)
11
+ define_attribute(:iLevel, :int)
12
+ define_attribute(:hidden, :bool)
13
+ define_attribute(:customBuiltin, :bool)
14
+ define_element_name 'cellStyle'
15
+ end
16
+
17
+ # http://www.datypic.com/sc/ooxml/e-ssml_alignment-1.html
18
+ class Alignment < OOXMLObject
19
+ define_attribute(:horizontal, RubyXL::ST_HorizontalAlignment)
20
+ define_attribute(:vertical, RubyXL::ST_VerticalAlignment)
21
+ define_attribute(:textRotation, :int)
22
+ define_attribute(:wrapText, :bool)
23
+ define_attribute(:indent, :int)
24
+ define_attribute(:relativeIndent, :int)
25
+ define_attribute(:justifyLastLine, :bool)
26
+ define_attribute(:shrinkToFit, :bool)
27
+ define_attribute(:readingOrder, :int)
28
+ define_element_name 'alignment'
29
+ end
30
+
31
+ # http://www.datypic.com/sc/ooxml/e-ssml_protection-1.html
32
+ class Protection < OOXMLObject
33
+ define_attribute(:locked, :bool)
34
+ define_attribute(:hidden, :bool)
35
+ define_element_name 'protection'
36
+ end
37
+
38
+ # http://www.datypic.com/sc/ooxml/e-ssml_xf-1.html
39
+ class XF < OOXMLObject
40
+ define_attribute(:numFmtId, :int)
41
+ define_attribute(:fontId, :int)
42
+ define_attribute(:fillId, :int)
43
+ define_attribute(:borderId, :int)
44
+ define_attribute(:xfId, :int)
45
+ define_attribute(:quotePrefix, :bool, :default => false)
46
+ define_attribute(:pivotButton, :bool, :default => false)
47
+ define_attribute(:applyNumberFormat, :bool)
48
+ define_attribute(:applyFont, :bool)
49
+ define_attribute(:applyFill, :bool)
50
+ define_attribute(:applyBorder, :bool)
51
+ define_attribute(:applyAlignment, :bool)
52
+ define_attribute(:applyProtection, :bool)
53
+ define_child_node(RubyXL::Alignment)
54
+ define_child_node(RubyXL::Protection)
55
+ define_element_name 'xf'
56
+ end
57
+
58
+ # http://www.datypic.com/sc/ooxml/e-ssml_numFmt-1.html
59
+ class NumFmt < OOXMLObject
60
+ define_attribute(:numFmtId, :int, :required => true)
61
+ define_attribute(:formatCode, :string, :required => true)
62
+ define_element_name 'numFmt'
63
+ end
64
+
65
+ end
@@ -0,0 +1,92 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/simple_types'
3
+ require 'rubyXL/objects/extensions'
4
+ require 'rubyXL/objects/relationships'
5
+ require 'rubyXL/objects/sheet_common'
6
+
7
+ module RubyXL
8
+
9
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetProtection-4.html
10
+ class ChartsheetProtection < OOXMLObject
11
+ define_attribute(:password, RubyXL::ST_UnsignedShortHex)
12
+ define_attribute(:content, :bool, :default => false)
13
+ define_attribute(:objects, :bool, :default => false)
14
+ define_element_name 'sheetProtection'
15
+ end
16
+
17
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetPr-4.html
18
+ class ChartsheetProperties < OOXMLObject
19
+ define_attribute(:published, :bool, :default => true)
20
+ define_attribute(:codeName, :string)
21
+ define_child_node(RubyXL::Color, :node_name => :tabColor)
22
+ define_element_name 'sheetPr'
23
+ end
24
+
25
+ # http://www.datypic.com/sc/ooxml/e-ssml_pageSetup-5.html
26
+ class ChartsheetPageSetup < OOXMLObject
27
+ define_attribute(:paperSize, :int, :default => 1)
28
+ define_attribute(:firstPageNumber, :int, :default => 1)
29
+ define_attribute(:orientation, RubyXL::ST_Orientation, :default => 'default')
30
+ define_attribute(:usePrinterDefaults, :bool, :default => true)
31
+ define_attribute(:blackAndWhite, :bool, :default => false)
32
+ define_attribute(:draft, :bool, :default => false)
33
+ define_attribute(:useFirstPageNumber, :bool, :default => false)
34
+ define_attribute(:horizontalDpi, :int, :default => 600)
35
+ define_attribute(:verticalDpi, :int, :default => 600)
36
+ define_attribute(:copies, :int, :default => 1)
37
+ define_attribute(:'r:id', :string)
38
+ define_element_name 'pageSetup'
39
+ end
40
+
41
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetView-2.html
42
+ class ChartsheetView < OOXMLObject
43
+ define_attribute(:tabSelected, :bool, :default => false)
44
+ define_attribute(:zoomScale, :int, :default => 100)
45
+ define_attribute(:workbookViewId, :int, :required => true, :default => 0 )
46
+ define_attribute(:zoomToFit, :bool, :default => false)
47
+ define_child_node(RubyXL::ExtensionStorageArea)
48
+ define_element_name 'sheetView'
49
+ end
50
+
51
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetViews-4.html
52
+ class ChartsheetViews < OOXMLObject
53
+ define_child_node(RubyXL::ChartsheetView, :collection => true)
54
+ define_child_node(RubyXL::ExtensionStorageArea)
55
+ define_element_name 'sheetViews'
56
+ end
57
+
58
+ # http://www.datypic.com/sc/ooxml/e-ssml_chartsheet.html
59
+ class Chartsheet < OOXMLTopLevelObject
60
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml'
61
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet'
62
+
63
+ include RubyXL::RelationshipSupport
64
+ define_relationship(RubyXL::DrawingFile)
65
+
66
+ attr_accessor :state, :rels
67
+ attr_accessor :workbook, :sheet_name, :sheet_id
68
+
69
+ define_child_node(RubyXL::ChartsheetProperties)
70
+ define_child_node(RubyXL::ChartsheetViews)
71
+ define_child_node(RubyXL::ChartsheetProtection)
72
+ define_child_node(RubyXL::CustomSheetViews)
73
+ define_child_node(RubyXL::PageMargins)
74
+ define_child_node(RubyXL::ChartsheetPageSetup)
75
+ define_child_node(RubyXL::HeaderFooterSettings)
76
+ define_child_node(RubyXL::RID, :node_name => :drawing)
77
+ define_child_node(RubyXL::RID, :node_name => :legacyDrawing)
78
+ define_child_node(RubyXL::RID, :node_name => :legacyDrawingHF)
79
+ define_child_node(RubyXL::RID, :node_name => :picture)
80
+ define_child_node(RubyXL::WebPublishingItems)
81
+ define_child_node(RubyXL::ExtensionStorageArea)
82
+ define_element_name 'chartsheet'
83
+ set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
84
+ 'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r')
85
+
86
+ def xlsx_path
87
+ ROOT.join('xl', 'chartsheets', "sheet#{file_index}.xml")
88
+ end
89
+
90
+ end
91
+
92
+ end
@@ -0,0 +1,27 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+
3
+ module RubyXL
4
+
5
+ # http://www.datypic.com/sc/ooxml/e-ssml_color-4.html
6
+ class Color < OOXMLObject
7
+ COLOR_REGEXP = /\A([a-f]|[A-F]|[0-9]){6}\Z/
8
+
9
+ define_attribute(:auto, :bool)
10
+ define_attribute(:indexed, :uint)
11
+ define_attribute(:rgb, :string)
12
+ define_attribute(:theme, :uint)
13
+ define_attribute(:tint, :double, :default => 0.0)
14
+ define_element_name 'color'
15
+
16
+ #validates hex color code, no '#' allowed
17
+ def self.validate_color(color)
18
+ if color =~ COLOR_REGEXP
19
+ return true
20
+ else
21
+ raise 'invalid color'
22
+ end
23
+ end
24
+
25
+ end
26
+
27
+ end
@@ -0,0 +1,92 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+
3
+ module RubyXL
4
+
5
+ # http://www.datypic.com/sc/ooxml/e-ssml_col-1.html
6
+ class ColumnRange < OOXMLObject
7
+ define_attribute(:min, :uint, :required => true)
8
+ define_attribute(:max, :uint, :required => true)
9
+ define_attribute(:width, :double)
10
+ define_attribute(:style, :uint, :default => 0, :accessor => :style_index)
11
+ define_attribute(:hidden, :bool, :default => false)
12
+ define_attribute(:bestFit, :bool, :default => false)
13
+ define_attribute(:customWidth, :bool, :default => false)
14
+ define_attribute(:phonetic, :bool, :default => false)
15
+ define_attribute(:outlineLevel, :int, :default => 0)
16
+ define_attribute(:collapsed, :bool, :default => false)
17
+ define_element_name 'col'
18
+
19
+ def delete_column(col_index)
20
+ col = col_index + 1
21
+ self.min -=1 if min >= col
22
+ self.max -=1 if max >= col
23
+ end
24
+
25
+ def insert_column(col_index)
26
+ col = col_index + 1
27
+ self.min +=1 if min >= col
28
+ self.max +=1 if max >= col - 1
29
+ end
30
+
31
+ def include?(col_index)
32
+ ((min-1)..(max-1)).include?(col_index)
33
+ end
34
+
35
+ DEFAULT_WIDTH = 9
36
+ end
37
+
38
+ class ColumnRanges < OOXMLContainerObject
39
+ define_child_node(RubyXL::ColumnRange, :collection => true)
40
+
41
+ define_element_name 'cols'
42
+
43
+ # Locate an existing column range, make a new one if not found,
44
+ # or split existing column range into multiples.
45
+ def get_range(col_index)
46
+ col_num = col_index + 1
47
+
48
+ old_range = self.locate_range(col_index)
49
+
50
+ if old_range.nil? then
51
+ new_range = RubyXL::ColumnRange.new
52
+ else
53
+ if old_range.min == col_num && old_range.max == col_num then
54
+ return old_range # Single column range, OK to change in place
55
+ elsif old_range.min == col_num then
56
+ new_range = old_range.dup
57
+ old_range.min += 1
58
+ elsif old_range.max == col_num then
59
+ new_range = old_range.dup
60
+ old_range.max -= 1
61
+ else
62
+ range_before = old_range.dup
63
+ range_before.max = col_index # col_num - 1
64
+ self << range_before
65
+
66
+ old_range.min = col_num + 1
67
+
68
+ new_range = RubyXL::ColumnRange.new
69
+ end
70
+ end
71
+
72
+ new_range.min = new_range.max = col_num
73
+ self << new_range
74
+ return new_range
75
+ end
76
+
77
+ def locate_range(col_index)
78
+ self.find { |range| range.include?(col_index) }
79
+ end
80
+
81
+ def insert_column(col_index)
82
+ self.each { |range| range.insert_column(col_index) }
83
+ end
84
+
85
+ def before_write_xml
86
+ self.sort_by!{ |r| r.min }
87
+ !(self.empty?)
88
+ end
89
+
90
+ end
91
+
92
+ end
@@ -0,0 +1,47 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/extensions'
3
+
4
+ module RubyXL
5
+
6
+ # http://www.datypic.com/sc/ooxml/e-ssml_comment-1.html
7
+ class Comment < OOXMLObject
8
+ define_child_node(RubyXL::RichText, :node_name => 'text')
9
+ define_child_node(RubyXL::AlternateContent)
10
+ define_attribute(:ref, :ref, :required => true)
11
+ define_attribute(:authorId, :int, :required => true)
12
+ define_attribute(:guid, :string)
13
+ define_element_name 'comment'
14
+ end
15
+
16
+ # http://www.datypic.com/sc/ooxml/e-ssml_authors-1.html
17
+ class CommentList < OOXMLContainerObject
18
+ define_child_node(RubyXL::Comment, :collection => [0..-1])
19
+ define_element_name 'commentList'
20
+ end
21
+
22
+ # http://www.datypic.com/sc/ooxml/e-ssml_authors-1.html
23
+ class Authors < OOXMLContainerObject
24
+ define_child_node(RubyXL::StringNode, :node_name => :author, :collection => [0..-1])
25
+ define_element_name 'authors'
26
+ end
27
+
28
+ # http://www.datypic.com/sc/ooxml/e-ssml_comments.html
29
+ class CommentsFile < OOXMLTopLevelObject
30
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'
31
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments'
32
+
33
+ define_child_node(RubyXL::Authors)
34
+ define_child_node(RubyXL::CommentList)
35
+ define_child_node(RubyXL::ExtensionStorageArea)
36
+ define_element_name 'comments'
37
+ set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil)
38
+
39
+ attr_accessor :workbook
40
+
41
+ def xlsx_path
42
+ ROOT.join('xl', "comments#{file_index}.xml")
43
+ end
44
+
45
+ end
46
+
47
+ end
@@ -0,0 +1,135 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/simple_types'
3
+
4
+ module RubyXL
5
+
6
+ class BooleanValue < OOXMLObject
7
+ define_attribute(:val, :bool, :required => true, :default => true)
8
+ end
9
+
10
+ class StringValue < OOXMLObject
11
+ define_attribute(:val, :string, :required => true)
12
+ end
13
+
14
+ class IntegerValue < OOXMLObject
15
+ define_attribute(:val, :int, :required => true)
16
+ end
17
+
18
+ class FloatValue < OOXMLObject
19
+ define_attribute(:val, :double, :required => true)
20
+ end
21
+
22
+ class BooleanNode < OOXMLObject
23
+ define_attribute(:_, :bool, :accessor => :value)
24
+ end
25
+
26
+ class StringNode < OOXMLObject
27
+ define_attribute(:_, :string, :accessor => :value)
28
+ end
29
+
30
+ class IntegerNode < OOXMLObject
31
+ define_attribute(:_, :int, :accessor => :value)
32
+ end
33
+
34
+ class FloatNode < OOXMLObject
35
+ define_attribute(:_, :double, :accessor => :value)
36
+ end
37
+
38
+ class StringNodeW3C < OOXMLObject
39
+ define_attribute(:_, :string, :accessor => :value)
40
+ define_attribute('xsi:type', :string, :required => true, :default => 'dcterms:W3CDTF')
41
+
42
+ def to_time
43
+ value && (value.strip.empty? ? nil : DateTime.parse(value).to_time)
44
+ end
45
+
46
+ def self.default(v)
47
+ v && self.new(:value => v.to_datetime.iso8601)
48
+ end
49
+
50
+ end
51
+
52
+ # http://www.datypic.com/sc/ooxml/e-docPropsVTypes_variant.html
53
+ class Variant < OOXMLObject
54
+ define_child_node(RubyXL::Variant, :node_name => 'vt:variant')
55
+
56
+ # vector Vector
57
+ # array Array
58
+ # blob Binary Blob
59
+ # oblob Binary Blob Object
60
+ # empty Empty
61
+ # null Null
62
+ # int Integer
63
+ # uint Unsigned Integer
64
+ # decimal Decimal
65
+ # stream Binary Stream
66
+ # ostream Binary Stream Object
67
+ # storage Binary Storage
68
+ # ostorage Binary Storage Object
69
+ # vstream Binary Versioned Stream
70
+ #
71
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:i1')
72
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:i2')
73
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:i4')
74
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:i8')
75
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:ui1')
76
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:ui2')
77
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:ui4')
78
+ define_child_node(RubyXL::IntegerNode, :node_name => 'vt:ui8')
79
+ define_child_node(RubyXL::FloatNode, :node_name => 'vt:r4')
80
+ define_child_node(RubyXL::FloatNode, :node_name => 'vt:r8')
81
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:lpstr')
82
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:lpstrw')
83
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:bstr')
84
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:date')
85
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:filetime')
86
+ define_child_node(RubyXL::BooleanNode, :node_name => 'vt:bool')
87
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:cy')
88
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:error')
89
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:clsid')
90
+ define_child_node(RubyXL::StringNode, :node_name => 'vt:cf')
91
+ define_element_name 'vt:vector'
92
+ end
93
+
94
+ # http://www.datypic.com/sc/ooxml/e-docPropsVTypes_vector.html
95
+ class Vector < OOXMLObject
96
+ define_attribute(:baseType, RubyXL::ST_VectorBaseType, :required => true)
97
+ define_attribute(:size, :int, :required => true)
98
+ define_child_node(RubyXL::Variant, :collection => true, :node_name => 'vt:variant')
99
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:i1')
100
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:i2')
101
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:i4')
102
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:i8')
103
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:ui1')
104
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:ui2')
105
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:ui4')
106
+ define_child_node(RubyXL::IntegerNode, :collection => true, :node_name => 'vt:ui8')
107
+ define_child_node(RubyXL::FloatNode, :collection => true, :node_name => 'vt:r4')
108
+ define_child_node(RubyXL::FloatNode, :collection => true, :node_name => 'vt:r8')
109
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:lpstr')
110
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:lpstrw')
111
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:bstr')
112
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:date')
113
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:filetime')
114
+ define_child_node(RubyXL::BooleanNode, :collection => true, :node_name => 'vt:bool')
115
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:cy')
116
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:error')
117
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:clsid')
118
+ define_child_node(RubyXL::StringNode, :collection => true, :node_name => 'vt:cf')
119
+ define_element_name 'vt:vector'
120
+
121
+ def before_write_xml
122
+ # Fill out the count attribute
123
+ known_child_nodes = obtain_class_variable(:@@ooxml_child_nodes)
124
+ self.size = 0
125
+ known_child_nodes.values.each { |v| self.size += self.send(v[:accessor]).size }
126
+ true
127
+ end
128
+
129
+ end
130
+
131
+ class VectorValue < OOXMLObject
132
+ define_child_node(RubyXL::Vector)
133
+ end
134
+
135
+ end