rubyXL 3.4.39 → 3.4.40
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 +4 -4
- data/Rakefile +107 -14
- data/VERSION +1 -1
- data/bin/console +10 -0
- data/bin/setup +3 -0
- data/lib/rubyXL/convenience_methods/cell.rb +6 -3
- data/lib/rubyXL/version.rb +3 -0
- data/lib/rubyXL.rb +1 -0
- data/rubyXL.gemspec +10 -482
- metadata +27 -430
- data/.circleci/config.yml +0 -71
- data/.codeclimate.yml +0 -3
- data/.rubocop.yml +0 -124
- data/CHANGELOG.md +0 -12
- data/Gemfile +0 -23
- data/rdoc/README_rdoc.html +0 -871
- data/rdoc/RubyXL/AExtension.html +0 -703
- data/rdoc/RubyXL/AExtensionStorageArea.html +0 -543
- data/rdoc/RubyXL/ActiveX.html +0 -654
- data/rdoc/RubyXL/ActiveXBinary.html +0 -560
- data/rdoc/RubyXL/AdjustHandleList.html +0 -539
- data/rdoc/RubyXL/Alignment.html +0 -539
- data/rdoc/RubyXL/AlternateContent.html +0 -543
- data/rdoc/RubyXL/AlternateUrls.html +0 -539
- data/rdoc/RubyXL/Authors.html +0 -539
- data/rdoc/RubyXL/AutoFilter.html +0 -539
- data/rdoc/RubyXL/AutoFilterColumn.html +0 -539
- data/rdoc/RubyXL/BinaryImageFile.html +0 -568
- data/rdoc/RubyXL/BodyProperties.html +0 -539
- data/rdoc/RubyXL/BooleanNode.html +0 -543
- data/rdoc/RubyXL/BooleanValue.html +0 -543
- data/rdoc/RubyXL/Border.html +0 -759
- data/rdoc/RubyXL/BorderEdge.html +0 -656
- data/rdoc/RubyXL/Borders.html +0 -608
- data/rdoc/RubyXL/Break.html +0 -539
- data/rdoc/RubyXL/BreakList.html +0 -539
- data/rdoc/RubyXL/CT_AdjPoint2D.html +0 -539
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +0 -539
- data/rdoc/RubyXL/CT_Backdrop.html +0 -539
- data/rdoc/RubyXL/CT_Bevel.html +0 -539
- data/rdoc/RubyXL/CT_BiLevelEffect.html +0 -539
- data/rdoc/RubyXL/CT_BlendEffect.html +0 -539
- data/rdoc/RubyXL/CT_Blip.html +0 -539
- data/rdoc/RubyXL/CT_BlipFillProperties.html +0 -539
- data/rdoc/RubyXL/CT_BlurEffect.html +0 -539
- data/rdoc/RubyXL/CT_Camera.html +0 -539
- data/rdoc/RubyXL/CT_Color.html +0 -539
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +0 -539
- data/rdoc/RubyXL/CT_ColorMapping.html +0 -539
- data/rdoc/RubyXL/CT_ColorScheme.html +0 -539
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +0 -539
- data/rdoc/RubyXL/CT_ConnectionSite.html +0 -539
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +0 -539
- data/rdoc/RubyXL/CT_DashStop.html +0 -539
- data/rdoc/RubyXL/CT_DashStopList.html +0 -539
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +0 -539
- data/rdoc/RubyXL/CT_DuotoneEffect.html +0 -539
- data/rdoc/RubyXL/CT_EffectContainer.html +0 -539
- data/rdoc/RubyXL/CT_EffectList.html +0 -539
- data/rdoc/RubyXL/CT_EffectReference.html +0 -539
- data/rdoc/RubyXL/CT_EffectStyleItem.html +0 -539
- data/rdoc/RubyXL/CT_EffectStyleList.html +0 -539
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +0 -539
- data/rdoc/RubyXL/CT_FillEffect.html +0 -539
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +0 -539
- data/rdoc/RubyXL/CT_FillStyleList.html +0 -539
- data/rdoc/RubyXL/CT_FlatText.html +0 -539
- data/rdoc/RubyXL/CT_FontCollection.html +0 -539
- data/rdoc/RubyXL/CT_FontReference.html +0 -539
- data/rdoc/RubyXL/CT_GeomGuideList.html +0 -539
- data/rdoc/RubyXL/CT_GlowEffect.html +0 -539
- data/rdoc/RubyXL/CT_GradientFillProperties.html +0 -539
- data/rdoc/RubyXL/CT_GradientStop.html +0 -539
- data/rdoc/RubyXL/CT_GradientStopList.html +0 -539
- data/rdoc/RubyXL/CT_HSLEffect.html +0 -539
- data/rdoc/RubyXL/CT_HslColor.html +0 -539
- data/rdoc/RubyXL/CT_Hyperlink.html +0 -539
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +0 -539
- data/rdoc/RubyXL/CT_LightRig.html +0 -539
- data/rdoc/RubyXL/CT_LineEndProperties.html +0 -539
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +0 -539
- data/rdoc/RubyXL/CT_LineProperties.html +0 -539
- data/rdoc/RubyXL/CT_LineStyleList.html +0 -539
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +0 -539
- data/rdoc/RubyXL/CT_LuminanceEffect.html +0 -539
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +0 -539
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +0 -539
- data/rdoc/RubyXL/CT_Path2D.html +0 -539
- data/rdoc/RubyXL/CT_Path2DArcTo.html +0 -539
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +0 -539
- data/rdoc/RubyXL/CT_Path2DList.html +0 -539
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +0 -539
- data/rdoc/RubyXL/CT_Path2DTo.html +0 -539
- data/rdoc/RubyXL/CT_PathShadeProperties.html +0 -539
- data/rdoc/RubyXL/CT_PatternFillProperties.html +0 -539
- data/rdoc/RubyXL/CT_Point3D.html +0 -539
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +0 -539
- data/rdoc/RubyXL/CT_PresetColor.html +0 -539
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +0 -539
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +0 -539
- data/rdoc/RubyXL/CT_PresetTextShape.html +0 -539
- data/rdoc/RubyXL/CT_ReflectionEffect.html +0 -539
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +0 -539
- data/rdoc/RubyXL/CT_RelativeRect.html +0 -539
- data/rdoc/RubyXL/CT_SRgbColor.html +0 -539
- data/rdoc/RubyXL/CT_ScRgbColor.html +0 -539
- data/rdoc/RubyXL/CT_Scene3D.html +0 -539
- data/rdoc/RubyXL/CT_SchemeColor.html +0 -539
- data/rdoc/RubyXL/CT_Shape3D.html +0 -539
- data/rdoc/RubyXL/CT_ShapeStyle.html +0 -539
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +0 -539
- data/rdoc/RubyXL/CT_SphereCoords.html +0 -539
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +0 -539
- data/rdoc/RubyXL/CT_StyleMatrix.html +0 -539
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +0 -539
- data/rdoc/RubyXL/CT_SupplementalFont.html +0 -539
- data/rdoc/RubyXL/CT_SystemColor.html +0 -539
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +0 -539
- data/rdoc/RubyXL/CT_TextBlipBullet.html +0 -539
- data/rdoc/RubyXL/CT_TextCharBullet.html +0 -539
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +0 -539
- data/rdoc/RubyXL/CT_TextFont.html +0 -539
- data/rdoc/RubyXL/CT_TextListStyle.html +0 -539
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +0 -539
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +0 -539
- data/rdoc/RubyXL/CT_TextSpacing.html +0 -539
- data/rdoc/RubyXL/CT_TextTabStop.html +0 -539
- data/rdoc/RubyXL/CT_TextTabStopList.html +0 -539
- data/rdoc/RubyXL/CT_TileInfoProperties.html +0 -539
- data/rdoc/RubyXL/CT_TintEffect.html +0 -539
- data/rdoc/RubyXL/CT_Transform2D.html +0 -539
- data/rdoc/RubyXL/CT_TransformEffect.html +0 -539
- data/rdoc/RubyXL/CT_Vector3D.html +0 -539
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +0 -539
- data/rdoc/RubyXL/CalculationChain.html +0 -633
- data/rdoc/RubyXL/CalculationChainCell.html +0 -539
- data/rdoc/RubyXL/CalculationProperties.html +0 -539
- data/rdoc/RubyXL/Cell.html +0 -1315
- data/rdoc/RubyXL/CellConvenienceMethods.html +0 -2311
- data/rdoc/RubyXL/CellExt.html +0 -539
- data/rdoc/RubyXL/CellSmartTag.html +0 -539
- data/rdoc/RubyXL/CellSmartTagProperty.html +0 -539
- data/rdoc/RubyXL/CellSmartTags.html +0 -539
- data/rdoc/RubyXL/CellStyle.html +0 -539
- data/rdoc/RubyXL/CellStyleXFs.html +0 -608
- data/rdoc/RubyXL/CellStyles.html +0 -608
- data/rdoc/RubyXL/CellValue.html +0 -609
- data/rdoc/RubyXL/CellWatch.html +0 -539
- data/rdoc/RubyXL/CellWatches.html +0 -539
- data/rdoc/RubyXL/CellXFs.html +0 -609
- data/rdoc/RubyXL/ChartColorsFile.html +0 -568
- data/rdoc/RubyXL/ChartFile.html +0 -664
- data/rdoc/RubyXL/ChartStyleFile.html +0 -568
- data/rdoc/RubyXL/ChartUserShapesFile.html +0 -568
- data/rdoc/RubyXL/Chartsheet.html +0 -743
- data/rdoc/RubyXL/ChartsheetPageSetup.html +0 -539
- data/rdoc/RubyXL/ChartsheetProperties.html +0 -539
- data/rdoc/RubyXL/ChartsheetProtection.html +0 -539
- data/rdoc/RubyXL/ChartsheetView.html +0 -539
- data/rdoc/RubyXL/ChartsheetViews.html +0 -539
- data/rdoc/RubyXL/Color.html +0 -629
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +0 -774
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +0 -845
- data/rdoc/RubyXL/ColorConvenienceClasses.html +0 -528
- data/rdoc/RubyXL/ColorConvenienceMethods.html +0 -606
- data/rdoc/RubyXL/ColorFilter.html +0 -539
- data/rdoc/RubyXL/ColorScale.html +0 -539
- data/rdoc/RubyXL/ColorSet.html +0 -539
- data/rdoc/RubyXL/Colors.html +0 -539
- data/rdoc/RubyXL/ColumnRange.html +0 -786
- data/rdoc/RubyXL/ColumnRanges.html +0 -773
- data/rdoc/RubyXL/Comment.html +0 -539
- data/rdoc/RubyXL/CommentList.html +0 -539
- data/rdoc/RubyXL/CommentsFile.html +0 -657
- data/rdoc/RubyXL/ConditionalFormatValue.html +0 -539
- data/rdoc/RubyXL/ConditionalFormatting.html +0 -539
- data/rdoc/RubyXL/ConditionalFormattingRule.html +0 -539
- data/rdoc/RubyXL/Connection.html +0 -539
- data/rdoc/RubyXL/ConnectionTable.html +0 -539
- data/rdoc/RubyXL/ConnectionTables.html +0 -539
- data/rdoc/RubyXL/ConnectionTextField.html +0 -539
- data/rdoc/RubyXL/ConnectionTextFields.html +0 -539
- data/rdoc/RubyXL/Connections.html +0 -633
- data/rdoc/RubyXL/ContentTypeDefault.html +0 -543
- data/rdoc/RubyXL/ContentTypeOverride.html +0 -543
- data/rdoc/RubyXL/ContentTypes.html +0 -721
- data/rdoc/RubyXL/ControlPropertiesFile.html +0 -568
- data/rdoc/RubyXL/CorePropertiesFile.html +0 -1013
- data/rdoc/RubyXL/CustomColor.html +0 -539
- data/rdoc/RubyXL/CustomColorList.html +0 -539
- data/rdoc/RubyXL/CustomFilter.html +0 -539
- data/rdoc/RubyXL/CustomFilters.html +0 -539
- data/rdoc/RubyXL/CustomGeometry.html +0 -539
- data/rdoc/RubyXL/CustomProperties.html +0 -539
- data/rdoc/RubyXL/CustomPropertiesFile.html +0 -568
- data/rdoc/RubyXL/CustomProperty.html +0 -539
- data/rdoc/RubyXL/CustomPropertyFile.html +0 -568
- data/rdoc/RubyXL/CustomSheetView.html +0 -539
- data/rdoc/RubyXL/CustomSheetViews.html +0 -539
- data/rdoc/RubyXL/CustomWorkbookView.html +0 -539
- data/rdoc/RubyXL/CustomWorkbookViews.html +0 -539
- data/rdoc/RubyXL/CustomXMLFile.html +0 -560
- data/rdoc/RubyXL/DXF.html +0 -539
- data/rdoc/RubyXL/DXFs.html +0 -539
- data/rdoc/RubyXL/DataBar.html +0 -539
- data/rdoc/RubyXL/DataConsolidate.html +0 -539
- data/rdoc/RubyXL/DataConsolidationReference.html +0 -539
- data/rdoc/RubyXL/DataConsolidationReferences.html +0 -539
- data/rdoc/RubyXL/DataType.html +0 -589
- data/rdoc/RubyXL/DataValidation.html +0 -539
- data/rdoc/RubyXL/DataValidations.html +0 -539
- data/rdoc/RubyXL/DateGroupItem.html +0 -539
- data/rdoc/RubyXL/DefinedName.html +0 -539
- data/rdoc/RubyXL/DefinedNameExt.html +0 -539
- data/rdoc/RubyXL/DefinedNames.html +0 -616
- data/rdoc/RubyXL/DefinedNamesExt.html +0 -539
- data/rdoc/RubyXL/DocumentPropertiesFile.html +0 -725
- data/rdoc/RubyXL/DrawingFile.html +0 -663
- data/rdoc/RubyXL/DynamicFilter.html +0 -539
- data/rdoc/RubyXL/EmbeddedControl.html +0 -539
- data/rdoc/RubyXL/EmbeddedControls.html +0 -539
- data/rdoc/RubyXL/Extension.html +0 -539
- data/rdoc/RubyXL/ExtensionStorageArea.html +0 -539
- data/rdoc/RubyXL/Extents.html +0 -539
- data/rdoc/RubyXL/ExternalBook.html +0 -539
- data/rdoc/RubyXL/ExternalLinksFile.html +0 -659
- data/rdoc/RubyXL/ExternalReference.html +0 -539
- data/rdoc/RubyXL/ExternalReferences.html +0 -539
- data/rdoc/RubyXL/ExtraColorSchemeList.html +0 -539
- data/rdoc/RubyXL/FieldItem.html +0 -539
- data/rdoc/RubyXL/FileRecoveryProperties.html +0 -539
- data/rdoc/RubyXL/FileSharing.html +0 -539
- data/rdoc/RubyXL/FileVersion.html +0 -539
- data/rdoc/RubyXL/Fill.html +0 -608
- data/rdoc/RubyXL/Fills.html +0 -608
- data/rdoc/RubyXL/FilterContainer.html +0 -539
- data/rdoc/RubyXL/FloatNode.html +0 -543
- data/rdoc/RubyXL/FloatValue.html +0 -543
- data/rdoc/RubyXL/Font.html +0 -626
- data/rdoc/RubyXL/FontConvenienceMethods.html +0 -1169
- data/rdoc/RubyXL/FontScheme.html +0 -539
- data/rdoc/RubyXL/Fonts.html +0 -608
- data/rdoc/RubyXL/Formula.html +0 -539
- data/rdoc/RubyXL/FunctionGroup.html +0 -539
- data/rdoc/RubyXL/FunctionGroups.html +0 -539
- data/rdoc/RubyXL/GenericStorageObject.html +0 -803
- data/rdoc/RubyXL/GradientFill.html +0 -539
- data/rdoc/RubyXL/HeaderFooterSettings.html +0 -539
- data/rdoc/RubyXL/Hyperlink.html +0 -539
- data/rdoc/RubyXL/HyperlinkRelFile.html +0 -560
- data/rdoc/RubyXL/Hyperlinks.html +0 -539
- data/rdoc/RubyXL/IconFilter.html +0 -539
- data/rdoc/RubyXL/IconSet.html +0 -539
- data/rdoc/RubyXL/IgnoredError.html +0 -539
- data/rdoc/RubyXL/IgnoredErrors.html +0 -539
- data/rdoc/RubyXL/IndexedColors.html +0 -539
- data/rdoc/RubyXL/InputCells.html +0 -539
- data/rdoc/RubyXL/IntegerNode.html +0 -543
- data/rdoc/RubyXL/IntegerValue.html +0 -543
- data/rdoc/RubyXL/LegacyCell.html +0 -597
- data/rdoc/RubyXL/LegacyWorksheet.html +0 -760
- data/rdoc/RubyXL/MRUColors.html +0 -539
- data/rdoc/RubyXL/MacrosFile.html +0 -568
- data/rdoc/RubyXL/MergedCell.html +0 -539
- data/rdoc/RubyXL/MergedCells.html +0 -539
- data/rdoc/RubyXL/NumFmt.html +0 -539
- data/rdoc/RubyXL/NumberFormat.html +0 -609
- data/rdoc/RubyXL/NumberFormats.html +0 -625
- data/rdoc/RubyXL/OLEObject.html +0 -539
- data/rdoc/RubyXL/OLEObjectFile.html +0 -568
- data/rdoc/RubyXL/OLEObjects.html +0 -539
- data/rdoc/RubyXL/OLESize.html +0 -539
- data/rdoc/RubyXL/OOXMLContainerObject.html +0 -909
- data/rdoc/RubyXL/OOXMLIgnored.html +0 -681
- data/rdoc/RubyXL/OOXMLObject.html +0 -561
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +0 -1034
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +0 -1091
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +0 -1174
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +0 -891
- data/rdoc/RubyXL/OdbcOleDbProperties.html +0 -539
- data/rdoc/RubyXL/Offset.html +0 -539
- data/rdoc/RubyXL/OlapProperties.html +0 -539
- data/rdoc/RubyXL/OleItem.html +0 -539
- data/rdoc/RubyXL/OleItems.html +0 -539
- data/rdoc/RubyXL/OleLink.html +0 -539
- data/rdoc/RubyXL/OutlineProperties.html +0 -539
- data/rdoc/RubyXL/PageMargins.html +0 -539
- data/rdoc/RubyXL/PageSetup.html +0 -539
- data/rdoc/RubyXL/PageSetupProperties.html +0 -539
- data/rdoc/RubyXL/Pane.html +0 -539
- data/rdoc/RubyXL/Parser.html +0 -670
- data/rdoc/RubyXL/PatternFill.html +0 -539
- data/rdoc/RubyXL/PersonMetadata.html +0 -568
- data/rdoc/RubyXL/PhoneticProperties.html +0 -539
- data/rdoc/RubyXL/PhoneticRun.html +0 -539
- data/rdoc/RubyXL/PivotArea.html +0 -539
- data/rdoc/RubyXL/PivotCache.html +0 -539
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +0 -590
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +0 -568
- data/rdoc/RubyXL/PivotCaches.html +0 -539
- data/rdoc/RubyXL/PivotReference.html +0 -539
- data/rdoc/RubyXL/PivotReferences.html +0 -539
- data/rdoc/RubyXL/PivotSelection.html +0 -539
- data/rdoc/RubyXL/PivotTableFile.html +0 -590
- data/rdoc/RubyXL/PresetGeometry.html +0 -539
- data/rdoc/RubyXL/PrintOptions.html +0 -539
- data/rdoc/RubyXL/PrinterSettingsFile.html +0 -568
- data/rdoc/RubyXL/ProtectedRange.html +0 -539
- data/rdoc/RubyXL/ProtectedRanges.html +0 -539
- data/rdoc/RubyXL/Protection.html +0 -539
- data/rdoc/RubyXL/QueryParameter.html +0 -539
- data/rdoc/RubyXL/QueryParameters.html +0 -539
- data/rdoc/RubyXL/QueryTable.html +0 -655
- data/rdoc/RubyXL/QueryTableDeletedField.html +0 -539
- data/rdoc/RubyXL/QueryTableDeletedFields.html +0 -539
- data/rdoc/RubyXL/QueryTableField.html +0 -539
- data/rdoc/RubyXL/QueryTableFields.html +0 -539
- data/rdoc/RubyXL/QueryTableRefresh.html +0 -539
- data/rdoc/RubyXL/RID.html +0 -543
- data/rdoc/RubyXL/RawOOXML.html +0 -703
- data/rdoc/RubyXL/Reference.html +0 -1332
- data/rdoc/RubyXL/Relationship.html +0 -543
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +0 -604
- data/rdoc/RubyXL/RelationshipSupport.html +0 -943
- data/rdoc/RubyXL/RevisionPointer.html +0 -539
- data/rdoc/RubyXL/RichText.html +0 -611
- data/rdoc/RubyXL/RichTextRun.html +0 -608
- data/rdoc/RubyXL/Row.html +0 -1003
- data/rdoc/RubyXL/RowExt.html +0 -539
- data/rdoc/RubyXL/RunProperties.html +0 -539
- data/rdoc/RubyXL/Scenario.html +0 -539
- data/rdoc/RubyXL/Scenarios.html +0 -539
- data/rdoc/RubyXL/Selection.html +0 -616
- data/rdoc/RubyXL/ShapeGuide.html +0 -539
- data/rdoc/RubyXL/ShapeTextRectangle.html +0 -539
- data/rdoc/RubyXL/SharedStringsTable.html +0 -952
- data/rdoc/RubyXL/Sheet.html +0 -539
- data/rdoc/RubyXL/SheetCalculationProperties.html +0 -539
- data/rdoc/RubyXL/SheetData.html +0 -652
- data/rdoc/RubyXL/SheetDataExt.html +0 -539
- data/rdoc/RubyXL/SheetDataSet.html +0 -539
- data/rdoc/RubyXL/SheetMetadata.html +0 -568
- data/rdoc/RubyXL/SheetName.html +0 -539
- data/rdoc/RubyXL/SheetNames.html +0 -539
- data/rdoc/RubyXL/Sheets.html +0 -539
- data/rdoc/RubyXL/SlicerCacheFile.html +0 -568
- data/rdoc/RubyXL/SlicerFile.html +0 -568
- data/rdoc/RubyXL/SmartTagProperties.html +0 -539
- data/rdoc/RubyXL/SmartTagType.html +0 -539
- data/rdoc/RubyXL/SmartTagTypes.html +0 -539
- data/rdoc/RubyXL/SmartTags.html +0 -539
- data/rdoc/RubyXL/SortCondition.html +0 -539
- data/rdoc/RubyXL/SortState.html +0 -539
- data/rdoc/RubyXL/Sqref.html +0 -681
- data/rdoc/RubyXL/Stop.html +0 -539
- data/rdoc/RubyXL/StringNode.html +0 -543
- data/rdoc/RubyXL/StringNodeW3C.html +0 -681
- data/rdoc/RubyXL/StringValue.html +0 -543
- data/rdoc/RubyXL/Stylesheet.html +0 -864
- data/rdoc/RubyXL/TableFile.html +0 -568
- data/rdoc/RubyXL/TableParts.html +0 -543
- data/rdoc/RubyXL/TableStyle.html +0 -539
- data/rdoc/RubyXL/TableStyles.html +0 -539
- data/rdoc/RubyXL/Text.html +0 -679
- data/rdoc/RubyXL/TextImportSettings.html +0 -539
- data/rdoc/RubyXL/Theme.html +0 -1077
- data/rdoc/RubyXL/ThemeElements.html +0 -539
- data/rdoc/RubyXL/ThumbnailFile.html +0 -568
- data/rdoc/RubyXL/Top10.html +0 -539
- data/rdoc/RubyXL/VMLDrawingFile.html +0 -590
- data/rdoc/RubyXL/Variant.html +0 -539
- data/rdoc/RubyXL/Vector.html +0 -612
- data/rdoc/RubyXL/VectorValue.html +0 -543
- data/rdoc/RubyXL/VisualProperties.html +0 -539
- data/rdoc/RubyXL/WebPublishObject.html +0 -539
- data/rdoc/RubyXL/WebPublishObjects.html +0 -539
- data/rdoc/RubyXL/WebPublishingItem.html +0 -539
- data/rdoc/RubyXL/WebPublishingItems.html +0 -539
- data/rdoc/RubyXL/WebPublishingProperties.html +0 -539
- data/rdoc/RubyXL/WebQueryProperties.html +0 -539
- data/rdoc/RubyXL/Workbook.html +0 -2085
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +0 -1407
- data/rdoc/RubyXL/WorkbookProperties.html +0 -539
- data/rdoc/RubyXL/WorkbookProtection.html +0 -539
- data/rdoc/RubyXL/WorkbookRoot.html +0 -940
- data/rdoc/RubyXL/WorkbookView.html +0 -539
- data/rdoc/RubyXL/WorkbookViews.html +0 -539
- data/rdoc/RubyXL/Worksheet.html +0 -1224
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +0 -4087
- data/rdoc/RubyXL/WorksheetDimensions.html +0 -539
- data/rdoc/RubyXL/WorksheetFormatProperties.html +0 -543
- data/rdoc/RubyXL/WorksheetProperties.html +0 -539
- data/rdoc/RubyXL/WorksheetProtection.html +0 -539
- data/rdoc/RubyXL/WorksheetView.html +0 -539
- data/rdoc/RubyXL/WorksheetViews.html +0 -539
- data/rdoc/RubyXL/XF.html +0 -539
- data/rdoc/RubyXL.html +0 -1381
- data/rdoc/created.rid +0 -45
- data/rdoc/css/rdoc.css +0 -1955
- data/rdoc/index.html +0 -455
- data/rdoc/js/aliki.js +0 -511
- data/rdoc/js/bash_highlighter.js +0 -167
- data/rdoc/js/c_highlighter.js +0 -299
- data/rdoc/js/search_controller.js +0 -129
- data/rdoc/js/search_data.js +0 -1
- data/rdoc/js/search_navigation.js +0 -105
- data/rdoc/js/search_ranker.js +0 -239
- data/rdoc/js/theme-toggle.js +0 -112
- data/spec/lib/cell_spec.rb +0 -694
- data/spec/lib/color_spec.rb +0 -21
- data/spec/lib/parser_spec.rb +0 -118
- data/spec/lib/reference_spec.rb +0 -122
- data/spec/lib/rgb_color_spec.rb +0 -29
- data/spec/lib/stylesheet_spec.rb +0 -27
- data/spec/lib/text_spec.rb +0 -27
- data/spec/lib/workbook_root_spec.rb +0 -43
- data/spec/lib/workbook_spec.rb +0 -197
- data/spec/lib/worksheet_spec.rb +0 -1777
- data/spec/spec_helper.rb +0 -13
- data/test/input/.gitkeep +0 -0
- data/test/output/.gitkeep +0 -0
- data/test/test_parse_write.rb +0 -15
- data/tmp/.gitignore +0 -1
|
@@ -1,4087 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
-
|
|
8
|
-
<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.39</title>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<meta
|
|
12
|
-
name="keywords"
|
|
13
|
-
content="ruby,module,RubyXL::WorksheetConvenienceMethods"
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
<meta
|
|
17
|
-
name="description"
|
|
18
|
-
content="Documentation for the RubyXL::WorksheetConvenienceMethods module"
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<!-- Open Graph / Facebook -->
|
|
26
|
-
<meta property="og:type" content="website">
|
|
27
|
-
<meta property="og:title" content="module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.39">
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<meta
|
|
32
|
-
property="og:description"
|
|
33
|
-
content="Documentation for RubyXL::WorksheetConvenienceMethods module - API reference and code examples"
|
|
34
|
-
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<!-- Twitter -->
|
|
41
|
-
<meta name="twitter:card" content="summary">
|
|
42
|
-
<meta name="twitter:title" content="module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.39">
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<meta
|
|
47
|
-
name="twitter:description"
|
|
48
|
-
content="Documentation for RubyXL::WorksheetConvenienceMethods module - API reference and code examples"
|
|
49
|
-
>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<script type="text/javascript">
|
|
54
|
-
var rdoc_rel_prefix = "../";
|
|
55
|
-
var index_rel_prefix = "../";
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<script
|
|
59
|
-
src="../js/theme-toggle.js?v=7.2.0"
|
|
60
|
-
></script>
|
|
61
|
-
|
|
62
|
-
<script
|
|
63
|
-
src="../js/search_navigation.js?v=7.2.0"
|
|
64
|
-
defer
|
|
65
|
-
></script>
|
|
66
|
-
|
|
67
|
-
<script
|
|
68
|
-
src="../js/search_data.js?v=7.2.0"
|
|
69
|
-
defer
|
|
70
|
-
></script>
|
|
71
|
-
|
|
72
|
-
<script
|
|
73
|
-
src="../js/search_ranker.js?v=7.2.0"
|
|
74
|
-
defer
|
|
75
|
-
></script>
|
|
76
|
-
|
|
77
|
-
<script
|
|
78
|
-
src="../js/search_controller.js?v=7.2.0"
|
|
79
|
-
defer
|
|
80
|
-
></script>
|
|
81
|
-
|
|
82
|
-
<script
|
|
83
|
-
src="../js/c_highlighter.js?v=7.2.0"
|
|
84
|
-
defer
|
|
85
|
-
></script>
|
|
86
|
-
|
|
87
|
-
<script
|
|
88
|
-
src="../js/bash_highlighter.js?v=7.2.0"
|
|
89
|
-
defer
|
|
90
|
-
></script>
|
|
91
|
-
|
|
92
|
-
<script
|
|
93
|
-
src="../js/aliki.js?v=7.2.0"
|
|
94
|
-
defer
|
|
95
|
-
></script>
|
|
96
|
-
|
|
97
|
-
<link
|
|
98
|
-
href="../css/rdoc.css?v=7.2.0"
|
|
99
|
-
rel="stylesheet"
|
|
100
|
-
>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<body role="document" class="module has-toc">
|
|
106
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
107
|
-
<!-- Chevron (right arrow) - used for expand/collapse -->
|
|
108
|
-
<symbol
|
|
109
|
-
id="icon-chevron"
|
|
110
|
-
viewBox="0 0 24 24"
|
|
111
|
-
fill="none"
|
|
112
|
-
stroke="currentColor"
|
|
113
|
-
stroke-width="2"
|
|
114
|
-
stroke-linecap="round"
|
|
115
|
-
stroke-linejoin="round"
|
|
116
|
-
>
|
|
117
|
-
<polyline points="9 18 15 12 9 6"></polyline>
|
|
118
|
-
</symbol>
|
|
119
|
-
|
|
120
|
-
<!-- File/Document - Pages section -->
|
|
121
|
-
<symbol
|
|
122
|
-
id="icon-file"
|
|
123
|
-
viewBox="0 0 24 24"
|
|
124
|
-
fill="none"
|
|
125
|
-
stroke="currentColor"
|
|
126
|
-
stroke-width="2"
|
|
127
|
-
stroke-linecap="round"
|
|
128
|
-
stroke-linejoin="round"
|
|
129
|
-
>
|
|
130
|
-
<path
|
|
131
|
-
d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"
|
|
132
|
-
></path>
|
|
133
|
-
|
|
134
|
-
<polyline points="14 2 14 8 20 8"></polyline>
|
|
135
|
-
</symbol>
|
|
136
|
-
|
|
137
|
-
<!-- Layers/Stack - Classes and Modules section -->
|
|
138
|
-
<symbol
|
|
139
|
-
id="icon-layers"
|
|
140
|
-
viewBox="0 0 24 24"
|
|
141
|
-
fill="none"
|
|
142
|
-
stroke="currentColor"
|
|
143
|
-
stroke-width="2"
|
|
144
|
-
stroke-linecap="round"
|
|
145
|
-
stroke-linejoin="round"
|
|
146
|
-
>
|
|
147
|
-
<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon>
|
|
148
|
-
<polyline points="2 17 12 22 22 17"></polyline>
|
|
149
|
-
<polyline points="2 12 12 17 22 12"></polyline>
|
|
150
|
-
</symbol>
|
|
151
|
-
|
|
152
|
-
<!-- Curly braces with C - Class Methods section -->
|
|
153
|
-
<symbol
|
|
154
|
-
id="icon-class-methods"
|
|
155
|
-
viewBox="0 0 24 24"
|
|
156
|
-
fill="none"
|
|
157
|
-
stroke="currentColor"
|
|
158
|
-
stroke-width="2"
|
|
159
|
-
stroke-linecap="round"
|
|
160
|
-
stroke-linejoin="round"
|
|
161
|
-
>
|
|
162
|
-
<path d="M6 3C3.5 3 2 4.5 2 7v3c0 1.5-1 2-1 2s1 .5 1 2v5c0 2.5 1.5 4 4 4"></path>
|
|
163
|
-
<path d="M18 3c2.5 0 4 1.5 4 4v3c0 1.5 1 2 1 2s-1 .5-1 2v5c0 2.5-1.5 4-4 4"></path>
|
|
164
|
-
|
|
165
|
-
<text
|
|
166
|
-
x="12"
|
|
167
|
-
y="17"
|
|
168
|
-
text-anchor="middle"
|
|
169
|
-
font-size="13"
|
|
170
|
-
font-weight="bold"
|
|
171
|
-
fill="currentColor"
|
|
172
|
-
stroke="none"
|
|
173
|
-
>
|
|
174
|
-
C
|
|
175
|
-
</text>
|
|
176
|
-
</symbol>
|
|
177
|
-
|
|
178
|
-
<!-- Curly braces with I - Instance Methods section -->
|
|
179
|
-
<symbol
|
|
180
|
-
id="icon-instance-methods"
|
|
181
|
-
viewBox="0 0 24 24"
|
|
182
|
-
fill="none"
|
|
183
|
-
stroke="currentColor"
|
|
184
|
-
stroke-width="2"
|
|
185
|
-
stroke-linecap="round"
|
|
186
|
-
stroke-linejoin="round"
|
|
187
|
-
>
|
|
188
|
-
<path d="M6 3C3.5 3 2 4.5 2 7v3c0 1.5-1 2-1 2s1 .5 1 2v5c0 2.5 1.5 4 4 4"></path>
|
|
189
|
-
<path d="M18 3c2.5 0 4 1.5 4 4v3c0 1.5 1 2 1 2s-1 .5-1 2v5c0 2.5-1.5 4-4 4"></path>
|
|
190
|
-
|
|
191
|
-
<text
|
|
192
|
-
x="12"
|
|
193
|
-
y="17"
|
|
194
|
-
text-anchor="middle"
|
|
195
|
-
font-size="13"
|
|
196
|
-
font-weight="bold"
|
|
197
|
-
fill="currentColor"
|
|
198
|
-
stroke="none"
|
|
199
|
-
>
|
|
200
|
-
I
|
|
201
|
-
</text>
|
|
202
|
-
</symbol>
|
|
203
|
-
|
|
204
|
-
<!-- Double chevrons up - Ancestors section -->
|
|
205
|
-
<symbol
|
|
206
|
-
id="icon-ancestors"
|
|
207
|
-
viewBox="0 0 24 24"
|
|
208
|
-
fill="none"
|
|
209
|
-
stroke="currentColor"
|
|
210
|
-
stroke-width="2"
|
|
211
|
-
stroke-linecap="round"
|
|
212
|
-
stroke-linejoin="round"
|
|
213
|
-
>
|
|
214
|
-
<polyline points="17 11 12 6 7 11"></polyline>
|
|
215
|
-
<polyline points="17 18 12 13 7 18"></polyline>
|
|
216
|
-
</symbol>
|
|
217
|
-
|
|
218
|
-
<!-- User with plus - Included Modules section -->
|
|
219
|
-
<symbol
|
|
220
|
-
id="icon-includes"
|
|
221
|
-
viewBox="0 0 24 24"
|
|
222
|
-
fill="none"
|
|
223
|
-
stroke="currentColor"
|
|
224
|
-
stroke-width="2"
|
|
225
|
-
stroke-linecap="round"
|
|
226
|
-
stroke-linejoin="round"
|
|
227
|
-
>
|
|
228
|
-
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
|
229
|
-
<circle cx="8.5" cy="7" r="4"></circle>
|
|
230
|
-
|
|
231
|
-
<line
|
|
232
|
-
x1="20"
|
|
233
|
-
y1="8"
|
|
234
|
-
x2="20"
|
|
235
|
-
y2="14"
|
|
236
|
-
></line>
|
|
237
|
-
|
|
238
|
-
<line
|
|
239
|
-
x1="23"
|
|
240
|
-
y1="11"
|
|
241
|
-
x2="17"
|
|
242
|
-
y2="11"
|
|
243
|
-
></line>
|
|
244
|
-
</symbol>
|
|
245
|
-
|
|
246
|
-
<!-- User with check - Extended Modules section -->
|
|
247
|
-
<symbol
|
|
248
|
-
id="icon-extends"
|
|
249
|
-
viewBox="0 0 24 24"
|
|
250
|
-
fill="none"
|
|
251
|
-
stroke="currentColor"
|
|
252
|
-
stroke-width="2"
|
|
253
|
-
stroke-linecap="round"
|
|
254
|
-
stroke-linejoin="round"
|
|
255
|
-
>
|
|
256
|
-
<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
|
|
257
|
-
<circle cx="8.5" cy="7" r="4"></circle>
|
|
258
|
-
<polyline points="17 11 19 13 23 9"></polyline>
|
|
259
|
-
</symbol>
|
|
260
|
-
|
|
261
|
-
<!-- List - Sections section -->
|
|
262
|
-
<symbol
|
|
263
|
-
id="icon-list"
|
|
264
|
-
viewBox="0 0 24 24"
|
|
265
|
-
fill="none"
|
|
266
|
-
stroke="currentColor"
|
|
267
|
-
stroke-width="2"
|
|
268
|
-
stroke-linecap="round"
|
|
269
|
-
stroke-linejoin="round"
|
|
270
|
-
>
|
|
271
|
-
<line
|
|
272
|
-
x1="8"
|
|
273
|
-
y1="6"
|
|
274
|
-
x2="21"
|
|
275
|
-
y2="6"
|
|
276
|
-
></line>
|
|
277
|
-
|
|
278
|
-
<line
|
|
279
|
-
x1="8"
|
|
280
|
-
y1="12"
|
|
281
|
-
x2="21"
|
|
282
|
-
y2="12"
|
|
283
|
-
></line>
|
|
284
|
-
|
|
285
|
-
<line
|
|
286
|
-
x1="8"
|
|
287
|
-
y1="18"
|
|
288
|
-
x2="21"
|
|
289
|
-
y2="18"
|
|
290
|
-
></line>
|
|
291
|
-
|
|
292
|
-
<line
|
|
293
|
-
x1="3"
|
|
294
|
-
y1="6"
|
|
295
|
-
x2="3.01"
|
|
296
|
-
y2="6"
|
|
297
|
-
></line>
|
|
298
|
-
|
|
299
|
-
<line
|
|
300
|
-
x1="3"
|
|
301
|
-
y1="12"
|
|
302
|
-
x2="3.01"
|
|
303
|
-
y2="12"
|
|
304
|
-
></line>
|
|
305
|
-
|
|
306
|
-
<line
|
|
307
|
-
x1="3"
|
|
308
|
-
y1="18"
|
|
309
|
-
x2="3.01"
|
|
310
|
-
y2="18"
|
|
311
|
-
></line>
|
|
312
|
-
</symbol>
|
|
313
|
-
</svg>
|
|
314
|
-
|
|
315
|
-
<header class="top-navbar">
|
|
316
|
-
<a href="../index.html" class="navbar-brand">
|
|
317
|
-
rubyXL 3.4.39
|
|
318
|
-
</a>
|
|
319
|
-
|
|
320
|
-
<!-- Desktop search bar -->
|
|
321
|
-
<div class="navbar-search navbar-search-desktop" role="search">
|
|
322
|
-
<form action="#" method="get" accept-charset="utf-8">
|
|
323
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
|
324
|
-
aria-autocomplete="list" aria-controls="search-results-desktop"
|
|
325
|
-
type="text" name="search" placeholder="Search (/) for a class, method..."
|
|
326
|
-
spellcheck="false" autocomplete="off"
|
|
327
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
|
328
|
-
<ul id="search-results-desktop" aria-label="Search Results"
|
|
329
|
-
aria-busy="false" aria-expanded="false"
|
|
330
|
-
aria-atomic="false" class="initially-hidden search-results"></ul>
|
|
331
|
-
</form>
|
|
332
|
-
</div>
|
|
333
|
-
|
|
334
|
-
<!-- Mobile search icon button -->
|
|
335
|
-
<button id="search-toggle" class="navbar-search-mobile" aria-label="Open search" type="button">
|
|
336
|
-
<span aria-hidden="true">🔍</span>
|
|
337
|
-
</button>
|
|
338
|
-
|
|
339
|
-
<!-- Theme toggle button -->
|
|
340
|
-
<button id="theme-toggle" class="theme-toggle" aria-label="Switch to dark mode" type="button">
|
|
341
|
-
<span class="theme-toggle-icon" aria-hidden="true">🌙</span>
|
|
342
|
-
</button>
|
|
343
|
-
</header>
|
|
344
|
-
|
|
345
|
-
<!-- Search Modal (Mobile) -->
|
|
346
|
-
<div id="search-modal" class="search-modal" hidden aria-modal="true" role="dialog" aria-label="Search">
|
|
347
|
-
<div class="search-modal-backdrop"></div>
|
|
348
|
-
<div class="search-modal-content">
|
|
349
|
-
<div class="search-modal-header">
|
|
350
|
-
<form class="search-modal-form" action="#" method="get" accept-charset="utf-8">
|
|
351
|
-
<span class="search-modal-icon" aria-hidden="true">🔍</span>
|
|
352
|
-
<input id="search-field-mobile" role="combobox" aria-label="Search"
|
|
353
|
-
aria-autocomplete="list" aria-controls="search-results-mobile"
|
|
354
|
-
type="text" name="search" placeholder="Search documentation"
|
|
355
|
-
spellcheck="false" autocomplete="off">
|
|
356
|
-
<button type="button" class="search-modal-close" aria-label="Close search" id="search-modal-close">
|
|
357
|
-
<span aria-hidden="true">esc</span>
|
|
358
|
-
</button>
|
|
359
|
-
</form>
|
|
360
|
-
</div>
|
|
361
|
-
<div class="search-modal-body">
|
|
362
|
-
<ul id="search-results-mobile" aria-label="Search Results"
|
|
363
|
-
aria-busy="false" aria-expanded="false"
|
|
364
|
-
aria-atomic="false" class="search-results search-modal-results initially-hidden"></ul>
|
|
365
|
-
<div class="search-modal-empty">
|
|
366
|
-
<p>No recent searches</p>
|
|
367
|
-
</div>
|
|
368
|
-
</div>
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
|
|
372
|
-
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
|
373
|
-
<span aria-hidden="true">☰</span>
|
|
374
|
-
</div>
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
<nav id="navigation" role="navigation" hidden>
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
<div id="fileindex-section" class="nav-section">
|
|
384
|
-
<details class="nav-section-collapsible" >
|
|
385
|
-
<summary class="nav-section-header">
|
|
386
|
-
<span class="nav-section-icon">
|
|
387
|
-
<svg>
|
|
388
|
-
<use href="#icon-file"></use>
|
|
389
|
-
</svg>
|
|
390
|
-
</span>
|
|
391
|
-
|
|
392
|
-
<span class="nav-section-title">Pages</span>
|
|
393
|
-
|
|
394
|
-
<span class="nav-section-chevron">
|
|
395
|
-
<svg>
|
|
396
|
-
<use href="#icon-chevron"></use>
|
|
397
|
-
</svg>
|
|
398
|
-
</span>
|
|
399
|
-
</summary>
|
|
400
|
-
|
|
401
|
-
<ul class="nav-list">
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
<li>
|
|
409
|
-
<a href="../README_rdoc.html">
|
|
410
|
-
README
|
|
411
|
-
</a>
|
|
412
|
-
</li>
|
|
413
|
-
|
|
414
|
-
</ul>
|
|
415
|
-
</details>
|
|
416
|
-
</div>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
<div class="nav-section">
|
|
431
|
-
<details class="nav-section-collapsible" open>
|
|
432
|
-
<summary class="nav-section-header">
|
|
433
|
-
<span class="nav-section-icon">
|
|
434
|
-
<svg><use href="#icon-instance-methods"></use></svg>
|
|
435
|
-
</span>
|
|
436
|
-
<span class="nav-section-title">Instance Methods</span>
|
|
437
|
-
<span class="nav-section-chevron">
|
|
438
|
-
<svg><use href="#icon-chevron"></use></svg>
|
|
439
|
-
</span>
|
|
440
|
-
</summary>
|
|
441
|
-
<ul class="nav-list" role="directory">
|
|
442
|
-
|
|
443
|
-
<li ><a href="#method-i-add_validation_list">add_validation_list</a></li>
|
|
444
|
-
|
|
445
|
-
<li ><a href="#method-i-change_column_alignment">change_column_alignment</a></li>
|
|
446
|
-
|
|
447
|
-
<li ><a href="#method-i-change_column_bold">change_column_bold</a></li>
|
|
448
|
-
|
|
449
|
-
<li ><a href="#method-i-change_column_border">change_column_border</a></li>
|
|
450
|
-
|
|
451
|
-
<li ><a href="#method-i-change_column_border_color">change_column_border_color</a></li>
|
|
452
|
-
|
|
453
|
-
<li ><a href="#method-i-change_column_fill">change_column_fill</a></li>
|
|
454
|
-
|
|
455
|
-
<li ><a href="#method-i-change_column_font">change_column_font</a></li>
|
|
456
|
-
|
|
457
|
-
<li ><a href="#method-i-change_column_font_color">change_column_font_color</a></li>
|
|
458
|
-
|
|
459
|
-
<li ><a href="#method-i-change_column_font_name">change_column_font_name</a></li>
|
|
460
|
-
|
|
461
|
-
<li ><a href="#method-i-change_column_font_size">change_column_font_size</a></li>
|
|
462
|
-
|
|
463
|
-
<li ><a href="#method-i-change_column_horizontal_alignment">change_column_horizontal_alignment</a></li>
|
|
464
|
-
|
|
465
|
-
<li ><a href="#method-i-change_column_italics">change_column_italics</a></li>
|
|
466
|
-
|
|
467
|
-
<li ><a href="#method-i-change_column_strikethrough">change_column_strikethrough</a></li>
|
|
468
|
-
|
|
469
|
-
<li ><a href="#method-i-change_column_underline">change_column_underline</a></li>
|
|
470
|
-
|
|
471
|
-
<li ><a href="#method-i-change_column_vertical_alignment">change_column_vertical_alignment</a></li>
|
|
472
|
-
|
|
473
|
-
<li ><a href="#method-i-change_column_width">change_column_width</a></li>
|
|
474
|
-
|
|
475
|
-
<li ><a href="#method-i-change_column_width_raw">change_column_width_raw</a></li>
|
|
476
|
-
|
|
477
|
-
<li ><a href="#method-i-change_row_alignment">change_row_alignment</a></li>
|
|
478
|
-
|
|
479
|
-
<li ><a href="#method-i-change_row_bold">change_row_bold</a></li>
|
|
480
|
-
|
|
481
|
-
<li ><a href="#method-i-change_row_border">change_row_border</a></li>
|
|
482
|
-
|
|
483
|
-
<li ><a href="#method-i-change_row_border_color">change_row_border_color</a></li>
|
|
484
|
-
|
|
485
|
-
<li ><a href="#method-i-change_row_fill">change_row_fill</a></li>
|
|
486
|
-
|
|
487
|
-
<li ><a href="#method-i-change_row_font">change_row_font</a></li>
|
|
488
|
-
|
|
489
|
-
<li ><a href="#method-i-change_row_font_color">change_row_font_color</a></li>
|
|
490
|
-
|
|
491
|
-
<li ><a href="#method-i-change_row_font_name">change_row_font_name</a></li>
|
|
492
|
-
|
|
493
|
-
<li ><a href="#method-i-change_row_font_size">change_row_font_size</a></li>
|
|
494
|
-
|
|
495
|
-
<li ><a href="#method-i-change_row_height">change_row_height</a></li>
|
|
496
|
-
|
|
497
|
-
<li ><a href="#method-i-change_row_horizontal_alignment">change_row_horizontal_alignment</a></li>
|
|
498
|
-
|
|
499
|
-
<li ><a href="#method-i-change_row_italics">change_row_italics</a></li>
|
|
500
|
-
|
|
501
|
-
<li ><a href="#method-i-change_row_strikethrough">change_row_strikethrough</a></li>
|
|
502
|
-
|
|
503
|
-
<li ><a href="#method-i-change_row_underline">change_row_underline</a></li>
|
|
504
|
-
|
|
505
|
-
<li ><a href="#method-i-change_row_vertical_alignment">change_row_vertical_alignment</a></li>
|
|
506
|
-
|
|
507
|
-
<li ><a href="#method-i-column_font">column_font</a></li>
|
|
508
|
-
|
|
509
|
-
<li ><a href="#method-i-delete_cell">delete_cell</a></li>
|
|
510
|
-
|
|
511
|
-
<li ><a href="#method-i-delete_column">delete_column</a></li>
|
|
512
|
-
|
|
513
|
-
<li ><a href="#method-i-delete_row">delete_row</a></li>
|
|
514
|
-
|
|
515
|
-
<li ><a href="#method-i-get_col_style">get_col_style</a></li>
|
|
516
|
-
|
|
517
|
-
<li ><a href="#method-i-get_cols_style_index">get_cols_style_index</a></li>
|
|
518
|
-
|
|
519
|
-
<li ><a href="#method-i-get_column_alignment">get_column_alignment</a></li>
|
|
520
|
-
|
|
521
|
-
<li ><a href="#method-i-get_column_border">get_column_border</a></li>
|
|
522
|
-
|
|
523
|
-
<li ><a href="#method-i-get_column_border_color">get_column_border_color</a></li>
|
|
524
|
-
|
|
525
|
-
<li ><a href="#method-i-get_column_fill">get_column_fill</a></li>
|
|
526
|
-
|
|
527
|
-
<li ><a href="#method-i-get_column_font_color">get_column_font_color</a></li>
|
|
528
|
-
|
|
529
|
-
<li ><a href="#method-i-get_column_font_name">get_column_font_name</a></li>
|
|
530
|
-
|
|
531
|
-
<li ><a href="#method-i-get_column_font_size">get_column_font_size</a></li>
|
|
532
|
-
|
|
533
|
-
<li ><a href="#method-i-get_column_width">get_column_width</a></li>
|
|
534
|
-
|
|
535
|
-
<li ><a href="#method-i-get_column_width_raw">get_column_width_raw</a></li>
|
|
536
|
-
|
|
537
|
-
<li ><a href="#method-i-get_row_alignment">get_row_alignment</a></li>
|
|
538
|
-
|
|
539
|
-
<li ><a href="#method-i-get_row_border">get_row_border</a></li>
|
|
540
|
-
|
|
541
|
-
<li ><a href="#method-i-get_row_border_color">get_row_border_color</a></li>
|
|
542
|
-
|
|
543
|
-
<li ><a href="#method-i-get_row_fill">get_row_fill</a></li>
|
|
544
|
-
|
|
545
|
-
<li ><a href="#method-i-get_row_font_color">get_row_font_color</a></li>
|
|
546
|
-
|
|
547
|
-
<li ><a href="#method-i-get_row_font_name">get_row_font_name</a></li>
|
|
548
|
-
|
|
549
|
-
<li ><a href="#method-i-get_row_font_size">get_row_font_size</a></li>
|
|
550
|
-
|
|
551
|
-
<li ><a href="#method-i-get_row_height">get_row_height</a></li>
|
|
552
|
-
|
|
553
|
-
<li ><a href="#method-i-get_row_style">get_row_style</a></li>
|
|
554
|
-
|
|
555
|
-
<li ><a href="#method-i-insert_cell">insert_cell</a></li>
|
|
556
|
-
|
|
557
|
-
<li ><a href="#method-i-insert_column">insert_column</a></li>
|
|
558
|
-
|
|
559
|
-
<li ><a href="#method-i-insert_row">insert_row</a></li>
|
|
560
|
-
|
|
561
|
-
<li ><a href="#method-i-is_column_bolded">is_column_bolded</a></li>
|
|
562
|
-
|
|
563
|
-
<li ><a href="#method-i-is_column_italicized">is_column_italicized</a></li>
|
|
564
|
-
|
|
565
|
-
<li ><a href="#method-i-is_column_struckthrough">is_column_struckthrough</a></li>
|
|
566
|
-
|
|
567
|
-
<li ><a href="#method-i-is_column_underlined">is_column_underlined</a></li>
|
|
568
|
-
|
|
569
|
-
<li ><a href="#method-i-is_row_bolded">is_row_bolded</a></li>
|
|
570
|
-
|
|
571
|
-
<li ><a href="#method-i-is_row_italicized">is_row_italicized</a></li>
|
|
572
|
-
|
|
573
|
-
<li ><a href="#method-i-is_row_struckthrough">is_row_struckthrough</a></li>
|
|
574
|
-
|
|
575
|
-
<li ><a href="#method-i-is_row_underlined">is_row_underlined</a></li>
|
|
576
|
-
|
|
577
|
-
<li ><a href="#method-i-merge_cells">merge_cells</a></li>
|
|
578
|
-
|
|
579
|
-
<li ><a href="#method-i-row_font">row_font</a></li>
|
|
580
|
-
|
|
581
|
-
</ul>
|
|
582
|
-
</details>
|
|
583
|
-
</div>
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
<div id="classindex-section" class="nav-section">
|
|
587
|
-
<details class="nav-section-collapsible" open>
|
|
588
|
-
<summary class="nav-section-header">
|
|
589
|
-
<span class="nav-section-icon">
|
|
590
|
-
<svg><use href="#icon-layers"></use></svg>
|
|
591
|
-
</span>
|
|
592
|
-
<span class="nav-section-title">Classes and Modules</span>
|
|
593
|
-
<span class="nav-section-chevron">
|
|
594
|
-
<svg><use href="#icon-chevron"></use></svg>
|
|
595
|
-
</span>
|
|
596
|
-
</summary>
|
|
597
|
-
|
|
598
|
-
<ul class="link-list nav-list"><li><details open><summary><code><a href="../RubyXL.html">RubyXL</a></code></summary><ul class="link-list nav-list"><li><code><a href="../RubyXL/AExtension.html">AExtension</a></code></li><li><code><a href="../RubyXL/AExtensionStorageArea.html">AExtensionStorageArea</a></code></li><li><code><a href="../RubyXL/ActiveX.html">ActiveX</a></code></li><li><code><a href="../RubyXL/ActiveXBinary.html">ActiveXBinary</a></code></li><li><code><a href="../RubyXL/AdjustHandleList.html">AdjustHandleList</a></code></li><li><code><a href="../RubyXL/Alignment.html">Alignment</a></code></li><li><code><a href="../RubyXL/AlternateContent.html">AlternateContent</a></code></li><li><code><a href="../RubyXL/AlternateUrls.html">AlternateUrls</a></code></li><li><code><a href="../RubyXL/Authors.html">Authors</a></code></li><li><code><a href="../RubyXL/AutoFilter.html">AutoFilter</a></code></li><li><code><a href="../RubyXL/AutoFilterColumn.html">AutoFilterColumn</a></code></li><li><code><a href="../RubyXL/BinaryImageFile.html">BinaryImageFile</a></code></li><li><code><a href="../RubyXL/BodyProperties.html">BodyProperties</a></code></li><li><code><a href="../RubyXL/BooleanNode.html">BooleanNode</a></code></li><li><code><a href="../RubyXL/BooleanValue.html">BooleanValue</a></code></li><li><code><a href="../RubyXL/Border.html">Border</a></code></li><li><code><a href="../RubyXL/BorderEdge.html">BorderEdge</a></code></li><li><code><a href="../RubyXL/Borders.html">Borders</a></code></li><li><code><a href="../RubyXL/Break.html">Break</a></code></li><li><code><a href="../RubyXL/BreakList.html">BreakList</a></code></li><li><code><a href="../RubyXL/CT_AdjPoint2D.html">CT_AdjPoint2D</a></code></li><li><code><a href="../RubyXL/CT_AlphaBiLevelEffect.html">CT_AlphaBiLevelEffect</a></code></li><li><code><a href="../RubyXL/CT_AlphaModulateEffect.html">CT_AlphaModulateEffect</a></code></li><li><code><a href="../RubyXL/CT_AlphaModulateFixedEffect.html">CT_AlphaModulateFixedEffect</a></code></li><li><code><a href="../RubyXL/CT_AlphaOutsetEffect.html">CT_AlphaOutsetEffect</a></code></li><li><code><a href="../RubyXL/CT_AlphaReplaceEffect.html">CT_AlphaReplaceEffect</a></code></li><li><code><a href="../RubyXL/CT_Backdrop.html">CT_Backdrop</a></code></li><li><code><a href="../RubyXL/CT_Bevel.html">CT_Bevel</a></code></li><li><code><a href="../RubyXL/CT_BiLevelEffect.html">CT_BiLevelEffect</a></code></li><li><code><a href="../RubyXL/CT_BlendEffect.html">CT_BlendEffect</a></code></li><li><code><a href="../RubyXL/CT_Blip.html">CT_Blip</a></code></li><li><code><a href="../RubyXL/CT_BlipFillProperties.html">CT_BlipFillProperties</a></code></li><li><code><a href="../RubyXL/CT_BlurEffect.html">CT_BlurEffect</a></code></li><li><code><a href="../RubyXL/CT_Camera.html">CT_Camera</a></code></li><li><code><a href="../RubyXL/CT_Color.html">CT_Color</a></code></li><li><code><a href="../RubyXL/CT_ColorChangeEffect.html">CT_ColorChangeEffect</a></code></li><li><code><a href="../RubyXL/CT_ColorMapping.html">CT_ColorMapping</a></code></li><li><code><a href="../RubyXL/CT_ColorScheme.html">CT_ColorScheme</a></code></li><li><code><a href="../RubyXL/CT_ColorSchemeAndMapping.html">CT_ColorSchemeAndMapping</a></code></li><li><code><a href="../RubyXL/CT_ConnectionSite.html">CT_ConnectionSite</a></code></li><li><code><a href="../RubyXL/CT_ConnectionSiteList.html">CT_ConnectionSiteList</a></code></li><li><code><a href="../RubyXL/CT_DashStop.html">CT_DashStop</a></code></li><li><code><a href="../RubyXL/CT_DashStopList.html">CT_DashStopList</a></code></li><li><code><a href="../RubyXL/CT_DefaultShapeDefinition.html">CT_DefaultShapeDefinition</a></code></li><li><code><a href="../RubyXL/CT_DuotoneEffect.html">CT_DuotoneEffect</a></code></li><li><code><a href="../RubyXL/CT_EffectContainer.html">CT_EffectContainer</a></code></li><li><code><a href="../RubyXL/CT_EffectList.html">CT_EffectList</a></code></li><li><code><a href="../RubyXL/CT_EffectReference.html">CT_EffectReference</a></code></li><li><code><a href="../RubyXL/CT_EffectStyleItem.html">CT_EffectStyleItem</a></code></li><li><code><a href="../RubyXL/CT_EffectStyleList.html">CT_EffectStyleList</a></code></li><li><code><a href="../RubyXL/CT_EmbeddedWAVAudioFile.html">CT_EmbeddedWAVAudioFile</a></code></li><li><code><a href="../RubyXL/CT_FillEffect.html">CT_FillEffect</a></code></li><li><code><a href="../RubyXL/CT_FillOverlayEffect.html">CT_FillOverlayEffect</a></code></li><li><code><a href="../RubyXL/CT_FillStyleList.html">CT_FillStyleList</a></code></li><li><code><a href="../RubyXL/CT_FlatText.html">CT_FlatText</a></code></li><li><code><a href="../RubyXL/CT_FontCollection.html">CT_FontCollection</a></code></li><li><code><a href="../RubyXL/CT_FontReference.html">CT_FontReference</a></code></li><li><code><a href="../RubyXL/CT_GeomGuideList.html">CT_GeomGuideList</a></code></li><li><code><a href="../RubyXL/CT_GlowEffect.html">CT_GlowEffect</a></code></li><li><code><a href="../RubyXL/CT_GradientFillProperties.html">CT_GradientFillProperties</a></code></li><li><code><a href="../RubyXL/CT_GradientStop.html">CT_GradientStop</a></code></li><li><code><a href="../RubyXL/CT_GradientStopList.html">CT_GradientStopList</a></code></li><li><code><a href="../RubyXL/CT_HSLEffect.html">CT_HSLEffect</a></code></li><li><code><a href="../RubyXL/CT_HslColor.html">CT_HslColor</a></code></li><li><code><a href="../RubyXL/CT_Hyperlink.html">CT_Hyperlink</a></code></li><li><code><a href="../RubyXL/CT_InnerShadowEffect.html">CT_InnerShadowEffect</a></code></li><li><code><a href="../RubyXL/CT_LightRig.html">CT_LightRig</a></code></li><li><code><a href="../RubyXL/CT_LineEndProperties.html">CT_LineEndProperties</a></code></li><li><code><a href="../RubyXL/CT_LineJoinMiterProperties.html">CT_LineJoinMiterProperties</a></code></li><li><code><a href="../RubyXL/CT_LineProperties.html">CT_LineProperties</a></code></li><li><code><a href="../RubyXL/CT_LineStyleList.html">CT_LineStyleList</a></code></li><li><code><a href="../RubyXL/CT_LinearShadeProperties.html">CT_LinearShadeProperties</a></code></li><li><code><a href="../RubyXL/CT_LuminanceEffect.html">CT_LuminanceEffect</a></code></li><li><code><a href="../RubyXL/CT_ObjectStyleDefaults.html">CT_ObjectStyleDefaults</a></code></li><li><code><a href="../RubyXL/CT_OuterShadowEffect.html">CT_OuterShadowEffect</a></code></li><li><code><a href="../RubyXL/CT_Path2D.html">CT_Path2D</a></code></li><li><code><a href="../RubyXL/CT_Path2DArcTo.html">CT_Path2DArcTo</a></code></li><li><code><a href="../RubyXL/CT_Path2DCubicBezierTo.html">CT_Path2DCubicBezierTo</a></code></li><li><code><a href="../RubyXL/CT_Path2DList.html">CT_Path2DList</a></code></li><li><code><a href="../RubyXL/CT_Path2DQuadBezierTo.html">CT_Path2DQuadBezierTo</a></code></li><li><code><a href="../RubyXL/CT_Path2DTo.html">CT_Path2DTo</a></code></li><li><code><a href="../RubyXL/CT_PathShadeProperties.html">CT_PathShadeProperties</a></code></li><li><code><a href="../RubyXL/CT_PatternFillProperties.html">CT_PatternFillProperties</a></code></li><li><code><a href="../RubyXL/CT_Point3D.html">CT_Point3D</a></code></li><li><code><a href="../RubyXL/CT_PolarAdjustHandle.html">CT_PolarAdjustHandle</a></code></li><li><code><a href="../RubyXL/CT_PresetColor.html">CT_PresetColor</a></code></li><li><code><a href="../RubyXL/CT_PresetLineDashProperties.html">CT_PresetLineDashProperties</a></code></li><li><code><a href="../RubyXL/CT_PresetShadowEffect.html">CT_PresetShadowEffect</a></code></li><li><code><a href="../RubyXL/CT_PresetTextShape.html">CT_PresetTextShape</a></code></li><li><code><a href="../RubyXL/CT_ReflectionEffect.html">CT_ReflectionEffect</a></code></li><li><code><a href="../RubyXL/CT_RelativeOffsetEffect.html">CT_RelativeOffsetEffect</a></code></li><li><code><a href="../RubyXL/CT_RelativeRect.html">CT_RelativeRect</a></code></li><li><code><a href="../RubyXL/CT_SRgbColor.html">CT_SRgbColor</a></code></li><li><code><a href="../RubyXL/CT_ScRgbColor.html">CT_ScRgbColor</a></code></li><li><code><a href="../RubyXL/CT_Scene3D.html">CT_Scene3D</a></code></li><li><code><a href="../RubyXL/CT_SchemeColor.html">CT_SchemeColor</a></code></li><li><code><a href="../RubyXL/CT_Shape3D.html">CT_Shape3D</a></code></li><li><code><a href="../RubyXL/CT_ShapeStyle.html">CT_ShapeStyle</a></code></li><li><code><a href="../RubyXL/CT_SoftEdgesEffect.html">CT_SoftEdgesEffect</a></code></li><li><code><a href="../RubyXL/CT_SphereCoords.html">CT_SphereCoords</a></code></li><li><code><a href="../RubyXL/CT_StretchInfoProperties.html">CT_StretchInfoProperties</a></code></li><li><code><a href="../RubyXL/CT_StyleMatrix.html">CT_StyleMatrix</a></code></li><li><code><a href="../RubyXL/CT_StyleMatrixReference.html">CT_StyleMatrixReference</a></code></li><li><code><a href="../RubyXL/CT_SupplementalFont.html">CT_SupplementalFont</a></code></li><li><code><a href="../RubyXL/CT_SystemColor.html">CT_SystemColor</a></code></li><li><code><a href="../RubyXL/CT_TextAutonumberBullet.html">CT_TextAutonumberBullet</a></code></li><li><code><a href="../RubyXL/CT_TextBlipBullet.html">CT_TextBlipBullet</a></code></li><li><code><a href="../RubyXL/CT_TextCharBullet.html">CT_TextCharBullet</a></code></li><li><code><a href="../RubyXL/CT_TextCharacterProperties.html">CT_TextCharacterProperties</a></code></li><li><code><a href="../RubyXL/CT_TextFont.html">CT_TextFont</a></code></li><li><code><a href="../RubyXL/CT_TextListStyle.html">CT_TextListStyle</a></code></li><li><code><a href="../RubyXL/CT_TextNormalAutofit.html">CT_TextNormalAutofit</a></code></li><li><code><a href="../RubyXL/CT_TextParagraphProperties.html">CT_TextParagraphProperties</a></code></li><li><code><a href="../RubyXL/CT_TextSpacing.html">CT_TextSpacing</a></code></li><li><code><a href="../RubyXL/CT_TextTabStop.html">CT_TextTabStop</a></code></li><li><code><a href="../RubyXL/CT_TextTabStopList.html">CT_TextTabStopList</a></code></li><li><code><a href="../RubyXL/CT_TileInfoProperties.html">CT_TileInfoProperties</a></code></li><li><code><a href="../RubyXL/CT_TintEffect.html">CT_TintEffect</a></code></li><li><code><a href="../RubyXL/CT_Transform2D.html">CT_Transform2D</a></code></li><li><code><a href="../RubyXL/CT_TransformEffect.html">CT_TransformEffect</a></code></li><li><code><a href="../RubyXL/CT_Vector3D.html">CT_Vector3D</a></code></li><li><code><a href="../RubyXL/CT_XYAdjustHandle.html">CT_XYAdjustHandle</a></code></li><li><code><a href="../RubyXL/CalculationChain.html">CalculationChain</a></code></li><li><code><a href="../RubyXL/CalculationChainCell.html">CalculationChainCell</a></code></li><li><code><a href="../RubyXL/CalculationProperties.html">CalculationProperties</a></code></li><li><code><a href="../RubyXL/Cell.html">Cell</a></code></li><li><code><a href="../RubyXL/CellConvenienceMethods.html">CellConvenienceMethods</a></code></li><li><code><a href="../RubyXL/CellExt.html">CellExt</a></code></li><li><code><a href="../RubyXL/CellSmartTag.html">CellSmartTag</a></code></li><li><code><a href="../RubyXL/CellSmartTagProperty.html">CellSmartTagProperty</a></code></li><li><code><a href="../RubyXL/CellSmartTags.html">CellSmartTags</a></code></li><li><code><a href="../RubyXL/CellStyle.html">CellStyle</a></code></li><li><code><a href="../RubyXL/CellStyleXFs.html">CellStyleXFs</a></code></li><li><code><a href="../RubyXL/CellStyles.html">CellStyles</a></code></li><li><code><a href="../RubyXL/CellValue.html">CellValue</a></code></li><li><code><a href="../RubyXL/CellWatch.html">CellWatch</a></code></li><li><code><a href="../RubyXL/CellWatches.html">CellWatches</a></code></li><li><code><a href="../RubyXL/CellXFs.html">CellXFs</a></code></li><li><code><a href="../RubyXL/ChartColorsFile.html">ChartColorsFile</a></code></li><li><code><a href="../RubyXL/ChartFile.html">ChartFile</a></code></li><li><code><a href="../RubyXL/ChartStyleFile.html">ChartStyleFile</a></code></li><li><code><a href="../RubyXL/ChartUserShapesFile.html">ChartUserShapesFile</a></code></li><li><code><a href="../RubyXL/Chartsheet.html">Chartsheet</a></code></li><li><code><a href="../RubyXL/ChartsheetPageSetup.html">ChartsheetPageSetup</a></code></li><li><code><a href="../RubyXL/ChartsheetProperties.html">ChartsheetProperties</a></code></li><li><code><a href="../RubyXL/ChartsheetProtection.html">ChartsheetProtection</a></code></li><li><code><a href="../RubyXL/ChartsheetView.html">ChartsheetView</a></code></li><li><code><a href="../RubyXL/ChartsheetViews.html">ChartsheetViews</a></code></li><li><code><a href="../RubyXL/Color.html">Color</a></code></li><li><details><summary><code><a href="../RubyXL/ColorConvenienceClasses.html">ColorConvenienceClasses</a></code></summary><ul class="link-list nav-list"><li><code><a href="../RubyXL/ColorConvenienceClasses/HlsColor.html">HlsColor</a></code></li><li><code><a href="../RubyXL/ColorConvenienceClasses/RgbColor.html">RgbColor</a></code></li></ul></details></li><li><code><a href="../RubyXL/ColorConvenienceMethods.html">ColorConvenienceMethods</a></code></li><li><code><a href="../RubyXL/ColorFilter.html">ColorFilter</a></code></li><li><code><a href="../RubyXL/ColorScale.html">ColorScale</a></code></li><li><code><a href="../RubyXL/ColorSet.html">ColorSet</a></code></li><li><code><a href="../RubyXL/Colors.html">Colors</a></code></li><li><code><a href="../RubyXL/ColumnRange.html">ColumnRange</a></code></li><li><code><a href="../RubyXL/ColumnRanges.html">ColumnRanges</a></code></li><li><code><a href="../RubyXL/Comment.html">Comment</a></code></li><li><code><a href="../RubyXL/CommentList.html">CommentList</a></code></li><li><code><a href="../RubyXL/CommentsFile.html">CommentsFile</a></code></li><li><code><a href="../RubyXL/ConditionalFormatValue.html">ConditionalFormatValue</a></code></li><li><code><a href="../RubyXL/ConditionalFormatting.html">ConditionalFormatting</a></code></li><li><code><a href="../RubyXL/ConditionalFormattingRule.html">ConditionalFormattingRule</a></code></li><li><code><a href="../RubyXL/Connection.html">Connection</a></code></li><li><code><a href="../RubyXL/ConnectionTable.html">ConnectionTable</a></code></li><li><code><a href="../RubyXL/ConnectionTables.html">ConnectionTables</a></code></li><li><code><a href="../RubyXL/ConnectionTextField.html">ConnectionTextField</a></code></li><li><code><a href="../RubyXL/ConnectionTextFields.html">ConnectionTextFields</a></code></li><li><code><a href="../RubyXL/Connections.html">Connections</a></code></li><li><code><a href="../RubyXL/ContentTypeDefault.html">ContentTypeDefault</a></code></li><li><code><a href="../RubyXL/ContentTypeOverride.html">ContentTypeOverride</a></code></li><li><code><a href="../RubyXL/ContentTypes.html">ContentTypes</a></code></li><li><code><a href="../RubyXL/ControlPropertiesFile.html">ControlPropertiesFile</a></code></li><li><code><a href="../RubyXL/CorePropertiesFile.html">CorePropertiesFile</a></code></li><li><code><a href="../RubyXL/CustomColor.html">CustomColor</a></code></li><li><code><a href="../RubyXL/CustomColorList.html">CustomColorList</a></code></li><li><code><a href="../RubyXL/CustomFilter.html">CustomFilter</a></code></li><li><code><a href="../RubyXL/CustomFilters.html">CustomFilters</a></code></li><li><code><a href="../RubyXL/CustomGeometry.html">CustomGeometry</a></code></li><li><code><a href="../RubyXL/CustomProperties.html">CustomProperties</a></code></li><li><code><a href="../RubyXL/CustomPropertiesFile.html">CustomPropertiesFile</a></code></li><li><code><a href="../RubyXL/CustomProperty.html">CustomProperty</a></code></li><li><code><a href="../RubyXL/CustomPropertyFile.html">CustomPropertyFile</a></code></li><li><code><a href="../RubyXL/CustomSheetView.html">CustomSheetView</a></code></li><li><code><a href="../RubyXL/CustomSheetViews.html">CustomSheetViews</a></code></li><li><code><a href="../RubyXL/CustomWorkbookView.html">CustomWorkbookView</a></code></li><li><code><a href="../RubyXL/CustomWorkbookViews.html">CustomWorkbookViews</a></code></li><li><code><a href="../RubyXL/CustomXMLFile.html">CustomXMLFile</a></code></li><li><code><a href="../RubyXL/DXF.html">DXF</a></code></li><li><code><a href="../RubyXL/DXFs.html">DXFs</a></code></li><li><code><a href="../RubyXL/DataBar.html">DataBar</a></code></li><li><code><a href="../RubyXL/DataConsolidate.html">DataConsolidate</a></code></li><li><code><a href="../RubyXL/DataConsolidationReference.html">DataConsolidationReference</a></code></li><li><code><a href="../RubyXL/DataConsolidationReferences.html">DataConsolidationReferences</a></code></li><li><code><a href="../RubyXL/DataType.html">DataType</a></code></li><li><code><a href="../RubyXL/DataValidation.html">DataValidation</a></code></li><li><code><a href="../RubyXL/DataValidations.html">DataValidations</a></code></li><li><code><a href="../RubyXL/DateGroupItem.html">DateGroupItem</a></code></li><li><code><a href="../RubyXL/DefinedName.html">DefinedName</a></code></li><li><code><a href="../RubyXL/DefinedNameExt.html">DefinedNameExt</a></code></li><li><code><a href="../RubyXL/DefinedNames.html">DefinedNames</a></code></li><li><code><a href="../RubyXL/DefinedNamesExt.html">DefinedNamesExt</a></code></li><li><code><a href="../RubyXL/DocumentPropertiesFile.html">DocumentPropertiesFile</a></code></li><li><code><a href="../RubyXL/DrawingFile.html">DrawingFile</a></code></li><li><code><a href="../RubyXL/DynamicFilter.html">DynamicFilter</a></code></li><li><code><a href="../RubyXL/EmbeddedControl.html">EmbeddedControl</a></code></li><li><code><a href="../RubyXL/EmbeddedControls.html">EmbeddedControls</a></code></li><li><code><a href="../RubyXL/Extension.html">Extension</a></code></li><li><code><a href="../RubyXL/ExtensionStorageArea.html">ExtensionStorageArea</a></code></li><li><code><a href="../RubyXL/Extents.html">Extents</a></code></li><li><code><a href="../RubyXL/ExternalBook.html">ExternalBook</a></code></li><li><code><a href="../RubyXL/ExternalLinksFile.html">ExternalLinksFile</a></code></li><li><code><a href="../RubyXL/ExternalReference.html">ExternalReference</a></code></li><li><code><a href="../RubyXL/ExternalReferences.html">ExternalReferences</a></code></li><li><code><a href="../RubyXL/ExtraColorSchemeList.html">ExtraColorSchemeList</a></code></li><li><code><a href="../RubyXL/FieldItem.html">FieldItem</a></code></li><li><code><a href="../RubyXL/FileRecoveryProperties.html">FileRecoveryProperties</a></code></li><li><code><a href="../RubyXL/FileSharing.html">FileSharing</a></code></li><li><code><a href="../RubyXL/FileVersion.html">FileVersion</a></code></li><li><code><a href="../RubyXL/Fill.html">Fill</a></code></li><li><code><a href="../RubyXL/Fills.html">Fills</a></code></li><li><code><a href="../RubyXL/FilterContainer.html">FilterContainer</a></code></li><li><code><a href="../RubyXL/FloatNode.html">FloatNode</a></code></li><li><code><a href="../RubyXL/FloatValue.html">FloatValue</a></code></li><li><code><a href="../RubyXL/Font.html">Font</a></code></li><li><code><a href="../RubyXL/FontConvenienceMethods.html">FontConvenienceMethods</a></code></li><li><code><a href="../RubyXL/FontScheme.html">FontScheme</a></code></li><li><code><a href="../RubyXL/Fonts.html">Fonts</a></code></li><li><code><a href="../RubyXL/Formula.html">Formula</a></code></li><li><code><a href="../RubyXL/FunctionGroup.html">FunctionGroup</a></code></li><li><code><a href="../RubyXL/FunctionGroups.html">FunctionGroups</a></code></li><li><code><a href="../RubyXL/GenericStorageObject.html">GenericStorageObject</a></code></li><li><code><a href="../RubyXL/GradientFill.html">GradientFill</a></code></li><li><code><a href="../RubyXL/HeaderFooterSettings.html">HeaderFooterSettings</a></code></li><li><code><a href="../RubyXL/Hyperlink.html">Hyperlink</a></code></li><li><code><a href="../RubyXL/HyperlinkRelFile.html">HyperlinkRelFile</a></code></li><li><code><a href="../RubyXL/Hyperlinks.html">Hyperlinks</a></code></li><li><code><a href="../RubyXL/IconFilter.html">IconFilter</a></code></li><li><code><a href="../RubyXL/IconSet.html">IconSet</a></code></li><li><code><a href="../RubyXL/IgnoredError.html">IgnoredError</a></code></li><li><code><a href="../RubyXL/IgnoredErrors.html">IgnoredErrors</a></code></li><li><code><a href="../RubyXL/IndexedColors.html">IndexedColors</a></code></li><li><code><a href="../RubyXL/InputCells.html">InputCells</a></code></li><li><code><a href="../RubyXL/IntegerNode.html">IntegerNode</a></code></li><li><code><a href="../RubyXL/IntegerValue.html">IntegerValue</a></code></li><li><code><a href="../RubyXL/LegacyCell.html">LegacyCell</a></code></li><li><code><a href="../RubyXL/LegacyWorksheet.html">LegacyWorksheet</a></code></li><li><code><a href="../RubyXL/MRUColors.html">MRUColors</a></code></li><li><code><a href="../RubyXL/MacrosFile.html">MacrosFile</a></code></li><li><code><a href="../RubyXL/MergedCell.html">MergedCell</a></code></li><li><code><a href="../RubyXL/MergedCells.html">MergedCells</a></code></li><li><code><a href="../RubyXL/NumFmt.html">NumFmt</a></code></li><li><code><a href="../RubyXL/NumberFormat.html">NumberFormat</a></code></li><li><code><a href="../RubyXL/NumberFormats.html">NumberFormats</a></code></li><li><code><a href="../RubyXL/OLEObject.html">OLEObject</a></code></li><li><code><a href="../RubyXL/OLEObjectFile.html">OLEObjectFile</a></code></li><li><code><a href="../RubyXL/OLEObjects.html">OLEObjects</a></code></li><li><code><a href="../RubyXL/OLESize.html">OLESize</a></code></li><li><code><a href="../RubyXL/OOXMLContainerObject.html">OOXMLContainerObject</a></code></li><li><code><a href="../RubyXL/OOXMLIgnored.html">OOXMLIgnored</a></code></li><li><code><a href="../RubyXL/OOXMLObject.html">OOXMLObject</a></code></li><li><code><a href="../RubyXL/OOXMLObjectClassMethods.html">OOXMLObjectClassMethods</a></code></li><li><code><a href="../RubyXL/OOXMLObjectInstanceMethods.html">OOXMLObjectInstanceMethods</a></code></li><li><code><a href="../RubyXL/OOXMLRelationshipsFile.html">OOXMLRelationshipsFile</a></code></li><li><code><a href="../RubyXL/OOXMLTopLevelObject.html">OOXMLTopLevelObject</a></code></li><li><code><a href="../RubyXL/OdbcOleDbProperties.html">OdbcOleDbProperties</a></code></li><li><code><a href="../RubyXL/Offset.html">Offset</a></code></li><li><code><a href="../RubyXL/OlapProperties.html">OlapProperties</a></code></li><li><code><a href="../RubyXL/OleItem.html">OleItem</a></code></li><li><code><a href="../RubyXL/OleItems.html">OleItems</a></code></li><li><code><a href="../RubyXL/OleLink.html">OleLink</a></code></li><li><code><a href="../RubyXL/OutlineProperties.html">OutlineProperties</a></code></li><li><code><a href="../RubyXL/PageMargins.html">PageMargins</a></code></li><li><code><a href="../RubyXL/PageSetup.html">PageSetup</a></code></li><li><code><a href="../RubyXL/PageSetupProperties.html">PageSetupProperties</a></code></li><li><code><a href="../RubyXL/Pane.html">Pane</a></code></li><li><code><a href="../RubyXL/Parser.html">Parser</a></code></li><li><code><a href="../RubyXL/PatternFill.html">PatternFill</a></code></li><li><code><a href="../RubyXL/PersonMetadata.html">PersonMetadata</a></code></li><li><code><a href="../RubyXL/PhoneticProperties.html">PhoneticProperties</a></code></li><li><code><a href="../RubyXL/PhoneticRun.html">PhoneticRun</a></code></li><li><code><a href="../RubyXL/PivotArea.html">PivotArea</a></code></li><li><code><a href="../RubyXL/PivotCache.html">PivotCache</a></code></li><li><code><a href="../RubyXL/PivotCacheDefinitionFile.html">PivotCacheDefinitionFile</a></code></li><li><code><a href="../RubyXL/PivotCacheRecordsFile.html">PivotCacheRecordsFile</a></code></li><li><code><a href="../RubyXL/PivotCaches.html">PivotCaches</a></code></li><li><code><a href="../RubyXL/PivotReference.html">PivotReference</a></code></li><li><code><a href="../RubyXL/PivotReferences.html">PivotReferences</a></code></li><li><code><a href="../RubyXL/PivotSelection.html">PivotSelection</a></code></li><li><code><a href="../RubyXL/PivotTableFile.html">PivotTableFile</a></code></li><li><code><a href="../RubyXL/PresetGeometry.html">PresetGeometry</a></code></li><li><code><a href="../RubyXL/PrintOptions.html">PrintOptions</a></code></li><li><code><a href="../RubyXL/PrinterSettingsFile.html">PrinterSettingsFile</a></code></li><li><code><a href="../RubyXL/ProtectedRange.html">ProtectedRange</a></code></li><li><code><a href="../RubyXL/ProtectedRanges.html">ProtectedRanges</a></code></li><li><code><a href="../RubyXL/Protection.html">Protection</a></code></li><li><code><a href="../RubyXL/QueryParameter.html">QueryParameter</a></code></li><li><code><a href="../RubyXL/QueryParameters.html">QueryParameters</a></code></li><li><code><a href="../RubyXL/QueryTable.html">QueryTable</a></code></li><li><code><a href="../RubyXL/QueryTableDeletedField.html">QueryTableDeletedField</a></code></li><li><code><a href="../RubyXL/QueryTableDeletedFields.html">QueryTableDeletedFields</a></code></li><li><code><a href="../RubyXL/QueryTableField.html">QueryTableField</a></code></li><li><code><a href="../RubyXL/QueryTableFields.html">QueryTableFields</a></code></li><li><code><a href="../RubyXL/QueryTableRefresh.html">QueryTableRefresh</a></code></li><li><code><a href="../RubyXL/RID.html">RID</a></code></li><li><code><a href="../RubyXL/RawOOXML.html">RawOOXML</a></code></li><li><code><a href="../RubyXL/Reference.html">Reference</a></code></li><li><code><a href="../RubyXL/Relationship.html">Relationship</a></code></li><li><details><summary><code><a href="../RubyXL/RelationshipSupport.html">RelationshipSupport</a></code></summary><ul class="link-list nav-list"><li><code><a href="../RubyXL/RelationshipSupport/ClassMehods.html">ClassMehods</a></code></li></ul></details></li><li><code><a href="../RubyXL/RevisionPointer.html">RevisionPointer</a></code></li><li><code><a href="../RubyXL/RichText.html">RichText</a></code></li><li><code><a href="../RubyXL/RichTextRun.html">RichTextRun</a></code></li><li><code><a href="../RubyXL/Row.html">Row</a></code></li><li><code><a href="../RubyXL/RowExt.html">RowExt</a></code></li><li><code><a href="../RubyXL/RunProperties.html">RunProperties</a></code></li><li><code><a href="../RubyXL/Scenario.html">Scenario</a></code></li><li><code><a href="../RubyXL/Scenarios.html">Scenarios</a></code></li><li><code><a href="../RubyXL/Selection.html">Selection</a></code></li><li><code><a href="../RubyXL/ShapeGuide.html">ShapeGuide</a></code></li><li><code><a href="../RubyXL/ShapeTextRectangle.html">ShapeTextRectangle</a></code></li><li><code><a href="../RubyXL/SharedStringsTable.html">SharedStringsTable</a></code></li><li><code><a href="../RubyXL/Sheet.html">Sheet</a></code></li><li><code><a href="../RubyXL/SheetCalculationProperties.html">SheetCalculationProperties</a></code></li><li><code><a href="../RubyXL/SheetData.html">SheetData</a></code></li><li><code><a href="../RubyXL/SheetDataExt.html">SheetDataExt</a></code></li><li><code><a href="../RubyXL/SheetDataSet.html">SheetDataSet</a></code></li><li><code><a href="../RubyXL/SheetMetadata.html">SheetMetadata</a></code></li><li><code><a href="../RubyXL/SheetName.html">SheetName</a></code></li><li><code><a href="../RubyXL/SheetNames.html">SheetNames</a></code></li><li><code><a href="../RubyXL/Sheets.html">Sheets</a></code></li><li><code><a href="../RubyXL/SlicerCacheFile.html">SlicerCacheFile</a></code></li><li><code><a href="../RubyXL/SlicerFile.html">SlicerFile</a></code></li><li><code><a href="../RubyXL/SmartTagProperties.html">SmartTagProperties</a></code></li><li><code><a href="../RubyXL/SmartTagType.html">SmartTagType</a></code></li><li><code><a href="../RubyXL/SmartTagTypes.html">SmartTagTypes</a></code></li><li><code><a href="../RubyXL/SmartTags.html">SmartTags</a></code></li><li><code><a href="../RubyXL/SortCondition.html">SortCondition</a></code></li><li><code><a href="../RubyXL/SortState.html">SortState</a></code></li><li><code><a href="../RubyXL/Sqref.html">Sqref</a></code></li><li><code><a href="../RubyXL/Stop.html">Stop</a></code></li><li><code><a href="../RubyXL/StringNode.html">StringNode</a></code></li><li><code><a href="../RubyXL/StringNodeW3C.html">StringNodeW3C</a></code></li><li><code><a href="../RubyXL/StringValue.html">StringValue</a></code></li><li><code><a href="../RubyXL/Stylesheet.html">Stylesheet</a></code></li><li><code><a href="../RubyXL/TableFile.html">TableFile</a></code></li><li><code><a href="../RubyXL/TableParts.html">TableParts</a></code></li><li><code><a href="../RubyXL/TableStyle.html">TableStyle</a></code></li><li><code><a href="../RubyXL/TableStyles.html">TableStyles</a></code></li><li><code><a href="../RubyXL/Text.html">Text</a></code></li><li><code><a href="../RubyXL/TextImportSettings.html">TextImportSettings</a></code></li><li><code><a href="../RubyXL/Theme.html">Theme</a></code></li><li><code><a href="../RubyXL/ThemeElements.html">ThemeElements</a></code></li><li><code><a href="../RubyXL/ThumbnailFile.html">ThumbnailFile</a></code></li><li><code><a href="../RubyXL/Top10.html">Top10</a></code></li><li><code><a href="../RubyXL/VMLDrawingFile.html">VMLDrawingFile</a></code></li><li><code><a href="../RubyXL/Variant.html">Variant</a></code></li><li><code><a href="../RubyXL/Vector.html">Vector</a></code></li><li><code><a href="../RubyXL/VectorValue.html">VectorValue</a></code></li><li><code><a href="../RubyXL/VisualProperties.html">VisualProperties</a></code></li><li><code><a href="../RubyXL/WebPublishObject.html">WebPublishObject</a></code></li><li><code><a href="../RubyXL/WebPublishObjects.html">WebPublishObjects</a></code></li><li><code><a href="../RubyXL/WebPublishingItem.html">WebPublishingItem</a></code></li><li><code><a href="../RubyXL/WebPublishingItems.html">WebPublishingItems</a></code></li><li><code><a href="../RubyXL/WebPublishingProperties.html">WebPublishingProperties</a></code></li><li><code><a href="../RubyXL/WebQueryProperties.html">WebQueryProperties</a></code></li><li><code><a href="../RubyXL/Workbook.html">Workbook</a></code></li><li><code><a href="../RubyXL/WorkbookConvenienceMethods.html">WorkbookConvenienceMethods</a></code></li><li><code><a href="../RubyXL/WorkbookProperties.html">WorkbookProperties</a></code></li><li><code><a href="../RubyXL/WorkbookProtection.html">WorkbookProtection</a></code></li><li><code><a href="../RubyXL/WorkbookRoot.html">WorkbookRoot</a></code></li><li><code><a href="../RubyXL/WorkbookView.html">WorkbookView</a></code></li><li><code><a href="../RubyXL/WorkbookViews.html">WorkbookViews</a></code></li><li><code><a href="../RubyXL/Worksheet.html">Worksheet</a></code></li><li><code><a href="../RubyXL/WorksheetConvenienceMethods.html">WorksheetConvenienceMethods</a></code></li><li><code><a href="../RubyXL/WorksheetDimensions.html">WorksheetDimensions</a></code></li><li><code><a href="../RubyXL/WorksheetFormatProperties.html">WorksheetFormatProperties</a></code></li><li><code><a href="../RubyXL/WorksheetProperties.html">WorksheetProperties</a></code></li><li><code><a href="../RubyXL/WorksheetProtection.html">WorksheetProtection</a></code></li><li><code><a href="../RubyXL/WorksheetView.html">WorksheetView</a></code></li><li><code><a href="../RubyXL/WorksheetViews.html">WorksheetViews</a></code></li><li><code><a href="../RubyXL/XF.html">XF</a></code></li></ul></details></li></ul>
|
|
599
|
-
</details>
|
|
600
|
-
</div>
|
|
601
|
-
|
|
602
|
-
</nav>
|
|
603
|
-
|
|
604
|
-
<main role="main" aria-labelledby="module-rubyxl-worksheetconveniencemethods">
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
<ol role="navigation" aria-label="Breadcrumb navigation" class="breadcrumb">
|
|
608
|
-
|
|
609
|
-
<li>
|
|
610
|
-
|
|
611
|
-
<a href="../RubyXL.html">RubyXL</a><span>::</span>
|
|
612
|
-
|
|
613
|
-
</li>
|
|
614
|
-
|
|
615
|
-
<li>
|
|
616
|
-
|
|
617
|
-
<span>WorksheetConvenienceMethods</span>
|
|
618
|
-
|
|
619
|
-
</li>
|
|
620
|
-
|
|
621
|
-
</ol>
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
<span id="module-RubyXL::WorksheetConvenienceMethods" class="legacy-anchor"></span>
|
|
625
|
-
<h1 id="module-rubyxl-worksheetconveniencemethods" class="anchor-link module">
|
|
626
|
-
module RubyXL::WorksheetConvenienceMethods
|
|
627
|
-
</h1>
|
|
628
|
-
|
|
629
|
-
<section class="description">
|
|
630
|
-
|
|
631
|
-
</section>
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
<span id="5Buntitled-5D" class="legacy-anchor"></span>
|
|
635
|
-
<section class="documentation-section anchor-link">
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
<section class="constants-list">
|
|
642
|
-
<header>
|
|
643
|
-
<h3 id="untitled-constants"><a href="#untitled-constants">Constants</a></h3>
|
|
644
|
-
</header>
|
|
645
|
-
<dl>
|
|
646
|
-
|
|
647
|
-
<dt id="BOLD">BOLD</dt>
|
|
648
|
-
|
|
649
|
-
<dd>
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
</dd>
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
<dt id="COLOR">COLOR</dt>
|
|
656
|
-
|
|
657
|
-
<dd>
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
</dd>
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
<dt id="ITALICS">ITALICS</dt>
|
|
664
|
-
|
|
665
|
-
<dd>
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
</dd>
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
<dt id="NAME">NAME</dt>
|
|
672
|
-
|
|
673
|
-
<dd>
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
</dd>
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
<dt id="SIZE">SIZE</dt>
|
|
680
|
-
|
|
681
|
-
<dd>
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
</dd>
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
<dt id="STRIKETHROUGH">STRIKETHROUGH</dt>
|
|
688
|
-
|
|
689
|
-
<dd>
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
</dd>
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<dt id="UNDERLINE">UNDERLINE</dt>
|
|
696
|
-
|
|
697
|
-
<dd>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</dd>
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
</dl>
|
|
704
|
-
</section>
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
<section id="public-instance-untitled-method-details" class="method-section anchor-link">
|
|
720
|
-
<header>
|
|
721
|
-
<h3 id="public-instance-untitled-methods"><a href="#public-instance-untitled-methods">Public Instance Methods</a></h3>
|
|
722
|
-
</header>
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
<div id="method-i-add_validation_list" class="method-detail anchor-link ">
|
|
726
|
-
<div class="method-header">
|
|
727
|
-
|
|
728
|
-
<div class="method-heading">
|
|
729
|
-
<a href="#method-i-add_validation_list" title="Link to this method">
|
|
730
|
-
<span class="method-name">add_validation_list</span>
|
|
731
|
-
<span class="method-args">(ref, list_arr)</span>
|
|
732
|
-
</a>
|
|
733
|
-
</div>
|
|
734
|
-
|
|
735
|
-
</div>
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
<div class="method-controls">
|
|
739
|
-
<details class="method-source-toggle">
|
|
740
|
-
<summary>Source</summary>
|
|
741
|
-
</details>
|
|
742
|
-
</div>
|
|
743
|
-
<div class="method-source-code" id="add_validation_list-source">
|
|
744
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 731</span>
|
|
745
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_validation_list</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">list_arr</span>)
|
|
746
|
-
<span class="ruby-comment"># "Any double quote characters in the value should be escaped with another double quote.</span>
|
|
747
|
-
<span class="ruby-comment"># If the value does not contain a comma, newline or double quote, then the String value should be returned unchanged.</span>
|
|
748
|
-
<span class="ruby-comment"># If the value contains a comma, newline or double quote, then the String value should be returned enclosed in double quotes."</span>
|
|
749
|
-
<span class="ruby-identifier">expr</span> = <span class="ruby-string">'"'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list_arr</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'"'</span>, <span class="ruby-string">'""'</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">','</span>) <span class="ruby-operator">+</span> <span class="ruby-string">'"'</span>
|
|
750
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidations</span>.<span class="ruby-identifier">new</span>
|
|
751
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator"><<</span>
|
|
752
|
-
<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidation</span>.<span class="ruby-identifier">new</span>({<span class="ruby-value">:sqref</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ref</span>),
|
|
753
|
-
<span class="ruby-value">:formula1</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Formula</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:expression</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">expr</span>),
|
|
754
|
-
<span class="ruby-value">:type</span> <span class="ruby-operator">=></span> <span class="ruby-string">'list'</span>})
|
|
755
|
-
<span class="ruby-keyword">end</span></pre>
|
|
756
|
-
</div>
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
<div class="method-description">
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
</div>
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
</div>
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
<div id="method-i-change_column_alignment" class="method-detail anchor-link ">
|
|
776
|
-
<div class="method-header">
|
|
777
|
-
|
|
778
|
-
<div class="method-heading">
|
|
779
|
-
<a href="#method-i-change_column_alignment" title="Link to this method">
|
|
780
|
-
<span class="method-name">change_column_alignment</span>
|
|
781
|
-
<span class="method-args">(column_index, &block)</span>
|
|
782
|
-
</a>
|
|
783
|
-
</div>
|
|
784
|
-
|
|
785
|
-
</div>
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
<div class="method-controls">
|
|
789
|
-
<details class="method-source-toggle">
|
|
790
|
-
<summary>Source</summary>
|
|
791
|
-
</details>
|
|
792
|
-
</div>
|
|
793
|
-
<div class="method-source-code" id="change_column_alignment-source">
|
|
794
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 686</span>
|
|
795
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
796
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
797
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
798
|
-
|
|
799
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
800
|
-
<span class="ruby-comment"># Excel gets confused if width is not explicitly set for a column that had alignment changes</span>
|
|
801
|
-
<span class="ruby-identifier">change_column_width</span>(<span class="ruby-identifier">column_index</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">nil?</span>
|
|
802
|
-
|
|
803
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
|
804
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
|
805
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
|
806
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
807
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
808
|
-
}
|
|
809
|
-
<span class="ruby-keyword">end</span></pre>
|
|
810
|
-
</div>
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
<div class="method-description">
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
</div>
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
</div>
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
<div id="method-i-change_column_bold" class="method-detail anchor-link ">
|
|
830
|
-
<div class="method-header">
|
|
831
|
-
|
|
832
|
-
<div class="method-heading">
|
|
833
|
-
<a href="#method-i-change_column_bold" title="Link to this method">
|
|
834
|
-
<span class="method-name">change_column_bold</span>
|
|
835
|
-
<span class="method-args">(column_index, bolded = false)</span>
|
|
836
|
-
</a>
|
|
837
|
-
</div>
|
|
838
|
-
|
|
839
|
-
</div>
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
<div class="method-controls">
|
|
843
|
-
<details class="method-source-toggle">
|
|
844
|
-
<summary>Source</summary>
|
|
845
|
-
</details>
|
|
846
|
-
</div>
|
|
847
|
-
<div class="method-source-code" id="change_column_bold-source">
|
|
848
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 617</span>
|
|
849
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_bold</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
|
|
850
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
851
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
852
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
|
|
853
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
854
|
-
<span class="ruby-keyword">end</span></pre>
|
|
855
|
-
</div>
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
<div class="method-description">
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
</div>
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
</div>
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
<div id="method-i-change_column_border" class="method-detail anchor-link ">
|
|
875
|
-
<div class="method-header">
|
|
876
|
-
|
|
877
|
-
<div class="method-heading">
|
|
878
|
-
<a href="#method-i-change_column_border" title="Link to this method">
|
|
879
|
-
<span class="method-name">change_column_border</span>
|
|
880
|
-
<span class="method-args">(column_index, direction, weight)</span>
|
|
881
|
-
</a>
|
|
882
|
-
</div>
|
|
883
|
-
|
|
884
|
-
</div>
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
<div class="method-controls">
|
|
888
|
-
<details class="method-source-toggle">
|
|
889
|
-
<summary>Source</summary>
|
|
890
|
-
</details>
|
|
891
|
-
</div>
|
|
892
|
-
<div class="method-source-code" id="change_column_border-source">
|
|
893
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 646</span>
|
|
894
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_border</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
895
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
896
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
897
|
-
|
|
898
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
899
|
-
|
|
900
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
|
901
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
|
902
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
|
|
903
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
904
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
905
|
-
}
|
|
906
|
-
<span class="ruby-keyword">end</span></pre>
|
|
907
|
-
</div>
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
<div class="method-description">
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
</div>
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
</div>
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
<div id="method-i-change_column_border_color" class="method-detail anchor-link ">
|
|
927
|
-
<div class="method-header">
|
|
928
|
-
|
|
929
|
-
<div class="method-heading">
|
|
930
|
-
<a href="#method-i-change_column_border_color" title="Link to this method">
|
|
931
|
-
<span class="method-name">change_column_border_color</span>
|
|
932
|
-
<span class="method-args">(column_index, direction, color)</span>
|
|
933
|
-
</a>
|
|
934
|
-
</div>
|
|
935
|
-
|
|
936
|
-
</div>
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
<div class="method-controls">
|
|
940
|
-
<details class="method-source-toggle">
|
|
941
|
-
<summary>Source</summary>
|
|
942
|
-
</details>
|
|
943
|
-
</div>
|
|
944
|
-
<div class="method-source-code" id="change_column_border_color-source">
|
|
945
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 660</span>
|
|
946
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_border_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
|
947
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
948
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
949
|
-
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)
|
|
950
|
-
|
|
951
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border_color</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
|
952
|
-
|
|
953
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
|
954
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
|
|
955
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border_color</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
956
|
-
}
|
|
957
|
-
<span class="ruby-keyword">end</span></pre>
|
|
958
|
-
</div>
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
<div class="method-description">
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
</div>
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
</div>
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
<div id="method-i-change_column_fill" class="method-detail anchor-link ">
|
|
978
|
-
<div class="method-header">
|
|
979
|
-
|
|
980
|
-
<div class="method-heading">
|
|
981
|
-
<a href="#method-i-change_column_fill" title="Link to this method">
|
|
982
|
-
<span class="method-name">change_column_fill</span>
|
|
983
|
-
<span class="method-args">(column_index, color_code = 'ffffff')</span>
|
|
984
|
-
</a>
|
|
985
|
-
</div>
|
|
986
|
-
|
|
987
|
-
</div>
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
<div class="method-controls">
|
|
991
|
-
<details class="method-source-toggle">
|
|
992
|
-
<summary>Source</summary>
|
|
993
|
-
</details>
|
|
994
|
-
</div>
|
|
995
|
-
<div class="method-source-code" id="change_column_fill-source">
|
|
996
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 412</span>
|
|
997
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_fill</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">color_code</span> = <span class="ruby-string">'ffffff'</span>)
|
|
998
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
999
|
-
<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color_code</span>)
|
|
1000
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
1001
|
-
|
|
1002
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">color_code</span>)
|
|
1003
|
-
|
|
1004
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
|
1005
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
|
1006
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
|
1007
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
1008
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">color_code</span>)
|
|
1009
|
-
}
|
|
1010
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1011
|
-
</div>
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
<div class="method-description">
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
</div>
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
</div>
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
<div id="method-i-change_column_font" class="method-detail anchor-link ">
|
|
1031
|
-
<div class="method-header">
|
|
1032
|
-
|
|
1033
|
-
<div class="method-heading">
|
|
1034
|
-
<a href="#method-i-change_column_font" title="Link to this method">
|
|
1035
|
-
<span class="method-name">change_column_font</span>
|
|
1036
|
-
<span class="method-args">(column_index, change_type, arg, font, xf)</span>
|
|
1037
|
-
</a>
|
|
1038
|
-
</div>
|
|
1039
|
-
|
|
1040
|
-
</div>
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
<div class="method-controls">
|
|
1044
|
-
<details class="method-source-toggle">
|
|
1045
|
-
<summary>Source</summary>
|
|
1046
|
-
</details>
|
|
1047
|
-
</div>
|
|
1048
|
-
<div class="method-source-code" id="change_column_font-source">
|
|
1049
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 574</span>
|
|
1050
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1051
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1052
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
1053
|
-
|
|
1054
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1055
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
|
1056
|
-
|
|
1057
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
|
1058
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
|
1059
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">font_switch</span>(<span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
1060
|
-
}
|
|
1061
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1062
|
-
</div>
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
<div class="method-description">
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
<p>Helper method to update the fonts and cell styles array main method to change font, called from each separate font mutator method</p>
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
</div>
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
</div>
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
<div id="method-i-change_column_font_color" class="method-detail anchor-link ">
|
|
1082
|
-
<div class="method-header">
|
|
1083
|
-
|
|
1084
|
-
<div class="method-heading">
|
|
1085
|
-
<a href="#method-i-change_column_font_color" title="Link to this method">
|
|
1086
|
-
<span class="method-name">change_column_font_color</span>
|
|
1087
|
-
<span class="method-args">(column_index, font_color='000000')</span>
|
|
1088
|
-
</a>
|
|
1089
|
-
</div>
|
|
1090
|
-
|
|
1091
|
-
</div>
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
<div class="method-controls">
|
|
1095
|
-
<details class="method-source-toggle">
|
|
1096
|
-
<summary>Source</summary>
|
|
1097
|
-
</details>
|
|
1098
|
-
</div>
|
|
1099
|
-
<div class="method-source-code" id="change_column_font_color-source">
|
|
1100
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 601</span>
|
|
1101
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_color</span>=<span class="ruby-string">'000000'</span>)
|
|
1102
|
-
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
|
|
1103
|
-
|
|
1104
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
1105
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
1106
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_rgb_color</span>(<span class="ruby-identifier">font_color</span>)
|
|
1107
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">COLOR</span>, <span class="ruby-identifier">font_color</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1108
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1109
|
-
</div>
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
<div class="method-description">
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
</div>
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
</div>
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
<div id="method-i-change_column_font_name" class="method-detail anchor-link ">
|
|
1129
|
-
<div class="method-header">
|
|
1130
|
-
|
|
1131
|
-
<div class="method-heading">
|
|
1132
|
-
<a href="#method-i-change_column_font_name" title="Link to this method">
|
|
1133
|
-
<span class="method-name">change_column_font_name</span>
|
|
1134
|
-
<span class="method-args">(column_index = 0, font_name = 'Verdana')</span>
|
|
1135
|
-
</a>
|
|
1136
|
-
</div>
|
|
1137
|
-
|
|
1138
|
-
</div>
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
<div class="method-controls">
|
|
1142
|
-
<details class="method-source-toggle">
|
|
1143
|
-
<summary>Source</summary>
|
|
1144
|
-
</details>
|
|
1145
|
-
</div>
|
|
1146
|
-
<div class="method-source-code" id="change_column_font_name-source">
|
|
1147
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 587</span>
|
|
1148
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_name</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">'Verdana'</span>)
|
|
1149
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
1150
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
1151
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
|
|
1152
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1153
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1154
|
-
</div>
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
<div class="method-description">
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
</div>
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
</div>
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
<div id="method-i-change_column_font_size" class="method-detail anchor-link ">
|
|
1174
|
-
<div class="method-header">
|
|
1175
|
-
|
|
1176
|
-
<div class="method-heading">
|
|
1177
|
-
<a href="#method-i-change_column_font_size" title="Link to this method">
|
|
1178
|
-
<span class="method-name">change_column_font_size</span>
|
|
1179
|
-
<span class="method-args">(column_index, font_size=10)</span>
|
|
1180
|
-
</a>
|
|
1181
|
-
</div>
|
|
1182
|
-
|
|
1183
|
-
</div>
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
<div class="method-controls">
|
|
1187
|
-
<details class="method-source-toggle">
|
|
1188
|
-
<summary>Source</summary>
|
|
1189
|
-
</details>
|
|
1190
|
-
</div>
|
|
1191
|
-
<div class="method-source-code" id="change_column_font_size-source">
|
|
1192
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 594</span>
|
|
1193
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_size</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
|
|
1194
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
1195
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
1196
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
|
|
1197
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1198
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1199
|
-
</div>
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
<div class="method-description">
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
</div>
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
</div>
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
<div id="method-i-change_column_horizontal_alignment" class="method-detail anchor-link ">
|
|
1219
|
-
<div class="method-header">
|
|
1220
|
-
|
|
1221
|
-
<div class="method-heading">
|
|
1222
|
-
<a href="#method-i-change_column_horizontal_alignment" title="Link to this method">
|
|
1223
|
-
<span class="method-name">change_column_horizontal_alignment</span>
|
|
1224
|
-
<span class="method-args">(column_index, alignment = 'center')</span>
|
|
1225
|
-
</a>
|
|
1226
|
-
</div>
|
|
1227
|
-
|
|
1228
|
-
</div>
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
<div class="method-controls">
|
|
1232
|
-
<details class="method-source-toggle">
|
|
1233
|
-
<summary>Source</summary>
|
|
1234
|
-
</details>
|
|
1235
|
-
</div>
|
|
1236
|
-
<div class="method-source-code" id="change_column_horizontal_alignment-source">
|
|
1237
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 638</span>
|
|
1238
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_horizontal_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
|
|
1239
|
-
<span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
|
|
1240
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1241
|
-
</div>
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
<div class="method-description">
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
</div>
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
</div>
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
<div id="method-i-change_column_italics" class="method-detail anchor-link ">
|
|
1261
|
-
<div class="method-header">
|
|
1262
|
-
|
|
1263
|
-
<div class="method-heading">
|
|
1264
|
-
<a href="#method-i-change_column_italics" title="Link to this method">
|
|
1265
|
-
<span class="method-name">change_column_italics</span>
|
|
1266
|
-
<span class="method-args">(column_index, italicized = false)</span>
|
|
1267
|
-
</a>
|
|
1268
|
-
</div>
|
|
1269
|
-
|
|
1270
|
-
</div>
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
<div class="method-controls">
|
|
1274
|
-
<details class="method-source-toggle">
|
|
1275
|
-
<summary>Source</summary>
|
|
1276
|
-
</details>
|
|
1277
|
-
</div>
|
|
1278
|
-
<div class="method-source-code" id="change_column_italics-source">
|
|
1279
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 610</span>
|
|
1280
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_italics</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
|
|
1281
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
1282
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
1283
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
|
|
1284
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1285
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1286
|
-
</div>
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
<div class="method-description">
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
</div>
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
</div>
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
<div id="method-i-change_column_strikethrough" class="method-detail anchor-link ">
|
|
1306
|
-
<div class="method-header">
|
|
1307
|
-
|
|
1308
|
-
<div class="method-heading">
|
|
1309
|
-
<a href="#method-i-change_column_strikethrough" title="Link to this method">
|
|
1310
|
-
<span class="method-name">change_column_strikethrough</span>
|
|
1311
|
-
<span class="method-args">(column_index, struckthrough=false)</span>
|
|
1312
|
-
</a>
|
|
1313
|
-
</div>
|
|
1314
|
-
|
|
1315
|
-
</div>
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
<div class="method-controls">
|
|
1319
|
-
<details class="method-source-toggle">
|
|
1320
|
-
<summary>Source</summary>
|
|
1321
|
-
</details>
|
|
1322
|
-
</div>
|
|
1323
|
-
<div class="method-source-code" id="change_column_strikethrough-source">
|
|
1324
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 631</span>
|
|
1325
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_strikethrough</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
|
|
1326
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
1327
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
1328
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
|
|
1329
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1330
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1331
|
-
</div>
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
<div class="method-description">
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
</div>
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
</div>
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
<div id="method-i-change_column_underline" class="method-detail anchor-link ">
|
|
1351
|
-
<div class="method-header">
|
|
1352
|
-
|
|
1353
|
-
<div class="method-heading">
|
|
1354
|
-
<a href="#method-i-change_column_underline" title="Link to this method">
|
|
1355
|
-
<span class="method-name">change_column_underline</span>
|
|
1356
|
-
<span class="method-args">(column_index, underlined = false)</span>
|
|
1357
|
-
</a>
|
|
1358
|
-
</div>
|
|
1359
|
-
|
|
1360
|
-
</div>
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
<div class="method-controls">
|
|
1364
|
-
<details class="method-source-toggle">
|
|
1365
|
-
<summary>Source</summary>
|
|
1366
|
-
</details>
|
|
1367
|
-
</div>
|
|
1368
|
-
<div class="method-source-code" id="change_column_underline-source">
|
|
1369
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 624</span>
|
|
1370
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_underline</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">underlined</span> = <span class="ruby-keyword">false</span>)
|
|
1371
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
|
1372
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
|
|
1373
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
|
|
1374
|
-
<span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
|
|
1375
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1376
|
-
</div>
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
<div class="method-description">
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
</div>
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
</div>
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
<div id="method-i-change_column_vertical_alignment" class="method-detail anchor-link ">
|
|
1396
|
-
<div class="method-header">
|
|
1397
|
-
|
|
1398
|
-
<div class="method-heading">
|
|
1399
|
-
<a href="#method-i-change_column_vertical_alignment" title="Link to this method">
|
|
1400
|
-
<span class="method-name">change_column_vertical_alignment</span>
|
|
1401
|
-
<span class="method-args">(column_index, alignment = 'center')</span>
|
|
1402
|
-
</a>
|
|
1403
|
-
</div>
|
|
1404
|
-
|
|
1405
|
-
</div>
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
<div class="method-controls">
|
|
1409
|
-
<details class="method-source-toggle">
|
|
1410
|
-
<summary>Source</summary>
|
|
1411
|
-
</details>
|
|
1412
|
-
</div>
|
|
1413
|
-
<div class="method-source-code" id="change_column_vertical_alignment-source">
|
|
1414
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 642</span>
|
|
1415
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_vertical_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
|
|
1416
|
-
<span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
|
|
1417
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1418
|
-
</div>
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
<div class="method-description">
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
</div>
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
</div>
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
<div id="method-i-change_column_width" class="method-detail anchor-link ">
|
|
1438
|
-
<div class="method-header">
|
|
1439
|
-
|
|
1440
|
-
<div class="method-heading">
|
|
1441
|
-
<a href="#method-i-change_column_width" title="Link to this method">
|
|
1442
|
-
<span class="method-name">change_column_width</span>
|
|
1443
|
-
<span class="method-args">(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)</span>
|
|
1444
|
-
</a>
|
|
1445
|
-
</div>
|
|
1446
|
-
|
|
1447
|
-
</div>
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
<div class="method-controls">
|
|
1451
|
-
<details class="method-source-toggle">
|
|
1452
|
-
<summary>Source</summary>
|
|
1453
|
-
</details>
|
|
1454
|
-
</div>
|
|
1455
|
-
<div class="method-source-code" id="change_column_width-source">
|
|
1456
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 395</span>
|
|
1457
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_width</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width_in_chars</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span>)
|
|
1458
|
-
<span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-identifier">chars2raw</span>(<span class="ruby-identifier">width_in_chars</span>))
|
|
1459
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1460
|
-
</div>
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
<div class="method-description">
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
<p>Get column width measured in number of digits, as per <a href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
</div>
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
</div>
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
<div id="method-i-change_column_width_raw" class="method-detail anchor-link ">
|
|
1480
|
-
<div class="method-header">
|
|
1481
|
-
|
|
1482
|
-
<div class="method-heading">
|
|
1483
|
-
<a href="#method-i-change_column_width_raw" title="Link to this method">
|
|
1484
|
-
<span class="method-name">change_column_width_raw</span>
|
|
1485
|
-
<span class="method-args">(column_index, width)</span>
|
|
1486
|
-
</a>
|
|
1487
|
-
</div>
|
|
1488
|
-
|
|
1489
|
-
</div>
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
<div class="method-controls">
|
|
1493
|
-
<details class="method-source-toggle">
|
|
1494
|
-
<summary>Source</summary>
|
|
1495
|
-
</details>
|
|
1496
|
-
</div>
|
|
1497
|
-
<div class="method-source-code" id="change_column_width_raw-source">
|
|
1498
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 385</span>
|
|
1499
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width</span>)
|
|
1500
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1501
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
1502
|
-
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
|
|
1503
|
-
<span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span> = <span class="ruby-identifier">width</span>
|
|
1504
|
-
<span class="ruby-identifier">range</span>.<span class="ruby-identifier">custom_width</span> = <span class="ruby-keyword">true</span>
|
|
1505
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1506
|
-
</div>
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
<div class="method-description">
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
<p>Set raw column width value</p>
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
</div>
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
</div>
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
<div id="method-i-change_row_alignment" class="method-detail anchor-link ">
|
|
1526
|
-
<div class="method-header">
|
|
1527
|
-
|
|
1528
|
-
<div class="method-heading">
|
|
1529
|
-
<a href="#method-i-change_row_alignment" title="Link to this method">
|
|
1530
|
-
<span class="method-name">change_row_alignment</span>
|
|
1531
|
-
<span class="method-args">(row, &block)</span>
|
|
1532
|
-
</a>
|
|
1533
|
-
</div>
|
|
1534
|
-
|
|
1535
|
-
</div>
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
<div class="method-controls">
|
|
1539
|
-
<details class="method-source-toggle">
|
|
1540
|
-
<summary>Source</summary>
|
|
1541
|
-
</details>
|
|
1542
|
-
</div>
|
|
1543
|
-
<div class="method-source-code" id="change_row_alignment-source">
|
|
1544
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 673</span>
|
|
1545
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
1546
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1547
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
|
1548
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1549
|
-
|
|
1550
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
1551
|
-
|
|
1552
|
-
<span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
|
1553
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
1554
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
1555
|
-
}
|
|
1556
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1557
|
-
</div>
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
<div class="method-description">
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
</div>
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
</div>
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
<div id="method-i-change_row_bold" class="method-detail anchor-link ">
|
|
1577
|
-
<div class="method-header">
|
|
1578
|
-
|
|
1579
|
-
<div class="method-heading">
|
|
1580
|
-
<a href="#method-i-change_row_bold" title="Link to this method">
|
|
1581
|
-
<span class="method-name">change_row_bold</span>
|
|
1582
|
-
<span class="method-args">(row = 0, bolded = false)</span>
|
|
1583
|
-
</a>
|
|
1584
|
-
</div>
|
|
1585
|
-
|
|
1586
|
-
</div>
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
<div class="method-controls">
|
|
1590
|
-
<details class="method-source-toggle">
|
|
1591
|
-
<summary>Source</summary>
|
|
1592
|
-
</details>
|
|
1593
|
-
</div>
|
|
1594
|
-
<div class="method-source-code" id="change_row_bold-source">
|
|
1595
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 542</span>
|
|
1596
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_bold</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
|
|
1597
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1598
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
1599
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
|
|
1600
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>)
|
|
1601
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1602
|
-
</div>
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
<div class="method-description">
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
</div>
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
</div>
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
<div id="method-i-change_row_border" class="method-detail anchor-link ">
|
|
1622
|
-
<div class="method-header">
|
|
1623
|
-
|
|
1624
|
-
<div class="method-heading">
|
|
1625
|
-
<a href="#method-i-change_row_border" title="Link to this method">
|
|
1626
|
-
<span class="method-name">change_row_border</span>
|
|
1627
|
-
<span class="method-args">(row, direction, weight)</span>
|
|
1628
|
-
</a>
|
|
1629
|
-
</div>
|
|
1630
|
-
|
|
1631
|
-
</div>
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
<div class="method-controls">
|
|
1635
|
-
<details class="method-source-toggle">
|
|
1636
|
-
<summary>Source</summary>
|
|
1637
|
-
</details>
|
|
1638
|
-
</div>
|
|
1639
|
-
<div class="method-source-code" id="change_row_border-source">
|
|
1640
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 468</span>
|
|
1641
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
1642
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1643
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1644
|
-
|
|
1645
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
1646
|
-
|
|
1647
|
-
<span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
|
1648
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
1649
|
-
}
|
|
1650
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1651
|
-
</div>
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
<div class="method-description">
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
</div>
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
</div>
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
<div id="method-i-change_row_border_color" class="method-detail anchor-link ">
|
|
1671
|
-
<div class="method-header">
|
|
1672
|
-
|
|
1673
|
-
<div class="method-heading">
|
|
1674
|
-
<a href="#method-i-change_row_border_color" title="Link to this method">
|
|
1675
|
-
<span class="method-name">change_row_border_color</span>
|
|
1676
|
-
<span class="method-args">(row, direction, color = '000000')</span>
|
|
1677
|
-
</a>
|
|
1678
|
-
</div>
|
|
1679
|
-
|
|
1680
|
-
</div>
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
<div class="method-controls">
|
|
1684
|
-
<details class="method-source-toggle">
|
|
1685
|
-
<summary>Source</summary>
|
|
1686
|
-
</details>
|
|
1687
|
-
</div>
|
|
1688
|
-
<div class="method-source-code" id="change_row_border_color-source">
|
|
1689
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 479</span>
|
|
1690
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span> = <span class="ruby-string">'000000'</span>)
|
|
1691
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1692
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1693
|
-
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)
|
|
1694
|
-
|
|
1695
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border_color</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
|
1696
|
-
|
|
1697
|
-
<span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
|
1698
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border_color</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
1699
|
-
}
|
|
1700
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1701
|
-
</div>
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
<div class="method-description">
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
</div>
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
</div>
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
<div id="method-i-change_row_fill" class="method-detail anchor-link ">
|
|
1721
|
-
<div class="method-header">
|
|
1722
|
-
|
|
1723
|
-
<div class="method-heading">
|
|
1724
|
-
<a href="#method-i-change_row_fill" title="Link to this method">
|
|
1725
|
-
<span class="method-name">change_row_fill</span>
|
|
1726
|
-
<span class="method-args">(row_index = 0, rgb = 'ffffff')</span>
|
|
1727
|
-
</a>
|
|
1728
|
-
</div>
|
|
1729
|
-
|
|
1730
|
-
</div>
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
<div class="method-controls">
|
|
1734
|
-
<details class="method-source-toggle">
|
|
1735
|
-
<summary>Source</summary>
|
|
1736
|
-
</details>
|
|
1737
|
-
</div>
|
|
1738
|
-
<div class="method-source-code" id="change_row_fill-source">
|
|
1739
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 491</span>
|
|
1740
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_fill</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">rgb</span> = <span class="ruby-string">'ffffff'</span>)
|
|
1741
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1742
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
|
1743
|
-
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">rgb</span>)
|
|
1744
|
-
|
|
1745
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row_index</span>), <span class="ruby-identifier">rgb</span>)
|
|
1746
|
-
<span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">rgb</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
|
|
1747
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1748
|
-
</div>
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
<div class="method-description">
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
</div>
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
</div>
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
<div id="method-i-change_row_font" class="method-detail anchor-link ">
|
|
1768
|
-
<div class="method-header">
|
|
1769
|
-
|
|
1770
|
-
<div class="method-heading">
|
|
1771
|
-
<a href="#method-i-change_row_font" title="Link to this method">
|
|
1772
|
-
<span class="method-name">change_row_font</span>
|
|
1773
|
-
<span class="method-args">(row_index, change_type, arg, font)</span>
|
|
1774
|
-
</a>
|
|
1775
|
-
</div>
|
|
1776
|
-
|
|
1777
|
-
</div>
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
<div class="method-controls">
|
|
1781
|
-
<details class="method-source-toggle">
|
|
1782
|
-
<summary>Source</summary>
|
|
1783
|
-
</details>
|
|
1784
|
-
</div>
|
|
1785
|
-
<div class="method-source-code" id="change_row_font-source">
|
|
1786
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 503</span>
|
|
1787
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>)
|
|
1788
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1789
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
|
1790
|
-
|
|
1791
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">font</span>, <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row_index</span>))
|
|
1792
|
-
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>]
|
|
1793
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
|
1794
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">font_switch</span>(<span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
|
|
1795
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1796
|
-
</div>
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
<div class="method-description">
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
<p>Helper method to update the row styles array change_type - <a href="WorksheetConvenienceMethods.html#NAME"><code>NAME</code></a> or <a href="WorksheetConvenienceMethods.html#SIZE"><code>SIZE</code></a> or <a href="WorksheetConvenienceMethods.html#COLOR"><code>COLOR</code></a> etc main method to change font, called from each separate font mutator method</p>
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
</div>
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
</div>
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
<div id="method-i-change_row_font_color" class="method-detail anchor-link ">
|
|
1816
|
-
<div class="method-header">
|
|
1817
|
-
|
|
1818
|
-
<div class="method-heading">
|
|
1819
|
-
<a href="#method-i-change_row_font_color" title="Link to this method">
|
|
1820
|
-
<span class="method-name">change_row_font_color</span>
|
|
1821
|
-
<span class="method-args">(row = 0, font_color = '000000')</span>
|
|
1822
|
-
</a>
|
|
1823
|
-
</div>
|
|
1824
|
-
|
|
1825
|
-
</div>
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
<div class="method-controls">
|
|
1829
|
-
<details class="method-source-toggle">
|
|
1830
|
-
<summary>Source</summary>
|
|
1831
|
-
</details>
|
|
1832
|
-
</div>
|
|
1833
|
-
<div class="method-source-code" id="change_row_font_color-source">
|
|
1834
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 527</span>
|
|
1835
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_color</span> = <span class="ruby-string">'000000'</span>)
|
|
1836
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1837
|
-
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
|
|
1838
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
1839
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_rgb_color</span>(<span class="ruby-identifier">font_color</span>)
|
|
1840
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">COLOR</span>, <span class="ruby-identifier">font_color</span>, <span class="ruby-identifier">font</span>)
|
|
1841
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1842
|
-
</div>
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
<div class="method-description">
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
</div>
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
</div>
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
<div id="method-i-change_row_font_name" class="method-detail anchor-link ">
|
|
1862
|
-
<div class="method-header">
|
|
1863
|
-
|
|
1864
|
-
<div class="method-heading">
|
|
1865
|
-
<a href="#method-i-change_row_font_name" title="Link to this method">
|
|
1866
|
-
<span class="method-name">change_row_font_name</span>
|
|
1867
|
-
<span class="method-args">(row = 0, font_name = 'Verdana')</span>
|
|
1868
|
-
</a>
|
|
1869
|
-
</div>
|
|
1870
|
-
|
|
1871
|
-
</div>
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
<div class="method-controls">
|
|
1875
|
-
<details class="method-source-toggle">
|
|
1876
|
-
<summary>Source</summary>
|
|
1877
|
-
</details>
|
|
1878
|
-
</div>
|
|
1879
|
-
<div class="method-source-code" id="change_row_font_name-source">
|
|
1880
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 513</span>
|
|
1881
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">'Verdana'</span>)
|
|
1882
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1883
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
1884
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
|
|
1885
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>)
|
|
1886
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1887
|
-
</div>
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
<div class="method-description">
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
</div>
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
</div>
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
<div id="method-i-change_row_font_size" class="method-detail anchor-link ">
|
|
1907
|
-
<div class="method-header">
|
|
1908
|
-
|
|
1909
|
-
<div class="method-heading">
|
|
1910
|
-
<a href="#method-i-change_row_font_size" title="Link to this method">
|
|
1911
|
-
<span class="method-name">change_row_font_size</span>
|
|
1912
|
-
<span class="method-args">(row = 0, font_size=10)</span>
|
|
1913
|
-
</a>
|
|
1914
|
-
</div>
|
|
1915
|
-
|
|
1916
|
-
</div>
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
<div class="method-controls">
|
|
1920
|
-
<details class="method-source-toggle">
|
|
1921
|
-
<summary>Source</summary>
|
|
1922
|
-
</details>
|
|
1923
|
-
</div>
|
|
1924
|
-
<div class="method-source-code" id="change_row_font_size-source">
|
|
1925
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 520</span>
|
|
1926
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
|
|
1927
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1928
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
1929
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
|
|
1930
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>)
|
|
1931
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1932
|
-
</div>
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
<div class="method-description">
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
</div>
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
</div>
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
<div id="method-i-change_row_height" class="method-detail anchor-link ">
|
|
1952
|
-
<div class="method-header">
|
|
1953
|
-
|
|
1954
|
-
<div class="method-heading">
|
|
1955
|
-
<a href="#method-i-change_row_height" title="Link to this method">
|
|
1956
|
-
<span class="method-name">change_row_height</span>
|
|
1957
|
-
<span class="method-args">(row = 0, height = 10)</span>
|
|
1958
|
-
</a>
|
|
1959
|
-
</div>
|
|
1960
|
-
|
|
1961
|
-
</div>
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
<div class="method-controls">
|
|
1965
|
-
<details class="method-source-toggle">
|
|
1966
|
-
<summary>Source</summary>
|
|
1967
|
-
</details>
|
|
1968
|
-
</div>
|
|
1969
|
-
<div class="method-source-code" id="change_row_height-source">
|
|
1970
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 563</span>
|
|
1971
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">height</span> = <span class="ruby-value">10</span>)
|
|
1972
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
1973
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
1974
|
-
|
|
1975
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]
|
|
1976
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">ht</span> = <span class="ruby-identifier">height</span>
|
|
1977
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">custom_height</span> = <span class="ruby-keyword">true</span>
|
|
1978
|
-
<span class="ruby-keyword">end</span></pre>
|
|
1979
|
-
</div>
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
<div class="method-description">
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
</div>
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
</div>
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
<div id="method-i-change_row_horizontal_alignment" class="method-detail anchor-link ">
|
|
1999
|
-
<div class="method-header">
|
|
2000
|
-
|
|
2001
|
-
<div class="method-heading">
|
|
2002
|
-
<a href="#method-i-change_row_horizontal_alignment" title="Link to this method">
|
|
2003
|
-
<span class="method-name">change_row_horizontal_alignment</span>
|
|
2004
|
-
<span class="method-args">(row = 0, alignment = 'center')</span>
|
|
2005
|
-
</a>
|
|
2006
|
-
</div>
|
|
2007
|
-
|
|
2008
|
-
</div>
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
<div class="method-controls">
|
|
2012
|
-
<details class="method-source-toggle">
|
|
2013
|
-
<summary>Source</summary>
|
|
2014
|
-
</details>
|
|
2015
|
-
</div>
|
|
2016
|
-
<div class="method-source-code" id="change_row_horizontal_alignment-source">
|
|
2017
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 456</span>
|
|
2018
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_horizontal_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
|
|
2019
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2020
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
|
2021
|
-
<span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
|
|
2022
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2023
|
-
</div>
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
<div class="method-description">
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
</div>
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
</div>
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
<div id="method-i-change_row_italics" class="method-detail anchor-link ">
|
|
2043
|
-
<div class="method-header">
|
|
2044
|
-
|
|
2045
|
-
<div class="method-heading">
|
|
2046
|
-
<a href="#method-i-change_row_italics" title="Link to this method">
|
|
2047
|
-
<span class="method-name">change_row_italics</span>
|
|
2048
|
-
<span class="method-args">(row = 0, italicized = false)</span>
|
|
2049
|
-
</a>
|
|
2050
|
-
</div>
|
|
2051
|
-
|
|
2052
|
-
</div>
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
<div class="method-controls">
|
|
2056
|
-
<details class="method-source-toggle">
|
|
2057
|
-
<summary>Source</summary>
|
|
2058
|
-
</details>
|
|
2059
|
-
</div>
|
|
2060
|
-
<div class="method-source-code" id="change_row_italics-source">
|
|
2061
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 535</span>
|
|
2062
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_italics</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
|
|
2063
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
2064
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
2065
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
|
|
2066
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>)
|
|
2067
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2068
|
-
</div>
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
<div class="method-description">
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
</div>
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
</div>
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
<div id="method-i-change_row_strikethrough" class="method-detail anchor-link ">
|
|
2088
|
-
<div class="method-header">
|
|
2089
|
-
|
|
2090
|
-
<div class="method-heading">
|
|
2091
|
-
<a href="#method-i-change_row_strikethrough" title="Link to this method">
|
|
2092
|
-
<span class="method-name">change_row_strikethrough</span>
|
|
2093
|
-
<span class="method-args">(row = 0, struckthrough=false)</span>
|
|
2094
|
-
</a>
|
|
2095
|
-
</div>
|
|
2096
|
-
|
|
2097
|
-
</div>
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
<div class="method-controls">
|
|
2101
|
-
<details class="method-source-toggle">
|
|
2102
|
-
<summary>Source</summary>
|
|
2103
|
-
</details>
|
|
2104
|
-
</div>
|
|
2105
|
-
<div class="method-source-code" id="change_row_strikethrough-source">
|
|
2106
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 556</span>
|
|
2107
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_strikethrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
|
|
2108
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
2109
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
2110
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
|
|
2111
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>)
|
|
2112
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2113
|
-
</div>
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
<div class="method-description">
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
</div>
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
</div>
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
<div id="method-i-change_row_underline" class="method-detail anchor-link ">
|
|
2133
|
-
<div class="method-header">
|
|
2134
|
-
|
|
2135
|
-
<div class="method-heading">
|
|
2136
|
-
<a href="#method-i-change_row_underline" title="Link to this method">
|
|
2137
|
-
<span class="method-name">change_row_underline</span>
|
|
2138
|
-
<span class="method-args">(row = 0, underlined=false)</span>
|
|
2139
|
-
</a>
|
|
2140
|
-
</div>
|
|
2141
|
-
|
|
2142
|
-
</div>
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
<div class="method-controls">
|
|
2146
|
-
<details class="method-source-toggle">
|
|
2147
|
-
<summary>Source</summary>
|
|
2148
|
-
</details>
|
|
2149
|
-
</div>
|
|
2150
|
-
<div class="method-source-code" id="change_row_underline-source">
|
|
2151
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 549</span>
|
|
2152
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_underline</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">underlined</span>=<span class="ruby-keyword">false</span>)
|
|
2153
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
|
2154
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
|
|
2155
|
-
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
|
|
2156
|
-
<span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>)
|
|
2157
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2158
|
-
</div>
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
<div class="method-description">
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
</div>
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
</div>
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
<div id="method-i-change_row_vertical_alignment" class="method-detail anchor-link ">
|
|
2178
|
-
<div class="method-header">
|
|
2179
|
-
|
|
2180
|
-
<div class="method-heading">
|
|
2181
|
-
<a href="#method-i-change_row_vertical_alignment" title="Link to this method">
|
|
2182
|
-
<span class="method-name">change_row_vertical_alignment</span>
|
|
2183
|
-
<span class="method-args">(row = 0, alignment = 'center')</span>
|
|
2184
|
-
</a>
|
|
2185
|
-
</div>
|
|
2186
|
-
|
|
2187
|
-
</div>
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
<div class="method-controls">
|
|
2191
|
-
<details class="method-source-toggle">
|
|
2192
|
-
<summary>Source</summary>
|
|
2193
|
-
</details>
|
|
2194
|
-
</div>
|
|
2195
|
-
<div class="method-source-code" id="change_row_vertical_alignment-source">
|
|
2196
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 462</span>
|
|
2197
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_vertical_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
|
|
2198
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2199
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
|
2200
|
-
<span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
|
|
2201
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2202
|
-
</div>
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
<div class="method-description">
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
</div>
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
</div>
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
<div id="method-i-column_font" class="method-detail anchor-link ">
|
|
2222
|
-
<div class="method-header">
|
|
2223
|
-
|
|
2224
|
-
<div class="method-heading">
|
|
2225
|
-
<a href="#method-i-column_font" title="Link to this method">
|
|
2226
|
-
<span class="method-name">column_font</span>
|
|
2227
|
-
<span class="method-args">(col)</span>
|
|
2228
|
-
</a>
|
|
2229
|
-
</div>
|
|
2230
|
-
|
|
2231
|
-
</div>
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
<div class="method-controls">
|
|
2235
|
-
<details class="method-source-toggle">
|
|
2236
|
-
<summary>Source</summary>
|
|
2237
|
-
</details>
|
|
2238
|
-
</div>
|
|
2239
|
-
<div class="method-source-code" id="column_font-source">
|
|
2240
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 443</span>
|
|
2241
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
2242
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2243
|
-
|
|
2244
|
-
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)].<span class="ruby-identifier">font_id</span>]
|
|
2245
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2246
|
-
</div>
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
<div class="method-description">
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
</div>
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
</div>
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
<div id="method-i-delete_cell" class="method-detail anchor-link ">
|
|
2266
|
-
<div class="method-header">
|
|
2267
|
-
|
|
2268
|
-
<div class="method-heading">
|
|
2269
|
-
<a href="#method-i-delete_cell" title="Link to this method">
|
|
2270
|
-
<span class="method-name">delete_cell</span>
|
|
2271
|
-
<span class="method-args">(row_index = 0, column_index=0, shift=nil)</span>
|
|
2272
|
-
</a>
|
|
2273
|
-
</div>
|
|
2274
|
-
|
|
2275
|
-
</div>
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
<div class="method-controls">
|
|
2279
|
-
<details class="method-source-toggle">
|
|
2280
|
-
<summary>Source</summary>
|
|
2281
|
-
</details>
|
|
2282
|
-
</div>
|
|
2283
|
-
<div class="method-source-code" id="delete_cell-source">
|
|
2284
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 40</span>
|
|
2285
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_cell</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">shift</span>=<span class="ruby-keyword">nil</span>)
|
|
2286
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2287
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
|
|
2288
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
|
2289
|
-
|
|
2290
|
-
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>]
|
|
2291
|
-
<span class="ruby-identifier">old_cell</span> = <span class="ruby-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
|
2292
|
-
|
|
2293
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">shift</span>
|
|
2294
|
-
<span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">then</span>
|
|
2295
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>] = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>
|
|
2296
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:left</span> <span class="ruby-keyword">then</span>
|
|
2297
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">delete_cell_shift_left</span>(<span class="ruby-identifier">column_index</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>
|
|
2298
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:up</span> <span class="ruby-keyword">then</span>
|
|
2299
|
-
(<span class="ruby-identifier">row_index</span><span class="ruby-operator">...</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
|
|
2300
|
-
<span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>]
|
|
2301
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
|
|
2302
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-keyword">nil</span>
|
|
2303
|
-
<span class="ruby-keyword">else</span>
|
|
2304
|
-
<span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">index</span>)
|
|
2305
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">new_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>] = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
|
|
2306
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> = (<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
|
|
2307
|
-
<span class="ruby-keyword">end</span>
|
|
2308
|
-
}
|
|
2309
|
-
<span class="ruby-keyword">else</span>
|
|
2310
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Invalid shift option: #{shift}"</span>
|
|
2311
|
-
<span class="ruby-keyword">end</span>
|
|
2312
|
-
|
|
2313
|
-
<span class="ruby-keyword">return</span> <span class="ruby-identifier">old_cell</span>
|
|
2314
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2315
|
-
</div>
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
<div class="method-description">
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
<p>by default, only sets cell to nil if :left is specified, method will shift row contents to the right of the deleted cell to the left if :up is specified, method will shift column contents below the deleted cell upward</p>
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
</div>
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
</div>
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
<div id="method-i-delete_column" class="method-detail anchor-link ">
|
|
2335
|
-
<div class="method-header">
|
|
2336
|
-
|
|
2337
|
-
<div class="method-heading">
|
|
2338
|
-
<a href="#method-i-delete_column" title="Link to this method">
|
|
2339
|
-
<span class="method-name">delete_column</span>
|
|
2340
|
-
<span class="method-args">(column_index = 0)</span>
|
|
2341
|
-
</a>
|
|
2342
|
-
</div>
|
|
2343
|
-
|
|
2344
|
-
</div>
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
<div class="method-controls">
|
|
2348
|
-
<details class="method-source-toggle">
|
|
2349
|
-
<summary>Source</summary>
|
|
2350
|
-
</details>
|
|
2351
|
-
</div>
|
|
2352
|
-
<div class="method-source-code" id="delete_column-source">
|
|
2353
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 210</span>
|
|
2354
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
|
2355
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2356
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
|
2357
|
-
|
|
2358
|
-
<span class="ruby-comment"># Delete column</span>
|
|
2359
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">row</span>&.<span class="ruby-identifier">cells</span>&.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">column_index</span>) }
|
|
2360
|
-
|
|
2361
|
-
<span class="ruby-comment"># Update column numbers for cells to the right of the deleted column</span>
|
|
2362
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
|
|
2363
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
|
2364
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span>, <span class="ruby-identifier">ci</span><span class="ruby-operator">|</span>
|
|
2365
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">column</span> = <span class="ruby-identifier">ci</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">range</span><span class="ruby-operator">|</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">delete_column</span>(<span class="ruby-identifier">column_index</span>) }
|
|
2370
|
-
|
|
2371
|
-
<span class="ruby-comment"># Update row number of merged cells</span>
|
|
2372
|
-
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span>
|
|
2373
|
-
|
|
2374
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
|
|
2375
|
-
<span class="ruby-identifier">reference</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>
|
|
2376
|
-
(<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_col</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">column_index</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_col</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">column_index</span>)
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
|
|
2380
|
-
<span class="ruby-identifier">reference</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>
|
|
2381
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_col</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">column_index</span>
|
|
2382
|
-
|
|
2383
|
-
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_col</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">column_index</span>
|
|
2384
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
|
|
2385
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_row</span>,
|
|
2386
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_row</span>,
|
|
2387
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_col</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
|
|
2388
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_col</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
|
|
2389
|
-
)
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">single_cell?</span> }
|
|
2393
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2394
|
-
</div>
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
<div class="method-description">
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
</div>
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
</div>
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
<div id="method-i-delete_row" class="method-detail anchor-link ">
|
|
2414
|
-
<div class="method-header">
|
|
2415
|
-
|
|
2416
|
-
<div class="method-heading">
|
|
2417
|
-
<a href="#method-i-delete_row" title="Link to this method">
|
|
2418
|
-
<span class="method-name">delete_row</span>
|
|
2419
|
-
<span class="method-args">(row_index=0)</span>
|
|
2420
|
-
</a>
|
|
2421
|
-
</div>
|
|
2422
|
-
|
|
2423
|
-
</div>
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
<div class="method-controls">
|
|
2427
|
-
<details class="method-source-toggle">
|
|
2428
|
-
<summary>Source</summary>
|
|
2429
|
-
</details>
|
|
2430
|
-
</div>
|
|
2431
|
-
<div class="method-source-code" id="delete_row-source">
|
|
2432
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 126</span>
|
|
2433
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_row</span>(<span class="ruby-identifier">row_index</span>=<span class="ruby-value">0</span>)
|
|
2434
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2435
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
|
|
2436
|
-
|
|
2437
|
-
<span class="ruby-identifier">deleted</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">row_index</span>)
|
|
2438
|
-
|
|
2439
|
-
<span class="ruby-comment"># Update row number of each cell</span>
|
|
2440
|
-
<span class="ruby-identifier">row_index</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
|
|
2441
|
-
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">index</span>]
|
|
2442
|
-
<span class="ruby-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
|
-
<span class="ruby-comment"># Update row number of merged cells</span>
|
|
2446
|
-
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
|
|
2447
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
|
|
2448
|
-
<span class="ruby-identifier">reference</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>
|
|
2449
|
-
(<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_row</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">row_index</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_row</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">row_index</span>)
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
|
|
2453
|
-
<span class="ruby-identifier">reference</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>
|
|
2454
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_row</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">row_index</span>
|
|
2455
|
-
|
|
2456
|
-
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_row</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">row_index</span>
|
|
2457
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
|
|
2458
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_row</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
|
|
2459
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_row</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
|
|
2460
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">first_col</span>,
|
|
2461
|
-
<span class="ruby-identifier">reference</span>.<span class="ruby-identifier">last_col</span>,
|
|
2462
|
-
)
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">single_cell?</span> }
|
|
2466
|
-
<span class="ruby-keyword">end</span>
|
|
2467
|
-
|
|
2468
|
-
<span class="ruby-keyword">return</span> <span class="ruby-identifier">deleted</span>
|
|
2469
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2470
|
-
</div>
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
<div class="method-description">
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
</div>
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
</div>
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
<div id="method-i-get_col_style" class="method-detail anchor-link ">
|
|
2490
|
-
<div class="method-header">
|
|
2491
|
-
|
|
2492
|
-
<div class="method-heading">
|
|
2493
|
-
<a href="#method-i-get_col_style" title="Link to this method">
|
|
2494
|
-
<span class="method-name">get_col_style</span>
|
|
2495
|
-
<span class="method-args">(column_index)</span>
|
|
2496
|
-
</a>
|
|
2497
|
-
</div>
|
|
2498
|
-
|
|
2499
|
-
</div>
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
<div class="method-controls">
|
|
2503
|
-
<details class="method-source-toggle">
|
|
2504
|
-
<summary>Source</summary>
|
|
2505
|
-
</details>
|
|
2506
|
-
</div>
|
|
2507
|
-
<div class="method-source-code" id="get_col_style-source">
|
|
2508
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 400</span>
|
|
2509
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
|
|
2510
|
-
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
|
|
2511
|
-
(<span class="ruby-identifier">range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
|
|
2512
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2513
|
-
</div>
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
<div class="method-description">
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
<p>Helper method to get the style index for a column</p>
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
</div>
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
</div>
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
<div id="method-i-get_cols_style_index" class="method-detail anchor-link ">
|
|
2533
|
-
<div class="method-header">
|
|
2534
|
-
|
|
2535
|
-
<div class="method-heading">
|
|
2536
|
-
<a href="#method-i-get_cols_style_index" title="Link to this method">
|
|
2537
|
-
<span class="method-name">get_cols_style_index</span>
|
|
2538
|
-
<span class="method-args">(column_index)</span>
|
|
2539
|
-
</a>
|
|
2540
|
-
</div>
|
|
2541
|
-
|
|
2542
|
-
</div>
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
<div class="method-controls">
|
|
2546
|
-
<details class="method-source-toggle">
|
|
2547
|
-
<summary>Source</summary>
|
|
2548
|
-
</details>
|
|
2549
|
-
</div>
|
|
2550
|
-
<div class="method-source-code" id="get_cols_style_index-source">
|
|
2551
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 326</span>
|
|
2552
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
|
|
2553
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
|
2554
|
-
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
|
|
2555
|
-
(<span class="ruby-identifier">range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
|
|
2556
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2557
|
-
</div>
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
<div class="method-description">
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
</div>
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
</div>
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
<div id="method-i-get_column_alignment" class="method-detail anchor-link ">
|
|
2577
|
-
<div class="method-header">
|
|
2578
|
-
|
|
2579
|
-
<div class="method-heading">
|
|
2580
|
-
<a href="#method-i-get_column_alignment" title="Link to this method">
|
|
2581
|
-
<span class="method-name">get_column_alignment</span>
|
|
2582
|
-
<span class="method-args">(col, type)</span>
|
|
2583
|
-
</a>
|
|
2584
|
-
</div>
|
|
2585
|
-
|
|
2586
|
-
</div>
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
<div class="method-controls">
|
|
2590
|
-
<details class="method-source-toggle">
|
|
2591
|
-
<summary>Source</summary>
|
|
2592
|
-
</details>
|
|
2593
|
-
</div>
|
|
2594
|
-
<div class="method-source-code" id="get_column_alignment-source">
|
|
2595
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 449</span>
|
|
2596
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">type</span>)
|
|
2597
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2598
|
-
|
|
2599
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
|
|
2600
|
-
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>)
|
|
2601
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2602
|
-
</div>
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
<div class="method-description">
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
</div>
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
</div>
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
<div id="method-i-get_column_border" class="method-detail anchor-link ">
|
|
2622
|
-
<div class="method-header">
|
|
2623
|
-
|
|
2624
|
-
<div class="method-heading">
|
|
2625
|
-
<a href="#method-i-get_column_border" title="Link to this method">
|
|
2626
|
-
<span class="method-name">get_column_border</span>
|
|
2627
|
-
<span class="method-args">(col, border_direction)</span>
|
|
2628
|
-
</a>
|
|
2629
|
-
</div>
|
|
2630
|
-
|
|
2631
|
-
</div>
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
<div class="method-controls">
|
|
2635
|
-
<details class="method-source-toggle">
|
|
2636
|
-
<summary>Source</summary>
|
|
2637
|
-
</details>
|
|
2638
|
-
</div>
|
|
2639
|
-
<div class="method-source-code" id="get_column_border-source">
|
|
2640
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 427</span>
|
|
2641
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
|
|
2642
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2643
|
-
|
|
2644
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
|
|
2645
|
-
<span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>]
|
|
2646
|
-
<span class="ruby-identifier">border</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
|
|
2647
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2648
|
-
</div>
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
<div class="method-description">
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
</div>
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
</div>
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
<div id="method-i-get_column_border_color" class="method-detail anchor-link ">
|
|
2668
|
-
<div class="method-header">
|
|
2669
|
-
|
|
2670
|
-
<div class="method-heading">
|
|
2671
|
-
<a href="#method-i-get_column_border_color" title="Link to this method">
|
|
2672
|
-
<span class="method-name">get_column_border_color</span>
|
|
2673
|
-
<span class="method-args">(col, border_direction)</span>
|
|
2674
|
-
</a>
|
|
2675
|
-
</div>
|
|
2676
|
-
|
|
2677
|
-
</div>
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
<div class="method-controls">
|
|
2681
|
-
<details class="method-source-toggle">
|
|
2682
|
-
<summary>Source</summary>
|
|
2683
|
-
</details>
|
|
2684
|
-
</div>
|
|
2685
|
-
<div class="method-source-code" id="get_column_border_color-source">
|
|
2686
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 435</span>
|
|
2687
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_border_color</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
|
|
2688
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2689
|
-
|
|
2690
|
-
<span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
|
|
2691
|
-
<span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>]
|
|
2692
|
-
<span class="ruby-identifier">border</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>)
|
|
2693
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2694
|
-
</div>
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
<div class="method-description">
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
</div>
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
</div>
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
<div id="method-i-get_column_fill" class="method-detail anchor-link ">
|
|
2714
|
-
<div class="method-header">
|
|
2715
|
-
|
|
2716
|
-
<div class="method-heading">
|
|
2717
|
-
<a href="#method-i-get_column_fill" title="Link to this method">
|
|
2718
|
-
<span class="method-name">get_column_fill</span>
|
|
2719
|
-
<span class="method-args">(col=0)</span>
|
|
2720
|
-
</a>
|
|
2721
|
-
</div>
|
|
2722
|
-
|
|
2723
|
-
</div>
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
<div class="method-controls">
|
|
2727
|
-
<details class="method-source-toggle">
|
|
2728
|
-
<summary>Source</summary>
|
|
2729
|
-
</details>
|
|
2730
|
-
</div>
|
|
2731
|
-
<div class="method-source-code" id="get_column_fill-source">
|
|
2732
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 405</span>
|
|
2733
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_fill</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
|
2734
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2735
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">col</span>)
|
|
2736
|
-
|
|
2737
|
-
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">get_fill_color</span>(<span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">col</span>))
|
|
2738
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2739
|
-
</div>
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
<div class="method-description">
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
</div>
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
</div>
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
<div id="method-i-get_column_font_color" class="method-detail anchor-link ">
|
|
2759
|
-
<div class="method-header">
|
|
2760
|
-
|
|
2761
|
-
<div class="method-heading">
|
|
2762
|
-
<a href="#method-i-get_column_font_color" title="Link to this method">
|
|
2763
|
-
<span class="method-name">get_column_font_color</span>
|
|
2764
|
-
<span class="method-args">(col = 0)</span>
|
|
2765
|
-
</a>
|
|
2766
|
-
</div>
|
|
2767
|
-
|
|
2768
|
-
</div>
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
<div class="method-controls">
|
|
2772
|
-
<details class="method-source-toggle">
|
|
2773
|
-
<summary>Source</summary>
|
|
2774
|
-
</details>
|
|
2775
|
-
</div>
|
|
2776
|
-
<div class="method-source-code" id="get_column_font_color-source">
|
|
2777
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 342</span>
|
|
2778
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_color</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
2779
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
2780
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_rgb_color</span> <span class="ruby-operator">||</span> <span class="ruby-string">'000000'</span>)
|
|
2781
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2782
|
-
</div>
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
<div class="method-description">
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
</div>
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
</div>
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
<div id="method-i-get_column_font_name" class="method-detail anchor-link ">
|
|
2802
|
-
<div class="method-header">
|
|
2803
|
-
|
|
2804
|
-
<div class="method-heading">
|
|
2805
|
-
<a href="#method-i-get_column_font_name" title="Link to this method">
|
|
2806
|
-
<span class="method-name">get_column_font_name</span>
|
|
2807
|
-
<span class="method-args">(col = 0)</span>
|
|
2808
|
-
</a>
|
|
2809
|
-
</div>
|
|
2810
|
-
|
|
2811
|
-
</div>
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
<div class="method-controls">
|
|
2815
|
-
<details class="method-source-toggle">
|
|
2816
|
-
<summary>Source</summary>
|
|
2817
|
-
</details>
|
|
2818
|
-
</div>
|
|
2819
|
-
<div class="method-source-code" id="get_column_font_name-source">
|
|
2820
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 332</span>
|
|
2821
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_name</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
2822
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
2823
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
|
|
2824
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2825
|
-
</div>
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
<div class="method-description">
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
</div>
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
</div>
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
<div id="method-i-get_column_font_size" class="method-detail anchor-link ">
|
|
2845
|
-
<div class="method-header">
|
|
2846
|
-
|
|
2847
|
-
<div class="method-heading">
|
|
2848
|
-
<a href="#method-i-get_column_font_size" title="Link to this method">
|
|
2849
|
-
<span class="method-name">get_column_font_size</span>
|
|
2850
|
-
<span class="method-args">(col = 0)</span>
|
|
2851
|
-
</a>
|
|
2852
|
-
</div>
|
|
2853
|
-
|
|
2854
|
-
</div>
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
<div class="method-controls">
|
|
2858
|
-
<details class="method-source-toggle">
|
|
2859
|
-
<summary>Source</summary>
|
|
2860
|
-
</details>
|
|
2861
|
-
</div>
|
|
2862
|
-
<div class="method-source-code" id="get_column_font_size-source">
|
|
2863
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 337</span>
|
|
2864
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_size</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
2865
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
2866
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
|
|
2867
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2868
|
-
</div>
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
<div class="method-description">
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
</div>
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
</div>
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
<div id="method-i-get_column_width" class="method-detail anchor-link ">
|
|
2888
|
-
<div class="method-header">
|
|
2889
|
-
|
|
2890
|
-
<div class="method-heading">
|
|
2891
|
-
<a href="#method-i-get_column_width" title="Link to this method">
|
|
2892
|
-
<span class="method-name">get_column_width</span>
|
|
2893
|
-
<span class="method-args">(column_index = 0)</span>
|
|
2894
|
-
</a>
|
|
2895
|
-
</div>
|
|
2896
|
-
|
|
2897
|
-
</div>
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
<div class="method-controls">
|
|
2901
|
-
<details class="method-source-toggle">
|
|
2902
|
-
<summary>Source</summary>
|
|
2903
|
-
</details>
|
|
2904
|
-
</div>
|
|
2905
|
-
<div class="method-source-code" id="get_column_width-source">
|
|
2906
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 378</span>
|
|
2907
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_width</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
|
2908
|
-
<span class="ruby-identifier">width</span> = <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>)
|
|
2909
|
-
<span class="ruby-keyword">return</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">width</span>.<span class="ruby-identifier">nil?</span>
|
|
2910
|
-
(<span class="ruby-identifier">width</span> <span class="ruby-operator">-</span> (<span class="ruby-value">5.0</span> <span class="ruby-operator">/</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_DIGIT_WIDTH</span>)).<span class="ruby-identifier">round</span>
|
|
2911
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2912
|
-
</div>
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
<div class="method-description">
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
<p>Get column width measured in number of digits, as per <a href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
</div>
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
</div>
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
<div id="method-i-get_column_width_raw" class="method-detail anchor-link ">
|
|
2932
|
-
<div class="method-header">
|
|
2933
|
-
|
|
2934
|
-
<div class="method-heading">
|
|
2935
|
-
<a href="#method-i-get_column_width_raw" title="Link to this method">
|
|
2936
|
-
<span class="method-name">get_column_width_raw</span>
|
|
2937
|
-
<span class="method-args">(column_index = 0)</span>
|
|
2938
|
-
</a>
|
|
2939
|
-
</div>
|
|
2940
|
-
|
|
2941
|
-
</div>
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
<div class="method-controls">
|
|
2945
|
-
<details class="method-source-toggle">
|
|
2946
|
-
<summary>Source</summary>
|
|
2947
|
-
</details>
|
|
2948
|
-
</div>
|
|
2949
|
-
<div class="method-source-code" id="get_column_width_raw-source">
|
|
2950
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 368</span>
|
|
2951
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
|
2952
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2953
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
|
2954
|
-
|
|
2955
|
-
<span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
|
|
2956
|
-
<span class="ruby-identifier">range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span>
|
|
2957
|
-
<span class="ruby-keyword">end</span></pre>
|
|
2958
|
-
</div>
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
<div class="method-description">
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
<p>Get raw column width value as stored in the file</p>
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
</div>
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
</div>
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
<div id="method-i-get_row_alignment" class="method-detail anchor-link ">
|
|
2978
|
-
<div class="method-header">
|
|
2979
|
-
|
|
2980
|
-
<div class="method-heading">
|
|
2981
|
-
<a href="#method-i-get_row_alignment" title="Link to this method">
|
|
2982
|
-
<span class="method-name">get_row_alignment</span>
|
|
2983
|
-
<span class="method-args">(row, is_horizontal)</span>
|
|
2984
|
-
</a>
|
|
2985
|
-
</div>
|
|
2986
|
-
|
|
2987
|
-
</div>
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
<div class="method-controls">
|
|
2991
|
-
<details class="method-source-toggle">
|
|
2992
|
-
<summary>Source</summary>
|
|
2993
|
-
</details>
|
|
2994
|
-
</div>
|
|
2995
|
-
<div class="method-source-code" id="get_row_alignment-source">
|
|
2996
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 315</span>
|
|
2997
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">is_horizontal</span>)
|
|
2998
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
2999
|
-
|
|
3000
|
-
<span class="ruby-identifier">xf_obj</span> = <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>)
|
|
3001
|
-
<span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">nil?</span>
|
|
3002
|
-
|
|
3003
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">is_horizontal</span> <span class="ruby-keyword">then</span> <span class="ruby-keyword">return</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">horizontal</span>
|
|
3004
|
-
<span class="ruby-keyword">else</span> <span class="ruby-keyword">return</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">vertical</span>
|
|
3005
|
-
<span class="ruby-keyword">end</span>
|
|
3006
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3007
|
-
</div>
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
<div class="method-description">
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
</div>
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
</div>
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
<div id="method-i-get_row_border" class="method-detail anchor-link ">
|
|
3027
|
-
<div class="method-header">
|
|
3028
|
-
|
|
3029
|
-
<div class="method-heading">
|
|
3030
|
-
<a href="#method-i-get_row_border" title="Link to this method">
|
|
3031
|
-
<span class="method-name">get_row_border</span>
|
|
3032
|
-
<span class="method-args">(row, border_direction)</span>
|
|
3033
|
-
</a>
|
|
3034
|
-
</div>
|
|
3035
|
-
|
|
3036
|
-
</div>
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
<div class="method-controls">
|
|
3040
|
-
<details class="method-source-toggle">
|
|
3041
|
-
<summary>Source</summary>
|
|
3042
|
-
</details>
|
|
3043
|
-
</div>
|
|
3044
|
-
<div class="method-source-code" id="get_row_border-source">
|
|
3045
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 297</span>
|
|
3046
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
|
|
3047
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3048
|
-
|
|
3049
|
-
<span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
|
|
3050
|
-
<span class="ruby-identifier">border</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
|
|
3051
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3052
|
-
</div>
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
<div class="method-description">
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
</div>
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
</div>
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
<div id="method-i-get_row_border_color" class="method-detail anchor-link ">
|
|
3072
|
-
<div class="method-header">
|
|
3073
|
-
|
|
3074
|
-
<div class="method-heading">
|
|
3075
|
-
<a href="#method-i-get_row_border_color" title="Link to this method">
|
|
3076
|
-
<span class="method-name">get_row_border_color</span>
|
|
3077
|
-
<span class="method-args">(row, border_direction)</span>
|
|
3078
|
-
</a>
|
|
3079
|
-
</div>
|
|
3080
|
-
|
|
3081
|
-
</div>
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
<div class="method-controls">
|
|
3085
|
-
<details class="method-source-toggle">
|
|
3086
|
-
<summary>Source</summary>
|
|
3087
|
-
</details>
|
|
3088
|
-
</div>
|
|
3089
|
-
<div class="method-source-code" id="get_row_border_color-source">
|
|
3090
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 304</span>
|
|
3091
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
|
|
3092
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3093
|
-
|
|
3094
|
-
<span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
|
|
3095
|
-
<span class="ruby-identifier">border</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>)
|
|
3096
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3097
|
-
</div>
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
<div class="method-description">
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
</div>
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
</div>
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
<div id="method-i-get_row_fill" class="method-detail anchor-link ">
|
|
3117
|
-
<div class="method-header">
|
|
3118
|
-
|
|
3119
|
-
<div class="method-heading">
|
|
3120
|
-
<a href="#method-i-get_row_fill" title="Link to this method">
|
|
3121
|
-
<span class="method-name">get_row_fill</span>
|
|
3122
|
-
<span class="method-args">(row = 0)</span>
|
|
3123
|
-
</a>
|
|
3124
|
-
</div>
|
|
3125
|
-
|
|
3126
|
-
</div>
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
<div class="method-controls">
|
|
3130
|
-
<details class="method-source-toggle">
|
|
3131
|
-
<summary>Source</summary>
|
|
3132
|
-
</details>
|
|
3133
|
-
</div>
|
|
3134
|
-
<div class="method-source-code" id="get_row_fill-source">
|
|
3135
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 256</span>
|
|
3136
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_fill</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3137
|
-
(<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_fill_color</span>
|
|
3138
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3139
|
-
</div>
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
<div class="method-description">
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
</div>
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
</div>
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
<div id="method-i-get_row_font_color" class="method-detail anchor-link ">
|
|
3159
|
-
<div class="method-header">
|
|
3160
|
-
|
|
3161
|
-
<div class="method-heading">
|
|
3162
|
-
<a href="#method-i-get_row_font_color" title="Link to this method">
|
|
3163
|
-
<span class="method-name">get_row_font_color</span>
|
|
3164
|
-
<span class="method-args">(row = 0)</span>
|
|
3165
|
-
</a>
|
|
3166
|
-
</div>
|
|
3167
|
-
|
|
3168
|
-
</div>
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
<div class="method-controls">
|
|
3172
|
-
<details class="method-source-toggle">
|
|
3173
|
-
<summary>Source</summary>
|
|
3174
|
-
</details>
|
|
3175
|
-
</div>
|
|
3176
|
-
<div class="method-source-code" id="get_row_font_color-source">
|
|
3177
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 268</span>
|
|
3178
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3179
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
|
|
3180
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">color</span>
|
|
3181
|
-
<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">'000000'</span>)
|
|
3182
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3183
|
-
</div>
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
<div class="method-description">
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
</div>
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
</div>
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
<div id="method-i-get_row_font_name" class="method-detail anchor-link ">
|
|
3203
|
-
<div class="method-header">
|
|
3204
|
-
|
|
3205
|
-
<div class="method-heading">
|
|
3206
|
-
<a href="#method-i-get_row_font_name" title="Link to this method">
|
|
3207
|
-
<span class="method-name">get_row_font_name</span>
|
|
3208
|
-
<span class="method-args">(row = 0)</span>
|
|
3209
|
-
</a>
|
|
3210
|
-
</div>
|
|
3211
|
-
|
|
3212
|
-
</div>
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
<div class="method-controls">
|
|
3216
|
-
<details class="method-source-toggle">
|
|
3217
|
-
<summary>Source</summary>
|
|
3218
|
-
</details>
|
|
3219
|
-
</div>
|
|
3220
|
-
<div class="method-source-code" id="get_row_font_name-source">
|
|
3221
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 260</span>
|
|
3222
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3223
|
-
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
|
|
3224
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3225
|
-
</div>
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
<div class="method-description">
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
</div>
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
</div>
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
<div id="method-i-get_row_font_size" class="method-detail anchor-link ">
|
|
3245
|
-
<div class="method-header">
|
|
3246
|
-
|
|
3247
|
-
<div class="method-heading">
|
|
3248
|
-
<a href="#method-i-get_row_font_size" title="Link to this method">
|
|
3249
|
-
<span class="method-name">get_row_font_size</span>
|
|
3250
|
-
<span class="method-args">(row = 0)</span>
|
|
3251
|
-
</a>
|
|
3252
|
-
</div>
|
|
3253
|
-
|
|
3254
|
-
</div>
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
<div class="method-controls">
|
|
3258
|
-
<details class="method-source-toggle">
|
|
3259
|
-
<summary>Source</summary>
|
|
3260
|
-
</details>
|
|
3261
|
-
</div>
|
|
3262
|
-
<div class="method-source-code" id="get_row_font_size-source">
|
|
3263
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 264</span>
|
|
3264
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3265
|
-
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
|
|
3266
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3267
|
-
</div>
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
<div class="method-description">
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
</div>
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
</div>
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
<div id="method-i-get_row_height" class="method-detail anchor-link ">
|
|
3287
|
-
<div class="method-header">
|
|
3288
|
-
|
|
3289
|
-
<div class="method-heading">
|
|
3290
|
-
<a href="#method-i-get_row_height" title="Link to this method">
|
|
3291
|
-
<span class="method-name">get_row_height</span>
|
|
3292
|
-
<span class="method-args">(row = 0)</span>
|
|
3293
|
-
</a>
|
|
3294
|
-
</div>
|
|
3295
|
-
|
|
3296
|
-
</div>
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
<div class="method-controls">
|
|
3300
|
-
<details class="method-source-toggle">
|
|
3301
|
-
<summary>Source</summary>
|
|
3302
|
-
</details>
|
|
3303
|
-
</div>
|
|
3304
|
-
<div class="method-source-code" id="get_row_height-source">
|
|
3305
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 290</span>
|
|
3306
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3307
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3308
|
-
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
|
3309
|
-
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]
|
|
3310
|
-
(<span class="ruby-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">ht</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Row</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_HEIGHT</span>
|
|
3311
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3312
|
-
</div>
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
<div class="method-description">
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
</div>
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
</div>
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
<div id="method-i-get_row_style" class="method-detail anchor-link ">
|
|
3332
|
-
<div class="method-header">
|
|
3333
|
-
|
|
3334
|
-
<div class="method-heading">
|
|
3335
|
-
<a href="#method-i-get_row_style" title="Link to this method">
|
|
3336
|
-
<span class="method-name">get_row_style</span>
|
|
3337
|
-
<span class="method-args">(row_index)</span>
|
|
3338
|
-
</a>
|
|
3339
|
-
</div>
|
|
3340
|
-
|
|
3341
|
-
</div>
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
<div class="method-controls">
|
|
3345
|
-
<details class="method-source-toggle">
|
|
3346
|
-
<summary>Source</summary>
|
|
3347
|
-
</details>
|
|
3348
|
-
</div>
|
|
3349
|
-
<div class="method-source-code" id="get_row_style-source">
|
|
3350
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 251</span>
|
|
3351
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
|
|
3352
|
-
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>]
|
|
3353
|
-
(<span class="ruby-identifier">row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
|
|
3354
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3355
|
-
</div>
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
<div class="method-description">
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
</div>
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
</div>
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
<div id="method-i-insert_cell" class="method-detail anchor-link ">
|
|
3375
|
-
<div class="method-header">
|
|
3376
|
-
|
|
3377
|
-
<div class="method-heading">
|
|
3378
|
-
<a href="#method-i-insert_cell" title="Link to this method">
|
|
3379
|
-
<span class="method-name">insert_cell</span>
|
|
3380
|
-
<span class="method-args">(row = 0, col = 0, data = nil, formula = nil, shift = nil)</span>
|
|
3381
|
-
</a>
|
|
3382
|
-
</div>
|
|
3383
|
-
|
|
3384
|
-
</div>
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
<div class="method-controls">
|
|
3388
|
-
<details class="method-source-toggle">
|
|
3389
|
-
<summary>Source</summary>
|
|
3390
|
-
</details>
|
|
3391
|
-
</div>
|
|
3392
|
-
<div class="method-source-code" id="insert_cell-source">
|
|
3393
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 11</span>
|
|
3394
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_cell</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">formula</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">shift</span> = <span class="ruby-keyword">nil</span>)
|
|
3395
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3396
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>)
|
|
3397
|
-
|
|
3398
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">shift</span>
|
|
3399
|
-
<span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">then</span> <span class="ruby-comment"># No shifting at all</span>
|
|
3400
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:right</span> <span class="ruby-keyword">then</span>
|
|
3401
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">col</span>)
|
|
3402
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">:down</span> <span class="ruby-keyword">then</span>
|
|
3403
|
-
<span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span>, <span class="ruby-value">:cells</span> <span class="ruby-operator">=></span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">size</span>))
|
|
3404
|
-
(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-identifier">row</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
|
|
3405
|
-
<span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
|
|
3406
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
|
|
3407
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-keyword">nil</span>
|
|
3408
|
-
<span class="ruby-keyword">else</span>
|
|
3409
|
-
<span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">index</span>)
|
|
3410
|
-
<span class="ruby-identifier">new_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>] = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>]
|
|
3411
|
-
<span class="ruby-keyword">end</span>
|
|
3412
|
-
}
|
|
3413
|
-
<span class="ruby-keyword">else</span>
|
|
3414
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Invalid shift option: #{shift}"</span>
|
|
3415
|
-
<span class="ruby-keyword">end</span>
|
|
3416
|
-
|
|
3417
|
-
<span class="ruby-keyword">return</span> <span class="ruby-identifier">add_cell</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">formula</span>)
|
|
3418
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3419
|
-
</div>
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
<div class="method-description">
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
</div>
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
</div>
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
<div id="method-i-insert_column" class="method-detail anchor-link ">
|
|
3439
|
-
<div class="method-header">
|
|
3440
|
-
|
|
3441
|
-
<div class="method-heading">
|
|
3442
|
-
<a href="#method-i-insert_column" title="Link to this method">
|
|
3443
|
-
<span class="method-name">insert_column</span>
|
|
3444
|
-
<span class="method-args">(column_index = 0)</span>
|
|
3445
|
-
</a>
|
|
3446
|
-
</div>
|
|
3447
|
-
|
|
3448
|
-
</div>
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
<div class="method-controls">
|
|
3452
|
-
<details class="method-source-toggle">
|
|
3453
|
-
<summary>Source</summary>
|
|
3454
|
-
</details>
|
|
3455
|
-
</div>
|
|
3456
|
-
<div class="method-source-code" id="insert_column-source">
|
|
3457
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 166</span>
|
|
3458
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
|
3459
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3460
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
|
3461
|
-
|
|
3462
|
-
<span class="ruby-identifier">old_range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
|
|
3463
|
-
|
|
3464
|
-
<span class="ruby-comment"># Go through each cell in column</span>
|
|
3465
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span>, <span class="ruby-identifier">row_index</span><span class="ruby-operator">|</span>
|
|
3466
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment"># Do not process blank rows</span>
|
|
3467
|
-
|
|
3468
|
-
<span class="ruby-identifier">old_cell</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
|
3469
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-keyword">nil</span>
|
|
3470
|
-
|
|
3471
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_cell</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&&</span>
|
|
3472
|
-
<span class="ruby-identifier">old_range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_range</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-keyword">then</span>
|
|
3473
|
-
|
|
3474
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-value">:worksheet</span> <span class="ruby-operator">=></span> <span class="ruby-keyword">self</span>,
|
|
3475
|
-
<span class="ruby-value">:row</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">row_index</span>, <span class="ruby-value">:column</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">column_index</span>,
|
|
3476
|
-
<span class="ruby-value">:datatype</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataType</span><span class="ruby-operator">::</span><span class="ruby-constant">SHARED_STRING</span>)
|
|
3477
|
-
<span class="ruby-keyword">end</span>
|
|
3478
|
-
|
|
3479
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">column_index</span>)
|
|
3480
|
-
}
|
|
3481
|
-
|
|
3482
|
-
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span>)
|
|
3483
|
-
|
|
3484
|
-
<span class="ruby-comment"># Update merged cells for all rows below</span>
|
|
3485
|
-
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
|
|
3486
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
|
|
3487
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">last_col</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">column_index</span>
|
|
3488
|
-
|
|
3489
|
-
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">first_col</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">column_index</span>
|
|
3490
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
|
|
3491
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">first_row</span>,
|
|
3492
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">last_row</span>,
|
|
3493
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">first_col</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
|
|
3494
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">last_col</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
|
|
3495
|
-
)
|
|
3496
|
-
}
|
|
3497
|
-
<span class="ruby-keyword">end</span>
|
|
3498
|
-
|
|
3499
|
-
<span class="ruby-comment"># TODO: update column numbers</span>
|
|
3500
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3501
|
-
</div>
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
<div class="method-description">
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
<p>Inserts column at <code>column_index</code>, pushes everything right, takes styles from column to left NOTE: use of this method will break formulas which reference cells which are being “pushed right”</p>
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
</div>
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
</div>
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
<div id="method-i-insert_row" class="method-detail anchor-link ">
|
|
3521
|
-
<div class="method-header">
|
|
3522
|
-
|
|
3523
|
-
<div class="method-heading">
|
|
3524
|
-
<a href="#method-i-insert_row" title="Link to this method">
|
|
3525
|
-
<span class="method-name">insert_row</span>
|
|
3526
|
-
<span class="method-args">(row_index = 0)</span>
|
|
3527
|
-
</a>
|
|
3528
|
-
</div>
|
|
3529
|
-
|
|
3530
|
-
</div>
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
<div class="method-controls">
|
|
3534
|
-
<details class="method-source-toggle">
|
|
3535
|
-
<summary>Source</summary>
|
|
3536
|
-
</details>
|
|
3537
|
-
</div>
|
|
3538
|
-
<div class="method-source-code" id="insert_row-source">
|
|
3539
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 73</span>
|
|
3540
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_row</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>)
|
|
3541
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3542
|
-
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
|
3543
|
-
|
|
3544
|
-
<span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">new_cells</span> = <span class="ruby-keyword">nil</span>
|
|
3545
|
-
|
|
3546
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">row_index</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span> <span class="ruby-keyword">then</span>
|
|
3547
|
-
<span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
|
|
3548
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span> <span class="ruby-keyword">then</span>
|
|
3549
|
-
<span class="ruby-identifier">new_cells</span> = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
|
3550
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span> <span class="ruby-keyword">nil</span>
|
|
3551
|
-
<span class="ruby-keyword">else</span> <span class="ruby-identifier">nc</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>)
|
|
3552
|
-
<span class="ruby-identifier">nc</span>.<span class="ruby-identifier">worksheet</span> = <span class="ruby-keyword">self</span>
|
|
3553
|
-
<span class="ruby-identifier">nc</span>
|
|
3554
|
-
<span class="ruby-keyword">end</span>
|
|
3555
|
-
}
|
|
3556
|
-
<span class="ruby-keyword">end</span>
|
|
3557
|
-
<span class="ruby-keyword">end</span>
|
|
3558
|
-
|
|
3559
|
-
<span class="ruby-identifier">row0</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-value">0</span>]
|
|
3560
|
-
<span class="ruby-identifier">new_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>((<span class="ruby-identifier">row0</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">row0</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">size</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>)
|
|
3561
|
-
|
|
3562
|
-
<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-keyword">nil</span>)
|
|
3563
|
-
<span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-value">:cells</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">new_cells</span>, <span class="ruby-value">:style_index</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">old_row</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">style_index</span>)
|
|
3564
|
-
|
|
3565
|
-
<span class="ruby-comment"># Update row values for all rows below</span>
|
|
3566
|
-
<span class="ruby-identifier">row_index</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
|
|
3567
|
-
<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">r</span>]
|
|
3568
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
|
3569
|
-
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">cell</span>, <span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
|
3570
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">nil?</span>
|
|
3571
|
-
<span class="ruby-identifier">cell</span>.<span class="ruby-identifier">r</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>, <span class="ruby-identifier">c</span>)
|
|
3572
|
-
}
|
|
3573
|
-
}
|
|
3574
|
-
|
|
3575
|
-
<span class="ruby-comment"># Update merged cells for all rows below</span>
|
|
3576
|
-
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
|
|
3577
|
-
<span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
|
|
3578
|
-
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">last_row</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">row_index</span>
|
|
3579
|
-
|
|
3580
|
-
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">first_row</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">row_index</span>
|
|
3581
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
|
|
3582
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">first_row</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
|
|
3583
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">last_row</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
|
|
3584
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">first_col</span>,
|
|
3585
|
-
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">last_col</span>,
|
|
3586
|
-
)
|
|
3587
|
-
}
|
|
3588
|
-
<span class="ruby-keyword">end</span>
|
|
3589
|
-
|
|
3590
|
-
<span class="ruby-keyword">return</span> <span class="ruby-identifier">new_row</span>
|
|
3591
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3592
|
-
</div>
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
<div class="method-description">
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
<p>Inserts row at row_index, pushes down, copies style from the row above (that’s what Excel 2013 does!) NOTE: use of this method will break formulas which reference cells which are being “pushed down”</p>
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
</div>
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
</div>
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
<div id="method-i-is_column_bolded" class="method-detail anchor-link ">
|
|
3612
|
-
<div class="method-header">
|
|
3613
|
-
|
|
3614
|
-
<div class="method-heading">
|
|
3615
|
-
<a href="#method-i-is_column_bolded" title="Link to this method">
|
|
3616
|
-
<span class="method-name">is_column_bolded</span>
|
|
3617
|
-
<span class="method-args">(col = 0)</span>
|
|
3618
|
-
</a>
|
|
3619
|
-
</div>
|
|
3620
|
-
|
|
3621
|
-
</div>
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
<div class="method-controls">
|
|
3625
|
-
<details class="method-source-toggle">
|
|
3626
|
-
<summary>Source</summary>
|
|
3627
|
-
</details>
|
|
3628
|
-
</div>
|
|
3629
|
-
<div class="method-source-code" id="is_column_bolded-source">
|
|
3630
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 352</span>
|
|
3631
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_bolded</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
3632
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
3633
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
|
|
3634
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3635
|
-
</div>
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
<div class="method-description">
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
</div>
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
</div>
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
<div id="method-i-is_column_italicized" class="method-detail anchor-link ">
|
|
3655
|
-
<div class="method-header">
|
|
3656
|
-
|
|
3657
|
-
<div class="method-heading">
|
|
3658
|
-
<a href="#method-i-is_column_italicized" title="Link to this method">
|
|
3659
|
-
<span class="method-name">is_column_italicized</span>
|
|
3660
|
-
<span class="method-args">(col = 0)</span>
|
|
3661
|
-
</a>
|
|
3662
|
-
</div>
|
|
3663
|
-
|
|
3664
|
-
</div>
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
<div class="method-controls">
|
|
3668
|
-
<details class="method-source-toggle">
|
|
3669
|
-
<summary>Source</summary>
|
|
3670
|
-
</details>
|
|
3671
|
-
</div>
|
|
3672
|
-
<div class="method-source-code" id="is_column_italicized-source">
|
|
3673
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 347</span>
|
|
3674
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_italicized</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
3675
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
3676
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
|
|
3677
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3678
|
-
</div>
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
<div class="method-description">
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
</div>
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
</div>
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
<div id="method-i-is_column_struckthrough" class="method-detail anchor-link ">
|
|
3698
|
-
<div class="method-header">
|
|
3699
|
-
|
|
3700
|
-
<div class="method-heading">
|
|
3701
|
-
<a href="#method-i-is_column_struckthrough" title="Link to this method">
|
|
3702
|
-
<span class="method-name">is_column_struckthrough</span>
|
|
3703
|
-
<span class="method-args">(col = 0)</span>
|
|
3704
|
-
</a>
|
|
3705
|
-
</div>
|
|
3706
|
-
|
|
3707
|
-
</div>
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
<div class="method-controls">
|
|
3711
|
-
<details class="method-source-toggle">
|
|
3712
|
-
<summary>Source</summary>
|
|
3713
|
-
</details>
|
|
3714
|
-
</div>
|
|
3715
|
-
<div class="method-source-code" id="is_column_struckthrough-source">
|
|
3716
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 362</span>
|
|
3717
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_struckthrough</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
3718
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
3719
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
|
|
3720
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3721
|
-
</div>
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
<div class="method-description">
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
</div>
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
</div>
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
<div id="method-i-is_column_underlined" class="method-detail anchor-link ">
|
|
3741
|
-
<div class="method-header">
|
|
3742
|
-
|
|
3743
|
-
<div class="method-heading">
|
|
3744
|
-
<a href="#method-i-is_column_underlined" title="Link to this method">
|
|
3745
|
-
<span class="method-name">is_column_underlined</span>
|
|
3746
|
-
<span class="method-args">(col = 0)</span>
|
|
3747
|
-
</a>
|
|
3748
|
-
</div>
|
|
3749
|
-
|
|
3750
|
-
</div>
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
<div class="method-controls">
|
|
3754
|
-
<details class="method-source-toggle">
|
|
3755
|
-
<summary>Source</summary>
|
|
3756
|
-
</details>
|
|
3757
|
-
</div>
|
|
3758
|
-
<div class="method-source-code" id="is_column_underlined-source">
|
|
3759
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 357</span>
|
|
3760
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_underlined</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
|
3761
|
-
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
|
3762
|
-
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
|
|
3763
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3764
|
-
</div>
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
<div class="method-description">
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
</div>
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
</div>
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
<div id="method-i-is_row_bolded" class="method-detail anchor-link ">
|
|
3784
|
-
<div class="method-header">
|
|
3785
|
-
|
|
3786
|
-
<div class="method-heading">
|
|
3787
|
-
<a href="#method-i-is_row_bolded" title="Link to this method">
|
|
3788
|
-
<span class="method-name">is_row_bolded</span>
|
|
3789
|
-
<span class="method-args">(row = 0)</span>
|
|
3790
|
-
</a>
|
|
3791
|
-
</div>
|
|
3792
|
-
|
|
3793
|
-
</div>
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
<div class="method-controls">
|
|
3797
|
-
<details class="method-source-toggle">
|
|
3798
|
-
<summary>Source</summary>
|
|
3799
|
-
</details>
|
|
3800
|
-
</div>
|
|
3801
|
-
<div class="method-source-code" id="is_row_bolded-source">
|
|
3802
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 278</span>
|
|
3803
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_bolded</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3804
|
-
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
|
|
3805
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3806
|
-
</div>
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
<div class="method-description">
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
</div>
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
</div>
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
<div id="method-i-is_row_italicized" class="method-detail anchor-link ">
|
|
3826
|
-
<div class="method-header">
|
|
3827
|
-
|
|
3828
|
-
<div class="method-heading">
|
|
3829
|
-
<a href="#method-i-is_row_italicized" title="Link to this method">
|
|
3830
|
-
<span class="method-name">is_row_italicized</span>
|
|
3831
|
-
<span class="method-args">(row = 0)</span>
|
|
3832
|
-
</a>
|
|
3833
|
-
</div>
|
|
3834
|
-
|
|
3835
|
-
</div>
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
<div class="method-controls">
|
|
3839
|
-
<details class="method-source-toggle">
|
|
3840
|
-
<summary>Source</summary>
|
|
3841
|
-
</details>
|
|
3842
|
-
</div>
|
|
3843
|
-
<div class="method-source-code" id="is_row_italicized-source">
|
|
3844
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 274</span>
|
|
3845
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_italicized</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3846
|
-
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
|
|
3847
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3848
|
-
</div>
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
<div class="method-description">
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
</div>
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
</div>
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
<div id="method-i-is_row_struckthrough" class="method-detail anchor-link ">
|
|
3868
|
-
<div class="method-header">
|
|
3869
|
-
|
|
3870
|
-
<div class="method-heading">
|
|
3871
|
-
<a href="#method-i-is_row_struckthrough" title="Link to this method">
|
|
3872
|
-
<span class="method-name">is_row_struckthrough</span>
|
|
3873
|
-
<span class="method-args">(row = 0)</span>
|
|
3874
|
-
</a>
|
|
3875
|
-
</div>
|
|
3876
|
-
|
|
3877
|
-
</div>
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
<div class="method-controls">
|
|
3881
|
-
<details class="method-source-toggle">
|
|
3882
|
-
<summary>Source</summary>
|
|
3883
|
-
</details>
|
|
3884
|
-
</div>
|
|
3885
|
-
<div class="method-source-code" id="is_row_struckthrough-source">
|
|
3886
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 286</span>
|
|
3887
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_struckthrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3888
|
-
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
|
|
3889
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3890
|
-
</div>
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
<div class="method-description">
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
</div>
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
</div>
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
<div id="method-i-is_row_underlined" class="method-detail anchor-link ">
|
|
3910
|
-
<div class="method-header">
|
|
3911
|
-
|
|
3912
|
-
<div class="method-heading">
|
|
3913
|
-
<a href="#method-i-is_row_underlined" title="Link to this method">
|
|
3914
|
-
<span class="method-name">is_row_underlined</span>
|
|
3915
|
-
<span class="method-args">(row = 0)</span>
|
|
3916
|
-
</a>
|
|
3917
|
-
</div>
|
|
3918
|
-
|
|
3919
|
-
</div>
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
<div class="method-controls">
|
|
3923
|
-
<details class="method-source-toggle">
|
|
3924
|
-
<summary>Source</summary>
|
|
3925
|
-
</details>
|
|
3926
|
-
</div>
|
|
3927
|
-
<div class="method-source-code" id="is_row_underlined-source">
|
|
3928
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 282</span>
|
|
3929
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_underlined</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
|
3930
|
-
(<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
|
|
3931
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3932
|
-
</div>
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
<div class="method-description">
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
</div>
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
</div>
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
<div id="method-i-merge_cells" class="method-detail anchor-link ">
|
|
3952
|
-
<div class="method-header">
|
|
3953
|
-
|
|
3954
|
-
<div class="method-heading">
|
|
3955
|
-
<a href="#method-i-merge_cells" title="Link to this method">
|
|
3956
|
-
<span class="method-name">merge_cells</span>
|
|
3957
|
-
<span class="method-args">(*params)</span>
|
|
3958
|
-
</a>
|
|
3959
|
-
</div>
|
|
3960
|
-
|
|
3961
|
-
</div>
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
<div class="method-controls">
|
|
3965
|
-
<details class="method-source-toggle">
|
|
3966
|
-
<summary>Source</summary>
|
|
3967
|
-
</details>
|
|
3968
|
-
</div>
|
|
3969
|
-
<div class="method-source-code" id="merge_cells-source">
|
|
3970
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 706</span>
|
|
3971
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">merge_cells</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">params</span>)
|
|
3972
|
-
<span class="ruby-identifier">validate_workbook</span>
|
|
3973
|
-
|
|
3974
|
-
<span class="ruby-identifier">row_from</span> = <span class="ruby-identifier">col_from</span> = <span class="ruby-identifier">row_to</span> = <span class="ruby-identifier">col_to</span> = <span class="ruby-keyword">nil</span>
|
|
3975
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">size</span>
|
|
3976
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">4</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">col_from</span>, <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_to</span> = <span class="ruby-identifier">params</span>
|
|
3977
|
-
<span class="ruby-keyword">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword">then</span>
|
|
3978
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">first</span>
|
|
3979
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">Hash</span> <span class="ruby-keyword">then</span>
|
|
3980
|
-
<span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_from</span>, <span class="ruby-identifier">col_to</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">fetch_values</span>(<span class="ruby-value">:row_from</span>, <span class="ruby-value">:row_to</span>, <span class="ruby-value">:col_from</span>, <span class="ruby-value">:col_to</span>)
|
|
3981
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword">then</span>
|
|
3982
|
-
<span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">':'</span>)
|
|
3983
|
-
<span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">"Reference for merging cells must be a range"</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">to</span>.<span class="ruby-identifier">nil?</span>
|
|
3984
|
-
<span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">col_from</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ref2ind</span>(<span class="ruby-identifier">from</span>)
|
|
3985
|
-
<span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_to</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ref2ind</span>(<span class="ruby-identifier">to</span>)
|
|
3986
|
-
<span class="ruby-keyword">else</span>
|
|
3987
|
-
<span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Invalid value for #{self.class}: #{params[0].inspect}"</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
|
3988
|
-
<span class="ruby-keyword">end</span>
|
|
3989
|
-
<span class="ruby-keyword">end</span>
|
|
3990
|
-
|
|
3991
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCells</span>.<span class="ruby-identifier">new</span>
|
|
3992
|
-
<span class="ruby-comment"># TODO: add validation to make sure ranges are not intersecting with existing ones</span>
|
|
3993
|
-
<span class="ruby-identifier">merged_cells</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:ref</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_from</span>, <span class="ruby-identifier">col_to</span>))
|
|
3994
|
-
<span class="ruby-keyword">end</span></pre>
|
|
3995
|
-
</div>
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
<div class="method-description">
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
<p>Merges cells within a rectangular area <a href="WorksheetConvenienceMethods.html#method-i-merge_cells"><code>merge_cells(row_from, col_from, row_to, col_to)</code></a> <a href="WorksheetConvenienceMethods.html#method-i-merge_cells"><code>merge_cells(reference_string)</code></a> <a href="WorksheetConvenienceMethods.html#method-i-merge_cells"><code>merge_cells</code></a>(row_from:, row_to:, col_from:, col_to:)</p>
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
</div>
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
</div>
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
<div id="method-i-row_font" class="method-detail anchor-link ">
|
|
4015
|
-
<div class="method-header">
|
|
4016
|
-
|
|
4017
|
-
<div class="method-heading">
|
|
4018
|
-
<a href="#method-i-row_font" title="Link to this method">
|
|
4019
|
-
<span class="method-name">row_font</span>
|
|
4020
|
-
<span class="method-args">(row)</span>
|
|
4021
|
-
</a>
|
|
4022
|
-
</div>
|
|
4023
|
-
|
|
4024
|
-
</div>
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
<div class="method-controls">
|
|
4028
|
-
<details class="method-source-toggle">
|
|
4029
|
-
<summary>Source</summary>
|
|
4030
|
-
</details>
|
|
4031
|
-
</div>
|
|
4032
|
-
<div class="method-source-code" id="row_font-source">
|
|
4033
|
-
<pre class="ruby"><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 311</span>
|
|
4034
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">row_font</span>(<span class="ruby-identifier">row</span>)
|
|
4035
|
-
(<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&&</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_font</span>
|
|
4036
|
-
<span class="ruby-keyword">end</span></pre>
|
|
4037
|
-
</div>
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
<div class="method-description">
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
</div>
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
</div>
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
</section>
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
</section>
|
|
4062
|
-
|
|
4063
|
-
</main>
|
|
4064
|
-
|
|
4065
|
-
<aside class="table-of-contents" role="complementary" aria-label="Table of Contents">
|
|
4066
|
-
<div class="toc-sticky">
|
|
4067
|
-
<h3 class="toc-heading">On This Page</h3>
|
|
4068
|
-
<nav class="toc-nav" id="toc-nav" aria-label="Page sections">
|
|
4069
|
-
<!-- Generated by JavaScript based on page headings -->
|
|
4070
|
-
</nav>
|
|
4071
|
-
</div>
|
|
4072
|
-
</aside>
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
<footer class="site-footer">
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
<div class="footer-bottom">
|
|
4079
|
-
<p>
|
|
4080
|
-
Generated by <a href="https://ruby.github.io/rdoc/">RDoc 7.2.0</a>
|
|
4081
|
-
using the Aliki theme by <a href="http://st0012.dev">Stan Lo</a>
|
|
4082
|
-
</p>
|
|
4083
|
-
</div>
|
|
4084
|
-
</footer>
|
|
4085
|
-
|
|
4086
|
-
</body>
|
|
4087
|
-
|