rubyXL-ptr 3.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,1321 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module RubyXL::WorkbookConvenienceMethods - rubyXL 3.3.27</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/jquery.js"></script>
|
15
|
+
<script src="../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="module">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Method Quickref -->
|
62
|
+
<div id="method-list-section" class="nav-section">
|
63
|
+
<h3>Methods</h3>
|
64
|
+
|
65
|
+
<ul class="link-list" role="directory">
|
66
|
+
|
67
|
+
<li ><a href="#method-i-5B-5D">#[]</a>
|
68
|
+
|
69
|
+
<li ><a href="#method-i-add_worksheet">#add_worksheet</a>
|
70
|
+
|
71
|
+
<li ><a href="#method-i-application">#application</a>
|
72
|
+
|
73
|
+
<li ><a href="#method-i-application-3D">#application=</a>
|
74
|
+
|
75
|
+
<li ><a href="#method-i-appversion">#appversion</a>
|
76
|
+
|
77
|
+
<li ><a href="#method-i-appversion-3D">#appversion=</a>
|
78
|
+
|
79
|
+
<li ><a href="#method-i-borders">#borders</a>
|
80
|
+
|
81
|
+
<li ><a href="#method-i-cell_xfs">#cell_xfs</a>
|
82
|
+
|
83
|
+
<li ><a href="#method-i-company">#company</a>
|
84
|
+
|
85
|
+
<li ><a href="#method-i-company-3D">#company=</a>
|
86
|
+
|
87
|
+
<li ><a href="#method-i-created_at">#created_at</a>
|
88
|
+
|
89
|
+
<li ><a href="#method-i-created_at-3D">#created_at=</a>
|
90
|
+
|
91
|
+
<li ><a href="#method-i-creator">#creator</a>
|
92
|
+
|
93
|
+
<li ><a href="#method-i-creator-3D">#creator=</a>
|
94
|
+
|
95
|
+
<li ><a href="#method-i-date1904">#date1904</a>
|
96
|
+
|
97
|
+
<li ><a href="#method-i-date1904-3D">#date1904=</a>
|
98
|
+
|
99
|
+
<li ><a href="#method-i-each">#each</a>
|
100
|
+
|
101
|
+
<li ><a href="#method-i-fills">#fills</a>
|
102
|
+
|
103
|
+
<li ><a href="#method-i-fonts">#fonts</a>
|
104
|
+
|
105
|
+
<li ><a href="#method-i-get_fill_color">#get_fill_color</a>
|
106
|
+
|
107
|
+
<li ><a href="#method-i-modified_at">#modified_at</a>
|
108
|
+
|
109
|
+
<li ><a href="#method-i-modified_at-3D">#modified_at=</a>
|
110
|
+
|
111
|
+
<li ><a href="#method-i-modifier">#modifier</a>
|
112
|
+
|
113
|
+
<li ><a href="#method-i-modifier-3D">#modifier=</a>
|
114
|
+
|
115
|
+
<li ><a href="#method-i-modify_alignment">#modify_alignment</a>
|
116
|
+
|
117
|
+
<li ><a href="#method-i-modify_border">#modify_border</a>
|
118
|
+
|
119
|
+
<li ><a href="#method-i-modify_border_color">#modify_border_color</a>
|
120
|
+
|
121
|
+
<li ><a href="#method-i-modify_fill">#modify_fill</a>
|
122
|
+
|
123
|
+
<li ><a href="#method-i-password_hash">#password_hash</a>
|
124
|
+
|
125
|
+
<li ><a href="#method-i-register_new_fill">#register_new_fill</a>
|
126
|
+
|
127
|
+
<li ><a href="#method-i-register_new_font">#register_new_font</a>
|
128
|
+
|
129
|
+
<li ><a href="#method-i-register_new_xf">#register_new_xf</a>
|
130
|
+
|
131
|
+
</ul>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</nav>
|
136
|
+
|
137
|
+
<main role="main" aria-labelledby="module-RubyXL::WorkbookConvenienceMethods">
|
138
|
+
<h1 id="module-RubyXL::WorkbookConvenienceMethods" class="module">
|
139
|
+
module RubyXL::WorkbookConvenienceMethods
|
140
|
+
</h1>
|
141
|
+
|
142
|
+
<section class="description">
|
143
|
+
|
144
|
+
</section>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
<section class="constants-list">
|
156
|
+
<header>
|
157
|
+
<h3>Constants</h3>
|
158
|
+
</header>
|
159
|
+
<dl>
|
160
|
+
|
161
|
+
<dt id="SHEET_NAME_TEMPLATE">SHEET_NAME_TEMPLATE
|
162
|
+
|
163
|
+
<dd>
|
164
|
+
|
165
|
+
|
166
|
+
</dl>
|
167
|
+
</section>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
174
|
+
<header>
|
175
|
+
<h3>Public Instance Methods</h3>
|
176
|
+
</header>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="method-i-5B-5D" class="method-detail ">
|
180
|
+
|
181
|
+
<div class="method-heading">
|
182
|
+
<span class="method-name">[]</span><span
|
183
|
+
class="method-args">(ind)</span>
|
184
|
+
|
185
|
+
<span class="method-click-advice">click to toggle source</span>
|
186
|
+
|
187
|
+
</div>
|
188
|
+
|
189
|
+
|
190
|
+
<div class="method-description">
|
191
|
+
|
192
|
+
<p>Finds worksheet by its name or numerical index</p>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<div class="method-source-code" id="5B-5D-source">
|
198
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 7</span>
|
199
|
+
<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">ind</span>)
|
200
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">ind</span>
|
201
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Integer</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">worksheets</span>[<span class="ruby-identifier">ind</span>]
|
202
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">sheet_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">ind</span> }
|
203
|
+
<span class="ruby-keyword">end</span>
|
204
|
+
<span class="ruby-keyword">end</span></pre>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
|
215
|
+
<div id="method-i-add_worksheet" class="method-detail ">
|
216
|
+
|
217
|
+
<div class="method-heading">
|
218
|
+
<span class="method-name">add_worksheet</span><span
|
219
|
+
class="method-args">(name = nil)</span>
|
220
|
+
|
221
|
+
<span class="method-click-advice">click to toggle source</span>
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
|
226
|
+
<div class="method-description">
|
227
|
+
|
228
|
+
<p>Create new simple worksheet and add it to the workbook worksheets</p>
|
229
|
+
|
230
|
+
<p>@param [String] The name for the new worksheet</p>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<div class="method-source-code" id="add_worksheet-source">
|
236
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 17</span>
|
237
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_worksheet</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
|
238
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
|
239
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-value">0</span>
|
240
|
+
|
241
|
+
<span class="ruby-keyword">begin</span>
|
242
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-constant">SHEET_NAME_TEMPLATE</span> <span class="ruby-operator">%</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>)
|
243
|
+
<span class="ruby-keyword">end</span> <span class="ruby-keyword">until</span> <span class="ruby-keyword">self</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">nil?</span>
|
244
|
+
<span class="ruby-keyword">end</span>
|
245
|
+
|
246
|
+
<span class="ruby-identifier">new_worksheet</span> = <span class="ruby-constant">Worksheet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:workbook</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>, <span class="ruby-value">:sheet_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>)
|
247
|
+
<span class="ruby-identifier">worksheets</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_worksheet</span>
|
248
|
+
<span class="ruby-identifier">new_worksheet</span>
|
249
|
+
<span class="ruby-keyword">end</span></pre>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
</div>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</div>
|
258
|
+
|
259
|
+
|
260
|
+
<div id="method-i-application" class="method-detail ">
|
261
|
+
|
262
|
+
<div class="method-heading">
|
263
|
+
<span class="method-name">application</span><span
|
264
|
+
class="method-args">()</span>
|
265
|
+
|
266
|
+
<span class="method-click-advice">click to toggle source</span>
|
267
|
+
|
268
|
+
</div>
|
269
|
+
|
270
|
+
|
271
|
+
<div class="method-description">
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
<div class="method-source-code" id="application-source">
|
279
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 53</span>
|
280
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application</span>
|
281
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">value</span>
|
282
|
+
<span class="ruby-keyword">end</span></pre>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</div>
|
291
|
+
|
292
|
+
|
293
|
+
<div id="method-i-application-3D" class="method-detail ">
|
294
|
+
|
295
|
+
<div class="method-heading">
|
296
|
+
<span class="method-name">application=</span><span
|
297
|
+
class="method-args">(v)</span>
|
298
|
+
|
299
|
+
<span class="method-click-advice">click to toggle source</span>
|
300
|
+
|
301
|
+
</div>
|
302
|
+
|
303
|
+
|
304
|
+
<div class="method-description">
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
<div class="method-source-code" id="application-3D-source">
|
312
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 57</span>
|
313
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application=</span>(<span class="ruby-identifier">v</span>)
|
314
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
|
315
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
|
316
|
+
<span class="ruby-keyword">end</span></pre>
|
317
|
+
</div>
|
318
|
+
|
319
|
+
</div>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
</div>
|
325
|
+
|
326
|
+
|
327
|
+
<div id="method-i-appversion" class="method-detail ">
|
328
|
+
|
329
|
+
<div class="method-heading">
|
330
|
+
<span class="method-name">appversion</span><span
|
331
|
+
class="method-args">()</span>
|
332
|
+
|
333
|
+
<span class="method-click-advice">click to toggle source</span>
|
334
|
+
|
335
|
+
</div>
|
336
|
+
|
337
|
+
|
338
|
+
<div class="method-description">
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<div class="method-source-code" id="appversion-source">
|
346
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 62</span>
|
347
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appversion</span>
|
348
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span>.<span class="ruby-identifier">value</span>
|
349
|
+
<span class="ruby-keyword">end</span></pre>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
</div>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</div>
|
358
|
+
|
359
|
+
|
360
|
+
<div id="method-i-appversion-3D" class="method-detail ">
|
361
|
+
|
362
|
+
<div class="method-heading">
|
363
|
+
<span class="method-name">appversion=</span><span
|
364
|
+
class="method-args">(v)</span>
|
365
|
+
|
366
|
+
<span class="method-click-advice">click to toggle source</span>
|
367
|
+
|
368
|
+
</div>
|
369
|
+
|
370
|
+
|
371
|
+
<div class="method-description">
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
<div class="method-source-code" id="appversion-3D-source">
|
379
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 66</span>
|
380
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appversion=</span>(<span class="ruby-identifier">v</span>)
|
381
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
|
382
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
|
383
|
+
<span class="ruby-keyword">end</span></pre>
|
384
|
+
</div>
|
385
|
+
|
386
|
+
</div>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
</div>
|
392
|
+
|
393
|
+
|
394
|
+
<div id="method-i-borders" class="method-detail ">
|
395
|
+
|
396
|
+
<div class="method-heading">
|
397
|
+
<span class="method-name">borders</span><span
|
398
|
+
class="method-args">()</span>
|
399
|
+
|
400
|
+
<span class="method-click-advice">click to toggle source</span>
|
401
|
+
|
402
|
+
</div>
|
403
|
+
|
404
|
+
|
405
|
+
<div class="method-description">
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
<div class="method-source-code" id="borders-source">
|
413
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 115</span>
|
414
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">borders</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
415
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">borders</span>
|
416
|
+
<span class="ruby-keyword">end</span></pre>
|
417
|
+
</div>
|
418
|
+
|
419
|
+
</div>
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</div>
|
425
|
+
|
426
|
+
|
427
|
+
<div id="method-i-cell_xfs" class="method-detail ">
|
428
|
+
|
429
|
+
<div class="method-heading">
|
430
|
+
<span class="method-name">cell_xfs</span><span
|
431
|
+
class="method-args">()</span>
|
432
|
+
|
433
|
+
<span class="method-click-advice">click to toggle source</span>
|
434
|
+
|
435
|
+
</div>
|
436
|
+
|
437
|
+
|
438
|
+
<div class="method-description">
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
<div class="method-source-code" id="cell_xfs-source">
|
446
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 103</span>
|
447
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cell_xfs</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
448
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">cell_xfs</span>
|
449
|
+
<span class="ruby-keyword">end</span></pre>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
</div>
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
</div>
|
458
|
+
|
459
|
+
|
460
|
+
<div id="method-i-company" class="method-detail ">
|
461
|
+
|
462
|
+
<div class="method-heading">
|
463
|
+
<span class="method-name">company</span><span
|
464
|
+
class="method-args">()</span>
|
465
|
+
|
466
|
+
<span class="method-click-advice">click to toggle source</span>
|
467
|
+
|
468
|
+
</div>
|
469
|
+
|
470
|
+
|
471
|
+
<div class="method-description">
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
<div class="method-source-code" id="company-source">
|
479
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 44</span>
|
480
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">company</span>
|
481
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span>.<span class="ruby-identifier">value</span>
|
482
|
+
<span class="ruby-keyword">end</span></pre>
|
483
|
+
</div>
|
484
|
+
|
485
|
+
</div>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
</div>
|
491
|
+
|
492
|
+
|
493
|
+
<div id="method-i-company-3D" class="method-detail ">
|
494
|
+
|
495
|
+
<div class="method-heading">
|
496
|
+
<span class="method-name">company=</span><span
|
497
|
+
class="method-args">(v)</span>
|
498
|
+
|
499
|
+
<span class="method-click-advice">click to toggle source</span>
|
500
|
+
|
501
|
+
</div>
|
502
|
+
|
503
|
+
|
504
|
+
<div class="method-description">
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
<div class="method-source-code" id="company-3D-source">
|
512
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 48</span>
|
513
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">company=</span>(<span class="ruby-identifier">v</span>)
|
514
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
|
515
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
|
516
|
+
<span class="ruby-keyword">end</span></pre>
|
517
|
+
</div>
|
518
|
+
|
519
|
+
</div>
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
</div>
|
525
|
+
|
526
|
+
|
527
|
+
<div id="method-i-created_at" class="method-detail ">
|
528
|
+
|
529
|
+
<div class="method-heading">
|
530
|
+
<span class="method-name">created_at</span><span
|
531
|
+
class="method-args">()</span>
|
532
|
+
|
533
|
+
<span class="method-click-advice">click to toggle source</span>
|
534
|
+
|
535
|
+
</div>
|
536
|
+
|
537
|
+
|
538
|
+
<div class="method-description">
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
<div class="method-source-code" id="created_at-source">
|
546
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 87</span>
|
547
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created_at</span>
|
548
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span>
|
549
|
+
<span class="ruby-keyword">end</span></pre>
|
550
|
+
</div>
|
551
|
+
|
552
|
+
</div>
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
</div>
|
558
|
+
|
559
|
+
|
560
|
+
<div id="method-i-created_at-3D" class="method-detail ">
|
561
|
+
|
562
|
+
<div class="method-heading">
|
563
|
+
<span class="method-name">created_at=</span><span
|
564
|
+
class="method-args">(v)</span>
|
565
|
+
|
566
|
+
<span class="method-click-advice">click to toggle source</span>
|
567
|
+
|
568
|
+
</div>
|
569
|
+
|
570
|
+
|
571
|
+
<div class="method-description">
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
<div class="method-source-code" id="created_at-3D-source">
|
579
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 91</span>
|
580
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created_at=</span>(<span class="ruby-identifier">v</span>)
|
581
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span> = <span class="ruby-identifier">v</span>
|
582
|
+
<span class="ruby-keyword">end</span></pre>
|
583
|
+
</div>
|
584
|
+
|
585
|
+
</div>
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
</div>
|
591
|
+
|
592
|
+
|
593
|
+
<div id="method-i-creator" class="method-detail ">
|
594
|
+
|
595
|
+
<div class="method-heading">
|
596
|
+
<span class="method-name">creator</span><span
|
597
|
+
class="method-args">()</span>
|
598
|
+
|
599
|
+
<span class="method-click-advice">click to toggle source</span>
|
600
|
+
|
601
|
+
</div>
|
602
|
+
|
603
|
+
|
604
|
+
<div class="method-description">
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
<div class="method-source-code" id="creator-source">
|
612
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 71</span>
|
613
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">creator</span>
|
614
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span>
|
615
|
+
<span class="ruby-keyword">end</span></pre>
|
616
|
+
</div>
|
617
|
+
|
618
|
+
</div>
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
</div>
|
624
|
+
|
625
|
+
|
626
|
+
<div id="method-i-creator-3D" class="method-detail ">
|
627
|
+
|
628
|
+
<div class="method-heading">
|
629
|
+
<span class="method-name">creator=</span><span
|
630
|
+
class="method-args">(v)</span>
|
631
|
+
|
632
|
+
<span class="method-click-advice">click to toggle source</span>
|
633
|
+
|
634
|
+
</div>
|
635
|
+
|
636
|
+
|
637
|
+
<div class="method-description">
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
<div class="method-source-code" id="creator-3D-source">
|
645
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 75</span>
|
646
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">creator=</span>(<span class="ruby-identifier">v</span>)
|
647
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span> = <span class="ruby-identifier">v</span>
|
648
|
+
<span class="ruby-keyword">end</span></pre>
|
649
|
+
</div>
|
650
|
+
|
651
|
+
</div>
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
</div>
|
657
|
+
|
658
|
+
|
659
|
+
<div id="method-i-date1904" class="method-detail ">
|
660
|
+
|
661
|
+
<div class="method-heading">
|
662
|
+
<span class="method-name">date1904</span><span
|
663
|
+
class="method-args">()</span>
|
664
|
+
|
665
|
+
<span class="method-click-advice">click to toggle source</span>
|
666
|
+
|
667
|
+
</div>
|
668
|
+
|
669
|
+
|
670
|
+
<div class="method-description">
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
<div class="method-source-code" id="date1904-source">
|
678
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 35</span>
|
679
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">date1904</span>
|
680
|
+
<span class="ruby-identifier">workbook_properties</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span>
|
681
|
+
<span class="ruby-keyword">end</span></pre>
|
682
|
+
</div>
|
683
|
+
|
684
|
+
</div>
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
</div>
|
690
|
+
|
691
|
+
|
692
|
+
<div id="method-i-date1904-3D" class="method-detail ">
|
693
|
+
|
694
|
+
<div class="method-heading">
|
695
|
+
<span class="method-name">date1904=</span><span
|
696
|
+
class="method-args">(v)</span>
|
697
|
+
|
698
|
+
<span class="method-click-advice">click to toggle source</span>
|
699
|
+
|
700
|
+
</div>
|
701
|
+
|
702
|
+
|
703
|
+
<div class="method-description">
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
<div class="method-source-code" id="date1904-3D-source">
|
711
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 39</span>
|
712
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">date1904=</span>(<span class="ruby-identifier">v</span>)
|
713
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">workbook_properties</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkbookProperties</span>.<span class="ruby-identifier">new</span>
|
714
|
+
<span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span> = <span class="ruby-identifier">v</span>
|
715
|
+
<span class="ruby-keyword">end</span></pre>
|
716
|
+
</div>
|
717
|
+
|
718
|
+
</div>
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
</div>
|
724
|
+
|
725
|
+
|
726
|
+
<div id="method-i-each" class="method-detail ">
|
727
|
+
|
728
|
+
<div class="method-heading">
|
729
|
+
<span class="method-name">each</span><span
|
730
|
+
class="method-args">() { |i| ... }</span>
|
731
|
+
|
732
|
+
<span class="method-click-advice">click to toggle source</span>
|
733
|
+
|
734
|
+
</div>
|
735
|
+
|
736
|
+
|
737
|
+
<div class="method-description">
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
<div class="method-source-code" id="each-source">
|
745
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 31</span>
|
746
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
|
747
|
+
<span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">i</span> }
|
748
|
+
<span class="ruby-keyword">end</span></pre>
|
749
|
+
</div>
|
750
|
+
|
751
|
+
</div>
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
</div>
|
757
|
+
|
758
|
+
|
759
|
+
<div id="method-i-fills" class="method-detail ">
|
760
|
+
|
761
|
+
<div class="method-heading">
|
762
|
+
<span class="method-name">fills</span><span
|
763
|
+
class="method-args">()</span>
|
764
|
+
|
765
|
+
<span class="method-click-advice">click to toggle source</span>
|
766
|
+
|
767
|
+
</div>
|
768
|
+
|
769
|
+
|
770
|
+
<div class="method-description">
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
<div class="method-source-code" id="fills-source">
|
778
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 111</span>
|
779
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">fills</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
780
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">fills</span>
|
781
|
+
<span class="ruby-keyword">end</span></pre>
|
782
|
+
</div>
|
783
|
+
|
784
|
+
</div>
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
|
789
|
+
</div>
|
790
|
+
|
791
|
+
|
792
|
+
<div id="method-i-fonts" class="method-detail ">
|
793
|
+
|
794
|
+
<div class="method-heading">
|
795
|
+
<span class="method-name">fonts</span><span
|
796
|
+
class="method-args">()</span>
|
797
|
+
|
798
|
+
<span class="method-click-advice">click to toggle source</span>
|
799
|
+
|
800
|
+
</div>
|
801
|
+
|
802
|
+
|
803
|
+
<div class="method-description">
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
<div class="method-source-code" id="fonts-source">
|
811
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 107</span>
|
812
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">fonts</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
813
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">fonts</span>
|
814
|
+
<span class="ruby-keyword">end</span></pre>
|
815
|
+
</div>
|
816
|
+
|
817
|
+
</div>
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
</div>
|
823
|
+
|
824
|
+
|
825
|
+
<div id="method-i-get_fill_color" class="method-detail ">
|
826
|
+
|
827
|
+
<div class="method-heading">
|
828
|
+
<span class="method-name">get_fill_color</span><span
|
829
|
+
class="method-args">(xf)</span>
|
830
|
+
|
831
|
+
<span class="method-click-advice">click to toggle source</span>
|
832
|
+
|
833
|
+
</div>
|
834
|
+
|
835
|
+
|
836
|
+
<div class="method-description">
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
<div class="method-source-code" id="get_fill_color-source">
|
844
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 119</span>
|
845
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_fill_color</span>(<span class="ruby-identifier">xf</span>)
|
846
|
+
<span class="ruby-identifier">fill</span> = <span class="ruby-identifier">fills</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">fill_id</span>]
|
847
|
+
<span class="ruby-identifier">pattern</span> = <span class="ruby-identifier">fill</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">fill</span>.<span class="ruby-identifier">pattern_fill</span>
|
848
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">pattern</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">pattern</span>.<span class="ruby-identifier">fg_color</span>
|
849
|
+
<span class="ruby-identifier">color</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span> <span class="ruby-operator">||</span> <span class="ruby-string">'ffffff'</span>
|
850
|
+
<span class="ruby-keyword">end</span></pre>
|
851
|
+
</div>
|
852
|
+
|
853
|
+
</div>
|
854
|
+
|
855
|
+
|
856
|
+
|
857
|
+
|
858
|
+
</div>
|
859
|
+
|
860
|
+
|
861
|
+
<div id="method-i-modified_at" class="method-detail ">
|
862
|
+
|
863
|
+
<div class="method-heading">
|
864
|
+
<span class="method-name">modified_at</span><span
|
865
|
+
class="method-args">()</span>
|
866
|
+
|
867
|
+
<span class="method-click-advice">click to toggle source</span>
|
868
|
+
|
869
|
+
</div>
|
870
|
+
|
871
|
+
|
872
|
+
<div class="method-description">
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
<div class="method-source-code" id="modified_at-source">
|
880
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 95</span>
|
881
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modified_at</span>
|
882
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span>
|
883
|
+
<span class="ruby-keyword">end</span></pre>
|
884
|
+
</div>
|
885
|
+
|
886
|
+
</div>
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
</div>
|
892
|
+
|
893
|
+
|
894
|
+
<div id="method-i-modified_at-3D" class="method-detail ">
|
895
|
+
|
896
|
+
<div class="method-heading">
|
897
|
+
<span class="method-name">modified_at=</span><span
|
898
|
+
class="method-args">(v)</span>
|
899
|
+
|
900
|
+
<span class="method-click-advice">click to toggle source</span>
|
901
|
+
|
902
|
+
</div>
|
903
|
+
|
904
|
+
|
905
|
+
<div class="method-description">
|
906
|
+
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
<div class="method-source-code" id="modified_at-3D-source">
|
913
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 99</span>
|
914
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modified_at=</span>(<span class="ruby-identifier">v</span>)
|
915
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span> = <span class="ruby-identifier">v</span>
|
916
|
+
<span class="ruby-keyword">end</span></pre>
|
917
|
+
</div>
|
918
|
+
|
919
|
+
</div>
|
920
|
+
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
</div>
|
925
|
+
|
926
|
+
|
927
|
+
<div id="method-i-modifier" class="method-detail ">
|
928
|
+
|
929
|
+
<div class="method-heading">
|
930
|
+
<span class="method-name">modifier</span><span
|
931
|
+
class="method-args">()</span>
|
932
|
+
|
933
|
+
<span class="method-click-advice">click to toggle source</span>
|
934
|
+
|
935
|
+
</div>
|
936
|
+
|
937
|
+
|
938
|
+
<div class="method-description">
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
|
945
|
+
<div class="method-source-code" id="modifier-source">
|
946
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 79</span>
|
947
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modifier</span>
|
948
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span>
|
949
|
+
<span class="ruby-keyword">end</span></pre>
|
950
|
+
</div>
|
951
|
+
|
952
|
+
</div>
|
953
|
+
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
</div>
|
958
|
+
|
959
|
+
|
960
|
+
<div id="method-i-modifier-3D" class="method-detail ">
|
961
|
+
|
962
|
+
<div class="method-heading">
|
963
|
+
<span class="method-name">modifier=</span><span
|
964
|
+
class="method-args">(v)</span>
|
965
|
+
|
966
|
+
<span class="method-click-advice">click to toggle source</span>
|
967
|
+
|
968
|
+
</div>
|
969
|
+
|
970
|
+
|
971
|
+
<div class="method-description">
|
972
|
+
|
973
|
+
|
974
|
+
|
975
|
+
|
976
|
+
|
977
|
+
|
978
|
+
<div class="method-source-code" id="modifier-3D-source">
|
979
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 83</span>
|
980
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modifier=</span>(<span class="ruby-identifier">v</span>)
|
981
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span> = <span class="ruby-identifier">v</span>
|
982
|
+
<span class="ruby-keyword">end</span></pre>
|
983
|
+
</div>
|
984
|
+
|
985
|
+
</div>
|
986
|
+
|
987
|
+
|
988
|
+
|
989
|
+
|
990
|
+
</div>
|
991
|
+
|
992
|
+
|
993
|
+
<div id="method-i-modify_alignment" class="method-detail ">
|
994
|
+
|
995
|
+
<div class="method-heading">
|
996
|
+
<span class="method-name">modify_alignment</span><span
|
997
|
+
class="method-args">(style_index) { |alignment| ... }</span>
|
998
|
+
|
999
|
+
<span class="method-click-advice">click to toggle source</span>
|
1000
|
+
|
1001
|
+
</div>
|
1002
|
+
|
1003
|
+
|
1004
|
+
<div class="method-description">
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
<div class="method-source-code" id="modify_alignment-source">
|
1012
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 151</span>
|
1013
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1014
|
+
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
1015
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Alignment</span>.<span class="ruby-identifier">new</span>
|
1016
|
+
<span class="ruby-keyword">yield</span>(<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span>)
|
1017
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">apply_alignment</span> = <span class="ruby-keyword">true</span>
|
1018
|
+
|
1019
|
+
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
1020
|
+
<span class="ruby-keyword">end</span></pre>
|
1021
|
+
</div>
|
1022
|
+
|
1023
|
+
</div>
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
</div>
|
1029
|
+
|
1030
|
+
|
1031
|
+
<div id="method-i-modify_border" class="method-detail ">
|
1032
|
+
|
1033
|
+
<div class="method-heading">
|
1034
|
+
<span class="method-name">modify_border</span><span
|
1035
|
+
class="method-args">(style_index, direction, weight)</span>
|
1036
|
+
|
1037
|
+
<span class="method-click-advice">click to toggle source</span>
|
1038
|
+
|
1039
|
+
</div>
|
1040
|
+
|
1041
|
+
|
1042
|
+
<div class="method-description">
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
<div class="method-source-code" id="modify_border-source">
|
1050
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 168</span>
|
1051
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
1052
|
+
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
1053
|
+
<span class="ruby-identifier">new_border</span> = <span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
1054
|
+
|
1055
|
+
<span class="ruby-identifier">edge</span> = <span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">direction</span>)
|
1056
|
+
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{direction}="</span>, <span class="ruby-identifier">edge</span>.<span class="ruby-identifier">dup</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">edge</span>
|
1057
|
+
|
1058
|
+
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">set_edge_style</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
1059
|
+
|
1060
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> = <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_border</span> } <span class="ruby-comment"># Reuse existing border, if it exists</span>
|
1061
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this border has never existed before, add it to collection.</span>
|
1062
|
+
<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>] = <span class="ruby-identifier">new_border</span>
|
1063
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">apply_border</span> = <span class="ruby-keyword">true</span>
|
1064
|
+
|
1065
|
+
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
1066
|
+
<span class="ruby-keyword">end</span></pre>
|
1067
|
+
</div>
|
1068
|
+
|
1069
|
+
</div>
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
|
1074
|
+
</div>
|
1075
|
+
|
1076
|
+
|
1077
|
+
<div id="method-i-modify_border_color" class="method-detail ">
|
1078
|
+
|
1079
|
+
<div class="method-heading">
|
1080
|
+
<span class="method-name">modify_border_color</span><span
|
1081
|
+
class="method-args">(style_index, direction, color)</span>
|
1082
|
+
|
1083
|
+
<span class="method-click-advice">click to toggle source</span>
|
1084
|
+
|
1085
|
+
</div>
|
1086
|
+
|
1087
|
+
|
1088
|
+
<div class="method-description">
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
<div class="method-source-code" id="modify_border_color-source">
|
1096
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 185</span>
|
1097
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_border_color</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
1098
|
+
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
1099
|
+
<span class="ruby-identifier">new_border</span> = <span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
1100
|
+
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">set_edge_color</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
1101
|
+
|
1102
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> = <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_border</span> } <span class="ruby-comment"># Reuse existing border, if it exists</span>
|
1103
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this border has never existed before, add it to collection.</span>
|
1104
|
+
<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>] = <span class="ruby-identifier">new_border</span>
|
1105
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">apply_border</span> = <span class="ruby-keyword">true</span>
|
1106
|
+
|
1107
|
+
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
1108
|
+
<span class="ruby-keyword">end</span></pre>
|
1109
|
+
</div>
|
1110
|
+
|
1111
|
+
</div>
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
|
1116
|
+
</div>
|
1117
|
+
|
1118
|
+
|
1119
|
+
<div id="method-i-modify_fill" class="method-detail ">
|
1120
|
+
|
1121
|
+
<div class="method-heading">
|
1122
|
+
<span class="method-name">modify_fill</span><span
|
1123
|
+
class="method-args">(style_index, rgb)</span>
|
1124
|
+
|
1125
|
+
<span class="method-click-advice">click to toggle source</span>
|
1126
|
+
|
1127
|
+
</div>
|
1128
|
+
|
1129
|
+
|
1130
|
+
<div class="method-description">
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
<div class="method-source-code" id="modify_fill-source">
|
1138
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 160</span>
|
1139
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">rgb</span>)
|
1140
|
+
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
1141
|
+
<span class="ruby-identifier">new_fill</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Fill</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:pattern_fill</span> =<span class="ruby-operator">></span>
|
1142
|
+
<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">PatternFill</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:pattern_type</span> =<span class="ruby-operator">></span> <span class="ruby-string">'solid'</span>,
|
1143
|
+
<span class="ruby-value">:fg_color</span> =<span class="ruby-operator">></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:rgb</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">rgb</span>)))
|
1144
|
+
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">register_new_fill</span>(<span class="ruby-identifier">new_fill</span>, <span class="ruby-identifier">xf</span>))
|
1145
|
+
<span class="ruby-keyword">end</span></pre>
|
1146
|
+
</div>
|
1147
|
+
|
1148
|
+
</div>
|
1149
|
+
|
1150
|
+
|
1151
|
+
|
1152
|
+
|
1153
|
+
</div>
|
1154
|
+
|
1155
|
+
|
1156
|
+
<div id="method-i-password_hash" class="method-detail ">
|
1157
|
+
|
1158
|
+
<div class="method-heading">
|
1159
|
+
<span class="method-name">password_hash</span><span
|
1160
|
+
class="method-args">(pwd)</span>
|
1161
|
+
|
1162
|
+
<span class="method-click-advice">click to toggle source</span>
|
1163
|
+
|
1164
|
+
</div>
|
1165
|
+
|
1166
|
+
|
1167
|
+
<div class="method-description">
|
1168
|
+
|
1169
|
+
<p>Calculate password hash from string for use in 'password' fields.
|
1170
|
+
<a
|
1171
|
+
href="https://www.openoffice.org/sc/excelfileformat.pdf">www.openoffice.org/sc/excelfileformat.pdf</a></p>
|
1172
|
+
|
1173
|
+
|
1174
|
+
|
1175
|
+
|
1176
|
+
<div class="method-source-code" id="password_hash-source">
|
1177
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 200</span>
|
1178
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">password_hash</span>(<span class="ruby-identifier">pwd</span>)
|
1179
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-value">0</span>
|
1180
|
+
<span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each_char</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
1181
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-identifier">hsh</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">ord</span>
|
1182
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-identifier">hsh</span> <span class="ruby-operator"><<</span> <span class="ruby-value">1</span>
|
1183
|
+
<span class="ruby-identifier">hsh</span> <span class="ruby-operator">-=</span> <span class="ruby-value">0x7fff</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">hsh</span> <span class="ruby-operator">></span> <span class="ruby-value">0x7fff</span>
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
(<span class="ruby-identifier">hsh</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">^</span> <span class="ruby-value">0xCE4B</span>).<span class="ruby-identifier">to_s</span>(<span class="ruby-value">16</span>)
|
1187
|
+
<span class="ruby-keyword">end</span></pre>
|
1188
|
+
</div>
|
1189
|
+
|
1190
|
+
</div>
|
1191
|
+
|
1192
|
+
|
1193
|
+
|
1194
|
+
|
1195
|
+
</div>
|
1196
|
+
|
1197
|
+
|
1198
|
+
<div id="method-i-register_new_fill" class="method-detail ">
|
1199
|
+
|
1200
|
+
<div class="method-heading">
|
1201
|
+
<span class="method-name">register_new_fill</span><span
|
1202
|
+
class="method-args">(new_fill, old_xf)</span>
|
1203
|
+
|
1204
|
+
<span class="method-click-advice">click to toggle source</span>
|
1205
|
+
|
1206
|
+
</div>
|
1207
|
+
|
1208
|
+
|
1209
|
+
<div class="method-description">
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
<div class="method-source-code" id="register_new_fill-source">
|
1217
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 126</span>
|
1218
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_fill</span>(<span class="ruby-identifier">new_fill</span>, <span class="ruby-identifier">old_xf</span>)
|
1219
|
+
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
1220
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">apply_fill</span> = <span class="ruby-keyword">true</span>
|
1221
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">fill_id</span> = <span class="ruby-identifier">fills</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_fill</span> } <span class="ruby-comment"># Reuse existing fill, if it exists</span>
|
1222
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">fill_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">fills</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this fill has never existed before, add it to collection.</span>
|
1223
|
+
<span class="ruby-identifier">fills</span>[<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">fill_id</span>] = <span class="ruby-identifier">new_fill</span>
|
1224
|
+
<span class="ruby-identifier">new_xf</span>
|
1225
|
+
<span class="ruby-keyword">end</span></pre>
|
1226
|
+
</div>
|
1227
|
+
|
1228
|
+
</div>
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
|
1233
|
+
</div>
|
1234
|
+
|
1235
|
+
|
1236
|
+
<div id="method-i-register_new_font" class="method-detail ">
|
1237
|
+
|
1238
|
+
<div class="method-heading">
|
1239
|
+
<span class="method-name">register_new_font</span><span
|
1240
|
+
class="method-args">(new_font, old_xf)</span>
|
1241
|
+
|
1242
|
+
<span class="method-click-advice">click to toggle source</span>
|
1243
|
+
|
1244
|
+
</div>
|
1245
|
+
|
1246
|
+
|
1247
|
+
<div class="method-description">
|
1248
|
+
|
1249
|
+
|
1250
|
+
|
1251
|
+
|
1252
|
+
|
1253
|
+
|
1254
|
+
<div class="method-source-code" id="register_new_font-source">
|
1255
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 135</span>
|
1256
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">new_font</span>, <span class="ruby-identifier">old_xf</span>)
|
1257
|
+
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
1258
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">font_id</span> = <span class="ruby-identifier">fonts</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_font</span> } <span class="ruby-comment"># Reuse existing font, if it exists</span>
|
1259
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">font_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">fonts</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this font has never existed before, add it to collection.</span>
|
1260
|
+
<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">font_id</span>] = <span class="ruby-identifier">new_font</span>
|
1261
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">apply_font</span> = <span class="ruby-keyword">true</span>
|
1262
|
+
<span class="ruby-identifier">new_xf</span>
|
1263
|
+
<span class="ruby-keyword">end</span></pre>
|
1264
|
+
</div>
|
1265
|
+
|
1266
|
+
</div>
|
1267
|
+
|
1268
|
+
|
1269
|
+
|
1270
|
+
|
1271
|
+
</div>
|
1272
|
+
|
1273
|
+
|
1274
|
+
<div id="method-i-register_new_xf" class="method-detail ">
|
1275
|
+
|
1276
|
+
<div class="method-heading">
|
1277
|
+
<span class="method-name">register_new_xf</span><span
|
1278
|
+
class="method-args">(new_xf)</span>
|
1279
|
+
|
1280
|
+
<span class="method-click-advice">click to toggle source</span>
|
1281
|
+
|
1282
|
+
</div>
|
1283
|
+
|
1284
|
+
|
1285
|
+
<div class="method-description">
|
1286
|
+
|
1287
|
+
|
1288
|
+
|
1289
|
+
|
1290
|
+
|
1291
|
+
|
1292
|
+
<div class="method-source-code" id="register_new_xf-source">
|
1293
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 144</span>
|
1294
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
1295
|
+
<span class="ruby-identifier">new_xf_id</span> = <span class="ruby-identifier">cell_xfs</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">xf</span><span class="ruby-operator">|</span> <span class="ruby-identifier">xf</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_xf</span> } <span class="ruby-comment"># Reuse existing XF, if it exists</span>
|
1296
|
+
<span class="ruby-identifier">new_xf_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">cell_xfs</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this XF has never existed before, add it to collection.</span>
|
1297
|
+
<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">new_xf_id</span>] = <span class="ruby-identifier">new_xf</span>
|
1298
|
+
<span class="ruby-identifier">new_xf_id</span>
|
1299
|
+
<span class="ruby-keyword">end</span></pre>
|
1300
|
+
</div>
|
1301
|
+
|
1302
|
+
</div>
|
1303
|
+
|
1304
|
+
|
1305
|
+
|
1306
|
+
|
1307
|
+
</div>
|
1308
|
+
|
1309
|
+
|
1310
|
+
</section>
|
1311
|
+
|
1312
|
+
</section>
|
1313
|
+
</main>
|
1314
|
+
|
1315
|
+
|
1316
|
+
<footer id="validator-badges" role="contentinfo">
|
1317
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
1318
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
1319
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
1320
|
+
</footer>
|
1321
|
+
|