rubyXL-ptr 3.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +17 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +229 -0
- data/Rakefile +103 -0
- data/VERSION +1 -0
- data/lib/rubyXL.rb +12 -0
- data/lib/rubyXL/cell.rb +54 -0
- data/lib/rubyXL/convenience_methods.rb +1122 -0
- data/lib/rubyXL/objects/border.rb +74 -0
- data/lib/rubyXL/objects/calculation_chain.rb +31 -0
- data/lib/rubyXL/objects/cell_style.rb +65 -0
- data/lib/rubyXL/objects/chartsheet.rb +92 -0
- data/lib/rubyXL/objects/color.rb +27 -0
- data/lib/rubyXL/objects/column_range.rb +92 -0
- data/lib/rubyXL/objects/comments.rb +47 -0
- data/lib/rubyXL/objects/container_nodes.rb +135 -0
- data/lib/rubyXL/objects/content_types.rb +77 -0
- data/lib/rubyXL/objects/data_validation.rb +37 -0
- data/lib/rubyXL/objects/document_properties.rb +159 -0
- data/lib/rubyXL/objects/extensions.rb +40 -0
- data/lib/rubyXL/objects/external_links.rb +85 -0
- data/lib/rubyXL/objects/fill.rb +55 -0
- data/lib/rubyXL/objects/filters.rb +120 -0
- data/lib/rubyXL/objects/font.rb +48 -0
- data/lib/rubyXL/objects/formula.rb +24 -0
- data/lib/rubyXL/objects/ooxml_object.rb +460 -0
- data/lib/rubyXL/objects/reference.rb +110 -0
- data/lib/rubyXL/objects/relationships.rb +213 -0
- data/lib/rubyXL/objects/root.rb +86 -0
- data/lib/rubyXL/objects/shared_strings.rb +70 -0
- data/lib/rubyXL/objects/sheet_common.rb +51 -0
- data/lib/rubyXL/objects/sheet_data.rb +188 -0
- data/lib/rubyXL/objects/simple_types.rb +232 -0
- data/lib/rubyXL/objects/storage.rb +182 -0
- data/lib/rubyXL/objects/stylesheet.rb +232 -0
- data/lib/rubyXL/objects/text.rb +94 -0
- data/lib/rubyXL/objects/theme.rb +1716 -0
- data/lib/rubyXL/objects/workbook.rb +464 -0
- data/lib/rubyXL/objects/worksheet.rb +748 -0
- data/lib/rubyXL/parser.rb +29 -0
- data/lib/rubyXL/worksheet.rb +105 -0
- data/rdoc/README_rdoc.html +475 -0
- data/rdoc/RubyXL.html +598 -0
- data/rdoc/RubyXL/AExtension.html +223 -0
- data/rdoc/RubyXL/AExtensionStorageArea.html +103 -0
- data/rdoc/RubyXL/ActiveX.html +182 -0
- data/rdoc/RubyXL/ActiveXBinary.html +117 -0
- data/rdoc/RubyXL/AdjustHandleList.html +106 -0
- data/rdoc/RubyXL/Alignment.html +106 -0
- data/rdoc/RubyXL/AlternateContent.html +103 -0
- data/rdoc/RubyXL/Authors.html +106 -0
- data/rdoc/RubyXL/AutoFilter.html +106 -0
- data/rdoc/RubyXL/AutoFilterColumn.html +106 -0
- data/rdoc/RubyXL/BinaryImageFile.html +122 -0
- data/rdoc/RubyXL/BodyProperties.html +106 -0
- data/rdoc/RubyXL/BooleanNode.html +103 -0
- data/rdoc/RubyXL/BooleanValue.html +103 -0
- data/rdoc/RubyXL/Border.html +275 -0
- data/rdoc/RubyXL/BorderEdge.html +189 -0
- data/rdoc/RubyXL/Borders.html +157 -0
- data/rdoc/RubyXL/Break.html +106 -0
- data/rdoc/RubyXL/BreakList.html +106 -0
- data/rdoc/RubyXL/CT_AdjPoint2D.html +106 -0
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +106 -0
- data/rdoc/RubyXL/CT_Backdrop.html +106 -0
- data/rdoc/RubyXL/CT_Bevel.html +106 -0
- data/rdoc/RubyXL/CT_BiLevelEffect.html +106 -0
- data/rdoc/RubyXL/CT_BlendEffect.html +106 -0
- data/rdoc/RubyXL/CT_Blip.html +106 -0
- data/rdoc/RubyXL/CT_BlipFillProperties.html +106 -0
- data/rdoc/RubyXL/CT_BlurEffect.html +106 -0
- data/rdoc/RubyXL/CT_Camera.html +106 -0
- data/rdoc/RubyXL/CT_Color.html +106 -0
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +106 -0
- data/rdoc/RubyXL/CT_ColorMapping.html +106 -0
- data/rdoc/RubyXL/CT_ColorScheme.html +106 -0
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +106 -0
- data/rdoc/RubyXL/CT_ConnectionSite.html +106 -0
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +106 -0
- data/rdoc/RubyXL/CT_DashStop.html +106 -0
- data/rdoc/RubyXL/CT_DashStopList.html +106 -0
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +106 -0
- data/rdoc/RubyXL/CT_DuotoneEffect.html +106 -0
- data/rdoc/RubyXL/CT_EffectContainer.html +106 -0
- data/rdoc/RubyXL/CT_EffectList.html +106 -0
- data/rdoc/RubyXL/CT_EffectReference.html +106 -0
- data/rdoc/RubyXL/CT_EffectStyleItem.html +106 -0
- data/rdoc/RubyXL/CT_EffectStyleList.html +106 -0
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +106 -0
- data/rdoc/RubyXL/CT_FillEffect.html +106 -0
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +106 -0
- data/rdoc/RubyXL/CT_FillStyleList.html +106 -0
- data/rdoc/RubyXL/CT_FlatText.html +106 -0
- data/rdoc/RubyXL/CT_FontCollection.html +106 -0
- data/rdoc/RubyXL/CT_FontReference.html +106 -0
- data/rdoc/RubyXL/CT_GeomGuideList.html +106 -0
- data/rdoc/RubyXL/CT_GlowEffect.html +106 -0
- data/rdoc/RubyXL/CT_GradientFillProperties.html +106 -0
- data/rdoc/RubyXL/CT_GradientStop.html +106 -0
- data/rdoc/RubyXL/CT_GradientStopList.html +106 -0
- data/rdoc/RubyXL/CT_HSLEffect.html +106 -0
- data/rdoc/RubyXL/CT_HslColor.html +106 -0
- data/rdoc/RubyXL/CT_Hyperlink.html +106 -0
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +106 -0
- data/rdoc/RubyXL/CT_LightRig.html +106 -0
- data/rdoc/RubyXL/CT_LineEndProperties.html +106 -0
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +106 -0
- data/rdoc/RubyXL/CT_LineProperties.html +106 -0
- data/rdoc/RubyXL/CT_LineStyleList.html +106 -0
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +106 -0
- data/rdoc/RubyXL/CT_LuminanceEffect.html +106 -0
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +106 -0
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +106 -0
- data/rdoc/RubyXL/CT_Path2D.html +106 -0
- data/rdoc/RubyXL/CT_Path2DArcTo.html +106 -0
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +106 -0
- data/rdoc/RubyXL/CT_Path2DList.html +106 -0
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +106 -0
- data/rdoc/RubyXL/CT_Path2DTo.html +106 -0
- data/rdoc/RubyXL/CT_PathShadeProperties.html +106 -0
- data/rdoc/RubyXL/CT_PatternFillProperties.html +106 -0
- data/rdoc/RubyXL/CT_Point3D.html +106 -0
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +106 -0
- data/rdoc/RubyXL/CT_PresetColor.html +106 -0
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +106 -0
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +106 -0
- data/rdoc/RubyXL/CT_PresetTextShape.html +106 -0
- data/rdoc/RubyXL/CT_ReflectionEffect.html +106 -0
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +106 -0
- data/rdoc/RubyXL/CT_RelativeRect.html +106 -0
- data/rdoc/RubyXL/CT_SRgbColor.html +106 -0
- data/rdoc/RubyXL/CT_ScRgbColor.html +106 -0
- data/rdoc/RubyXL/CT_Scene3D.html +106 -0
- data/rdoc/RubyXL/CT_SchemeColor.html +106 -0
- data/rdoc/RubyXL/CT_Shape3D.html +106 -0
- data/rdoc/RubyXL/CT_ShapeStyle.html +106 -0
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +106 -0
- data/rdoc/RubyXL/CT_SphereCoords.html +106 -0
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +106 -0
- data/rdoc/RubyXL/CT_StyleMatrix.html +106 -0
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +106 -0
- data/rdoc/RubyXL/CT_SupplementalFont.html +106 -0
- data/rdoc/RubyXL/CT_SystemColor.html +106 -0
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +106 -0
- data/rdoc/RubyXL/CT_TextBlipBullet.html +106 -0
- data/rdoc/RubyXL/CT_TextCharBullet.html +106 -0
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +106 -0
- data/rdoc/RubyXL/CT_TextFont.html +106 -0
- data/rdoc/RubyXL/CT_TextListStyle.html +106 -0
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +106 -0
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +106 -0
- data/rdoc/RubyXL/CT_TextSpacing.html +106 -0
- data/rdoc/RubyXL/CT_TextTabStop.html +106 -0
- data/rdoc/RubyXL/CT_TextTabStopList.html +106 -0
- data/rdoc/RubyXL/CT_TileInfoProperties.html +106 -0
- data/rdoc/RubyXL/CT_TintEffect.html +106 -0
- data/rdoc/RubyXL/CT_Transform2D.html +106 -0
- data/rdoc/RubyXL/CT_TransformEffect.html +106 -0
- data/rdoc/RubyXL/CT_Vector3D.html +106 -0
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +106 -0
- data/rdoc/RubyXL/CalculationChain.html +176 -0
- data/rdoc/RubyXL/CalculationChainCell.html +106 -0
- data/rdoc/RubyXL/CalculationProperties.html +106 -0
- data/rdoc/RubyXL/Cell.html +558 -0
- data/rdoc/RubyXL/CellConvenienceMethods.html +1211 -0
- data/rdoc/RubyXL/CellExt.html +106 -0
- data/rdoc/RubyXL/CellSmartTag.html +106 -0
- data/rdoc/RubyXL/CellSmartTagProperty.html +106 -0
- data/rdoc/RubyXL/CellSmartTags.html +106 -0
- data/rdoc/RubyXL/CellStyle.html +106 -0
- data/rdoc/RubyXL/CellStyleXFs.html +157 -0
- data/rdoc/RubyXL/CellStyles.html +157 -0
- data/rdoc/RubyXL/CellValue.html +158 -0
- data/rdoc/RubyXL/CellWatch.html +106 -0
- data/rdoc/RubyXL/CellWatches.html +106 -0
- data/rdoc/RubyXL/CellXFs.html +161 -0
- data/rdoc/RubyXL/ChartColorsFile.html +122 -0
- data/rdoc/RubyXL/ChartFile.html +189 -0
- data/rdoc/RubyXL/ChartStyleFile.html +122 -0
- data/rdoc/RubyXL/ChartUserShapesFile.html +122 -0
- data/rdoc/RubyXL/Chartsheet.html +260 -0
- data/rdoc/RubyXL/ChartsheetPageSetup.html +106 -0
- data/rdoc/RubyXL/ChartsheetProperties.html +106 -0
- data/rdoc/RubyXL/ChartsheetProtection.html +106 -0
- data/rdoc/RubyXL/ChartsheetView.html +106 -0
- data/rdoc/RubyXL/ChartsheetViews.html +106 -0
- data/rdoc/RubyXL/Color.html +175 -0
- data/rdoc/RubyXL/ColorFilter.html +106 -0
- data/rdoc/RubyXL/ColorScale.html +106 -0
- data/rdoc/RubyXL/ColorSet.html +106 -0
- data/rdoc/RubyXL/Colors.html +106 -0
- data/rdoc/RubyXL/ColumnRange.html +245 -0
- data/rdoc/RubyXL/ColumnRanges.html +289 -0
- data/rdoc/RubyXL/Comment.html +106 -0
- data/rdoc/RubyXL/CommentList.html +106 -0
- data/rdoc/RubyXL/CommentsFile.html +197 -0
- data/rdoc/RubyXL/ConditionalFormatValue.html +106 -0
- data/rdoc/RubyXL/ConditionalFormatting.html +106 -0
- data/rdoc/RubyXL/ConditionalFormattingRule.html +106 -0
- data/rdoc/RubyXL/ContentTypeDefault.html +103 -0
- data/rdoc/RubyXL/ContentTypeOverride.html +103 -0
- data/rdoc/RubyXL/ContentTypes.html +248 -0
- data/rdoc/RubyXL/ControlPropertiesFile.html +117 -0
- data/rdoc/RubyXL/CorePropertiesFile.html +474 -0
- data/rdoc/RubyXL/CustomColor.html +106 -0
- data/rdoc/RubyXL/CustomColorList.html +106 -0
- data/rdoc/RubyXL/CustomFilter.html +106 -0
- data/rdoc/RubyXL/CustomFilters.html +106 -0
- data/rdoc/RubyXL/CustomGeometry.html +106 -0
- data/rdoc/RubyXL/CustomProperties.html +106 -0
- data/rdoc/RubyXL/CustomPropertiesFile.html +122 -0
- data/rdoc/RubyXL/CustomProperty.html +106 -0
- data/rdoc/RubyXL/CustomSheetView.html +106 -0
- data/rdoc/RubyXL/CustomSheetViews.html +106 -0
- data/rdoc/RubyXL/CustomWorkbookView.html +106 -0
- data/rdoc/RubyXL/CustomWorkbookViews.html +106 -0
- data/rdoc/RubyXL/CustomXMLFile.html +117 -0
- data/rdoc/RubyXL/DXF.html +106 -0
- data/rdoc/RubyXL/DXFs.html +106 -0
- data/rdoc/RubyXL/DataBar.html +106 -0
- data/rdoc/RubyXL/DataConsolidate.html +106 -0
- data/rdoc/RubyXL/DataConsolidationReference.html +106 -0
- data/rdoc/RubyXL/DataConsolidationReferences.html +106 -0
- data/rdoc/RubyXL/DataType.html +143 -0
- data/rdoc/RubyXL/DataValidation.html +106 -0
- data/rdoc/RubyXL/DataValidations.html +106 -0
- data/rdoc/RubyXL/DateGroupItem.html +106 -0
- data/rdoc/RubyXL/DefinedName.html +106 -0
- data/rdoc/RubyXL/DefinedNameExt.html +106 -0
- data/rdoc/RubyXL/DefinedNames.html +106 -0
- data/rdoc/RubyXL/DefinedNamesExt.html +106 -0
- data/rdoc/RubyXL/DocumentPropertiesFile.html +255 -0
- data/rdoc/RubyXL/DrawingFile.html +188 -0
- data/rdoc/RubyXL/DynamicFilter.html +106 -0
- data/rdoc/RubyXL/EmbeddedControl.html +106 -0
- data/rdoc/RubyXL/EmbeddedControls.html +106 -0
- data/rdoc/RubyXL/Extension.html +106 -0
- data/rdoc/RubyXL/ExtensionStorageArea.html +106 -0
- data/rdoc/RubyXL/Extents.html +106 -0
- data/rdoc/RubyXL/ExternalBook.html +106 -0
- data/rdoc/RubyXL/ExternalLinksFile.html +184 -0
- data/rdoc/RubyXL/ExternalReference.html +106 -0
- data/rdoc/RubyXL/ExternalReferences.html +106 -0
- data/rdoc/RubyXL/ExtraColorSchemeList.html +106 -0
- data/rdoc/RubyXL/FieldItem.html +106 -0
- data/rdoc/RubyXL/FileRecoveryProperties.html +106 -0
- data/rdoc/RubyXL/FileSharing.html +106 -0
- data/rdoc/RubyXL/FileVersion.html +106 -0
- data/rdoc/RubyXL/Fill.html +157 -0
- data/rdoc/RubyXL/Fills.html +157 -0
- data/rdoc/RubyXL/FilterContainer.html +106 -0
- data/rdoc/RubyXL/FloatNode.html +103 -0
- data/rdoc/RubyXL/FloatValue.html +103 -0
- data/rdoc/RubyXL/Font.html +184 -0
- data/rdoc/RubyXL/FontConvenienceMethods.html +603 -0
- data/rdoc/RubyXL/FontScheme.html +106 -0
- data/rdoc/RubyXL/Fonts.html +157 -0
- data/rdoc/RubyXL/Formula.html +106 -0
- data/rdoc/RubyXL/FunctionGroup.html +106 -0
- data/rdoc/RubyXL/FunctionGroups.html +106 -0
- data/rdoc/RubyXL/GenericStorageObject.html +298 -0
- data/rdoc/RubyXL/GradientFill.html +106 -0
- data/rdoc/RubyXL/HeaderFooterSettings.html +106 -0
- data/rdoc/RubyXL/Hyperlink.html +106 -0
- data/rdoc/RubyXL/HyperlinkRelFile.html +117 -0
- data/rdoc/RubyXL/Hyperlinks.html +106 -0
- data/rdoc/RubyXL/IconFilter.html +106 -0
- data/rdoc/RubyXL/IconSet.html +106 -0
- data/rdoc/RubyXL/IgnoredError.html +106 -0
- data/rdoc/RubyXL/IgnoredErrors.html +106 -0
- data/rdoc/RubyXL/IndexedColors.html +106 -0
- data/rdoc/RubyXL/InputCells.html +106 -0
- data/rdoc/RubyXL/IntegerNode.html +103 -0
- data/rdoc/RubyXL/IntegerValue.html +103 -0
- data/rdoc/RubyXL/LegacyCell.html +181 -0
- data/rdoc/RubyXL/LegacyWorksheet.html +355 -0
- data/rdoc/RubyXL/MRUColors.html +106 -0
- data/rdoc/RubyXL/MacrosFile.html +122 -0
- data/rdoc/RubyXL/MergedCell.html +106 -0
- data/rdoc/RubyXL/MergedCells.html +106 -0
- data/rdoc/RubyXL/NumFmt.html +106 -0
- data/rdoc/RubyXL/NumberFormat.html +158 -0
- data/rdoc/RubyXL/NumberFormats.html +172 -0
- data/rdoc/RubyXL/OLEObject.html +106 -0
- data/rdoc/RubyXL/OLEObjectFile.html +122 -0
- data/rdoc/RubyXL/OLEObjects.html +106 -0
- data/rdoc/RubyXL/OLESize.html +106 -0
- data/rdoc/RubyXL/OOXMLContainerObject.html +394 -0
- data/rdoc/RubyXL/OOXMLObject.html +118 -0
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +532 -0
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +564 -0
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +603 -0
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +384 -0
- data/rdoc/RubyXL/Offset.html +106 -0
- data/rdoc/RubyXL/OutlineProperties.html +106 -0
- data/rdoc/RubyXL/PageMargins.html +106 -0
- data/rdoc/RubyXL/PageSetup.html +106 -0
- data/rdoc/RubyXL/PageSetupProperties.html +106 -0
- data/rdoc/RubyXL/Pane.html +106 -0
- data/rdoc/RubyXL/Parser.html +204 -0
- data/rdoc/RubyXL/PatternFill.html +106 -0
- data/rdoc/RubyXL/PhoneticProperties.html +106 -0
- data/rdoc/RubyXL/PhoneticRun.html +106 -0
- data/rdoc/RubyXL/PivotArea.html +106 -0
- data/rdoc/RubyXL/PivotCache.html +106 -0
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +133 -0
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +122 -0
- data/rdoc/RubyXL/PivotCaches.html +106 -0
- data/rdoc/RubyXL/PivotReference.html +106 -0
- data/rdoc/RubyXL/PivotReferences.html +106 -0
- data/rdoc/RubyXL/PivotTableFile.html +133 -0
- data/rdoc/RubyXL/PivotTableSelection.html +106 -0
- data/rdoc/RubyXL/PresetGeometry.html +106 -0
- data/rdoc/RubyXL/PrintOptions.html +106 -0
- data/rdoc/RubyXL/PrinterSettingsFile.html +122 -0
- data/rdoc/RubyXL/ProtectedRange.html +106 -0
- data/rdoc/RubyXL/ProtectedRanges.html +106 -0
- data/rdoc/RubyXL/Protection.html +106 -0
- data/rdoc/RubyXL/RID.html +103 -0
- data/rdoc/RubyXL/RawOOXML.html +223 -0
- data/rdoc/RubyXL/Reference.html +640 -0
- data/rdoc/RubyXL/Relationship.html +103 -0
- data/rdoc/RubyXL/RelationshipSupport.html +419 -0
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +148 -0
- data/rdoc/RubyXL/RichText.html +159 -0
- data/rdoc/RubyXL/RichTextRun.html +157 -0
- data/rdoc/RubyXL/Row.html +439 -0
- data/rdoc/RubyXL/RowExt.html +106 -0
- data/rdoc/RubyXL/RunProperties.html +106 -0
- data/rdoc/RubyXL/Scenario.html +106 -0
- data/rdoc/RubyXL/Scenarios.html +106 -0
- data/rdoc/RubyXL/Selection.html +165 -0
- data/rdoc/RubyXL/ShapeGuide.html +106 -0
- data/rdoc/RubyXL/ShapeTextRectangle.html +106 -0
- data/rdoc/RubyXL/SharedStringsTable.html +424 -0
- data/rdoc/RubyXL/Sheet.html +106 -0
- data/rdoc/RubyXL/SheetCalculationProperties.html +106 -0
- data/rdoc/RubyXL/SheetData.html +192 -0
- data/rdoc/RubyXL/SheetDataExt.html +106 -0
- data/rdoc/RubyXL/SheetDataSet.html +106 -0
- data/rdoc/RubyXL/SheetName.html +106 -0
- data/rdoc/RubyXL/SheetNames.html +106 -0
- data/rdoc/RubyXL/Sheets.html +106 -0
- data/rdoc/RubyXL/SlicerCacheFile.html +122 -0
- data/rdoc/RubyXL/SlicerFile.html +122 -0
- data/rdoc/RubyXL/SmartTagProperties.html +106 -0
- data/rdoc/RubyXL/SmartTagType.html +106 -0
- data/rdoc/RubyXL/SmartTagTypes.html +106 -0
- data/rdoc/RubyXL/SmartTags.html +106 -0
- data/rdoc/RubyXL/SortCondition.html +106 -0
- data/rdoc/RubyXL/SortState.html +106 -0
- data/rdoc/RubyXL/Sqref.html +197 -0
- data/rdoc/RubyXL/Stop.html +106 -0
- data/rdoc/RubyXL/StringNode.html +103 -0
- data/rdoc/RubyXL/StringNodeW3C.html +197 -0
- data/rdoc/RubyXL/StringValue.html +103 -0
- data/rdoc/RubyXL/Stylesheet.html +354 -0
- data/rdoc/RubyXL/TableFile.html +122 -0
- data/rdoc/RubyXL/TableParts.html +103 -0
- data/rdoc/RubyXL/TableStyle.html +106 -0
- data/rdoc/RubyXL/TableStyles.html +106 -0
- data/rdoc/RubyXL/Text.html +216 -0
- data/rdoc/RubyXL/Theme.html +535 -0
- data/rdoc/RubyXL/ThemeElements.html +106 -0
- data/rdoc/RubyXL/ThumbnailFile.html +122 -0
- data/rdoc/RubyXL/Top10.html +106 -0
- data/rdoc/RubyXL/VMLDrawingFile.html +134 -0
- data/rdoc/RubyXL/Variant.html +106 -0
- data/rdoc/RubyXL/Vector.html +161 -0
- data/rdoc/RubyXL/VectorValue.html +103 -0
- data/rdoc/RubyXL/VisualProperties.html +106 -0
- data/rdoc/RubyXL/WebPublishObject.html +106 -0
- data/rdoc/RubyXL/WebPublishObjects.html +106 -0
- data/rdoc/RubyXL/WebPublishingItem.html +106 -0
- data/rdoc/RubyXL/WebPublishingItems.html +106 -0
- data/rdoc/RubyXL/WebPublishingProperties.html +106 -0
- data/rdoc/RubyXL/Workbook.html +633 -0
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1321 -0
- data/rdoc/RubyXL/WorkbookProperties.html +106 -0
- data/rdoc/RubyXL/WorkbookProtection.html +106 -0
- data/rdoc/RubyXL/WorkbookRoot.html +402 -0
- data/rdoc/RubyXL/WorkbookView.html +106 -0
- data/rdoc/RubyXL/WorkbookViews.html +106 -0
- data/rdoc/RubyXL/Worksheet.html +433 -0
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2861 -0
- data/rdoc/RubyXL/WorksheetDimensions.html +106 -0
- data/rdoc/RubyXL/WorksheetFormatProperties.html +103 -0
- data/rdoc/RubyXL/WorksheetProperties.html +106 -0
- data/rdoc/RubyXL/WorksheetProtection.html +106 -0
- data/rdoc/RubyXL/WorksheetView.html +106 -0
- data/rdoc/RubyXL/WorksheetViews.html +106 -0
- data/rdoc/RubyXL/XF.html +106 -0
- data/rdoc/created.rid +38 -0
- data/rdoc/css/fonts.css +167 -0
- data/rdoc/css/rdoc.css +590 -0
- data/rdoc/fonts/Lato-Light.ttf +0 -0
- data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +796 -0
- data/rdoc/js/darkfish.js +161 -0
- data/rdoc/js/jquery.js +4 -0
- data/rdoc/js/navigation.js +142 -0
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +109 -0
- data/rdoc/js/search_index.js +1 -0
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +229 -0
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +2758 -0
- data/rubyXL.gemspec +516 -0
- data/spec/lib/cell_spec.rb +515 -0
- data/spec/lib/color_spec.rb +13 -0
- data/spec/lib/parser_spec.rb +118 -0
- data/spec/lib/reference_spec.rb +28 -0
- data/spec/lib/stylesheet_spec.rb +28 -0
- data/spec/lib/text_spec.rb +29 -0
- data/spec/lib/workbook_spec.rb +174 -0
- data/spec/lib/worksheet_spec.rb +1363 -0
- data/spec/spec_helper.rb +11 -0
- data/test/input/.gitkeep +0 -0
- data/test/output/.gitkeep +0 -0
- data/test/test_parse_write.rb +15 -0
- data/tmp/.gitignore +1 -0
- 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
|