rubyXL 3.3.33 → 3.4.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +60 -0
- data/Gemfile +9 -8
- data/Gemfile.lock +124 -0
- data/LICENSE.txt +1 -1
- data/README.rdoc +46 -22
- data/Rakefile +29 -29
- data/VERSION +1 -1
- data/lib/rubyXL/cell.rb +2 -29
- data/lib/rubyXL/convenience_methods/cell.rb +276 -0
- data/lib/rubyXL/convenience_methods/color.rb +156 -0
- data/lib/rubyXL/convenience_methods/font.rb +63 -0
- data/lib/rubyXL/convenience_methods/workbook.rb +141 -0
- data/lib/rubyXL/convenience_methods/worksheet.rb +714 -0
- data/lib/rubyXL/convenience_methods.rb +5 -1301
- data/lib/rubyXL/objects/border.rb +0 -3
- data/lib/rubyXL/objects/calculation_chain.rb +2 -2
- data/lib/rubyXL/objects/cell_style.rb +1 -3
- data/lib/rubyXL/objects/chartsheet.rb +8 -12
- data/lib/rubyXL/objects/color.rb +3 -7
- data/lib/rubyXL/objects/column_range.rb +0 -3
- data/lib/rubyXL/objects/comments.rb +1 -4
- data/lib/rubyXL/objects/connection.rb +175 -0
- data/lib/rubyXL/objects/container_nodes.rb +1 -5
- data/lib/rubyXL/objects/content_types.rb +3 -6
- data/lib/rubyXL/objects/data_validation.rb +2 -2
- data/lib/rubyXL/objects/document_properties.rb +11 -15
- data/lib/rubyXL/objects/extensions.rb +0 -2
- data/lib/rubyXL/objects/external_links.rb +30 -8
- data/lib/rubyXL/objects/fill.rb +2 -5
- data/lib/rubyXL/objects/filters.rb +5 -7
- data/lib/rubyXL/objects/font.rb +2 -7
- data/lib/rubyXL/objects/formula.rb +3 -5
- data/lib/rubyXL/objects/ooxml_object.rb +26 -19
- data/lib/rubyXL/objects/query_table.rb +104 -0
- data/lib/rubyXL/objects/reference.rb +6 -8
- data/lib/rubyXL/objects/relationships.rb +13 -13
- data/lib/rubyXL/objects/root.rb +0 -2
- data/lib/rubyXL/objects/shared_strings.rb +3 -6
- data/lib/rubyXL/objects/sheet_common.rb +1 -3
- data/lib/rubyXL/objects/sheet_data.rb +38 -11
- data/lib/rubyXL/objects/simple_types.rb +16 -1
- data/lib/rubyXL/objects/storage.rb +51 -50
- data/lib/rubyXL/objects/stylesheet.rb +8 -15
- data/lib/rubyXL/objects/text.rb +5 -7
- data/lib/rubyXL/objects/theme.rb +5 -8
- data/lib/rubyXL/objects/workbook.rb +140 -33
- data/lib/rubyXL/objects/worksheet.rb +44 -31
- data/lib/rubyXL/parser.rb +1 -3
- data/lib/rubyXL/worksheet.rb +83 -91
- data/lib/rubyXL.rb +1 -1
- data/rdoc/README_rdoc.html +111 -126
- data/rdoc/RubyXL/AExtension.html +20 -60
- data/rdoc/RubyXL/AExtensionStorageArea.html +11 -17
- data/rdoc/RubyXL/ActiveX.html +19 -47
- data/rdoc/RubyXL/ActiveXBinary.html +11 -22
- data/rdoc/RubyXL/AdjustHandleList.html +12 -19
- data/rdoc/RubyXL/Alignment.html +12 -19
- data/rdoc/RubyXL/AlternateContent.html +11 -17
- data/rdoc/RubyXL/Authors.html +12 -19
- data/rdoc/RubyXL/AutoFilter.html +12 -19
- data/rdoc/RubyXL/AutoFilterColumn.html +12 -19
- data/rdoc/RubyXL/BinaryImageFile.html +11 -25
- data/rdoc/RubyXL/BodyProperties.html +12 -19
- data/rdoc/RubyXL/BooleanNode.html +11 -17
- data/rdoc/RubyXL/BooleanValue.html +11 -17
- data/rdoc/RubyXL/Border.html +24 -84
- data/rdoc/RubyXL/BorderEdge.html +19 -52
- data/rdoc/RubyXL/Borders.html +18 -39
- data/rdoc/RubyXL/Break.html +12 -19
- data/rdoc/RubyXL/BreakList.html +12 -19
- data/rdoc/RubyXL/CT_AdjPoint2D.html +12 -19
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +12 -19
- data/rdoc/RubyXL/CT_Backdrop.html +12 -19
- data/rdoc/RubyXL/CT_Bevel.html +12 -19
- data/rdoc/RubyXL/CT_BiLevelEffect.html +12 -19
- data/rdoc/RubyXL/CT_BlendEffect.html +12 -19
- data/rdoc/RubyXL/CT_Blip.html +12 -19
- data/rdoc/RubyXL/CT_BlipFillProperties.html +12 -19
- data/rdoc/RubyXL/CT_BlurEffect.html +12 -19
- data/rdoc/RubyXL/CT_Camera.html +12 -19
- data/rdoc/RubyXL/CT_Color.html +12 -19
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +12 -19
- data/rdoc/RubyXL/CT_ColorMapping.html +12 -19
- data/rdoc/RubyXL/CT_ColorScheme.html +12 -19
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +12 -19
- data/rdoc/RubyXL/CT_ConnectionSite.html +12 -19
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +12 -19
- data/rdoc/RubyXL/CT_DashStop.html +12 -19
- data/rdoc/RubyXL/CT_DashStopList.html +12 -19
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +12 -19
- data/rdoc/RubyXL/CT_DuotoneEffect.html +12 -19
- data/rdoc/RubyXL/CT_EffectContainer.html +12 -19
- data/rdoc/RubyXL/CT_EffectList.html +12 -19
- data/rdoc/RubyXL/CT_EffectReference.html +12 -19
- data/rdoc/RubyXL/CT_EffectStyleItem.html +12 -19
- data/rdoc/RubyXL/CT_EffectStyleList.html +12 -19
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +12 -19
- data/rdoc/RubyXL/CT_FillEffect.html +12 -19
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +12 -19
- data/rdoc/RubyXL/CT_FillStyleList.html +12 -19
- data/rdoc/RubyXL/CT_FlatText.html +12 -19
- data/rdoc/RubyXL/CT_FontCollection.html +12 -19
- data/rdoc/RubyXL/CT_FontReference.html +12 -19
- data/rdoc/RubyXL/CT_GeomGuideList.html +12 -19
- data/rdoc/RubyXL/CT_GlowEffect.html +12 -19
- data/rdoc/RubyXL/CT_GradientFillProperties.html +12 -19
- data/rdoc/RubyXL/CT_GradientStop.html +12 -19
- data/rdoc/RubyXL/CT_GradientStopList.html +12 -19
- data/rdoc/RubyXL/CT_HSLEffect.html +12 -19
- data/rdoc/RubyXL/CT_HslColor.html +12 -19
- data/rdoc/RubyXL/CT_Hyperlink.html +12 -19
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +12 -19
- data/rdoc/RubyXL/CT_LightRig.html +12 -19
- data/rdoc/RubyXL/CT_LineEndProperties.html +12 -19
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +12 -19
- data/rdoc/RubyXL/CT_LineProperties.html +12 -19
- data/rdoc/RubyXL/CT_LineStyleList.html +12 -19
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +12 -19
- data/rdoc/RubyXL/CT_LuminanceEffect.html +12 -19
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +12 -19
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +12 -19
- data/rdoc/RubyXL/CT_Path2D.html +12 -19
- data/rdoc/RubyXL/CT_Path2DArcTo.html +12 -19
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +12 -19
- data/rdoc/RubyXL/CT_Path2DList.html +12 -19
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +12 -19
- data/rdoc/RubyXL/CT_Path2DTo.html +12 -19
- data/rdoc/RubyXL/CT_PathShadeProperties.html +12 -19
- data/rdoc/RubyXL/CT_PatternFillProperties.html +12 -19
- data/rdoc/RubyXL/CT_Point3D.html +12 -19
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +12 -19
- data/rdoc/RubyXL/CT_PresetColor.html +12 -19
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +12 -19
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +12 -19
- data/rdoc/RubyXL/CT_PresetTextShape.html +12 -19
- data/rdoc/RubyXL/CT_ReflectionEffect.html +12 -19
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +12 -19
- data/rdoc/RubyXL/CT_RelativeRect.html +12 -19
- data/rdoc/RubyXL/CT_SRgbColor.html +12 -19
- data/rdoc/RubyXL/CT_ScRgbColor.html +12 -19
- data/rdoc/RubyXL/CT_Scene3D.html +12 -19
- data/rdoc/RubyXL/CT_SchemeColor.html +12 -19
- data/rdoc/RubyXL/CT_Shape3D.html +12 -19
- data/rdoc/RubyXL/CT_ShapeStyle.html +12 -19
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +12 -19
- data/rdoc/RubyXL/CT_SphereCoords.html +12 -19
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +12 -19
- data/rdoc/RubyXL/CT_StyleMatrix.html +12 -19
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +12 -19
- data/rdoc/RubyXL/CT_SupplementalFont.html +12 -19
- data/rdoc/RubyXL/CT_SystemColor.html +12 -19
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +12 -19
- data/rdoc/RubyXL/CT_TextBlipBullet.html +12 -19
- data/rdoc/RubyXL/CT_TextCharBullet.html +12 -19
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +12 -19
- data/rdoc/RubyXL/CT_TextFont.html +12 -19
- data/rdoc/RubyXL/CT_TextListStyle.html +12 -19
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +12 -19
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +12 -19
- data/rdoc/RubyXL/CT_TextSpacing.html +12 -19
- data/rdoc/RubyXL/CT_TextTabStop.html +12 -19
- data/rdoc/RubyXL/CT_TextTabStopList.html +12 -19
- data/rdoc/RubyXL/CT_TileInfoProperties.html +12 -19
- data/rdoc/RubyXL/CT_TintEffect.html +12 -19
- data/rdoc/RubyXL/CT_Transform2D.html +12 -19
- data/rdoc/RubyXL/CT_TransformEffect.html +12 -19
- data/rdoc/RubyXL/CT_Vector3D.html +12 -19
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +12 -19
- data/rdoc/RubyXL/CalculationChain.html +16 -45
- data/rdoc/RubyXL/CalculationChainCell.html +12 -19
- data/rdoc/RubyXL/CalculationProperties.html +12 -19
- data/rdoc/RubyXL/Cell.html +133 -209
- data/rdoc/RubyXL/CellConvenienceMethods.html +168 -522
- data/rdoc/RubyXL/CellExt.html +12 -19
- data/rdoc/RubyXL/CellSmartTag.html +12 -19
- data/rdoc/RubyXL/CellSmartTagProperty.html +12 -19
- data/rdoc/RubyXL/CellSmartTags.html +12 -19
- data/rdoc/RubyXL/CellStyle.html +12 -19
- data/rdoc/RubyXL/CellStyleXFs.html +18 -39
- data/rdoc/RubyXL/CellStyles.html +18 -39
- data/rdoc/RubyXL/CellValue.html +17 -38
- data/rdoc/RubyXL/CellWatch.html +12 -19
- data/rdoc/RubyXL/CellWatches.html +12 -19
- data/rdoc/RubyXL/CellXFs.html +19 -42
- data/rdoc/RubyXL/ChartColorsFile.html +11 -25
- data/rdoc/RubyXL/ChartFile.html +18 -49
- data/rdoc/RubyXL/ChartStyleFile.html +11 -25
- data/rdoc/RubyXL/ChartUserShapesFile.html +11 -25
- data/rdoc/RubyXL/Chartsheet.html +19 -68
- data/rdoc/RubyXL/ChartsheetPageSetup.html +12 -19
- data/rdoc/RubyXL/ChartsheetProperties.html +12 -19
- data/rdoc/RubyXL/ChartsheetProtection.html +12 -19
- data/rdoc/RubyXL/ChartsheetView.html +12 -19
- data/rdoc/RubyXL/ChartsheetViews.html +12 -19
- data/rdoc/RubyXL/Color.html +18 -55
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +18 -65
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +28 -88
- data/rdoc/RubyXL/ColorConvenienceClasses.html +9 -14
- data/rdoc/RubyXL/ColorConvenienceMethods.html +14 -33
- data/rdoc/RubyXL/ColorFilter.html +12 -19
- data/rdoc/RubyXL/ColorScale.html +12 -19
- data/rdoc/RubyXL/ColorSet.html +12 -19
- data/rdoc/RubyXL/Colors.html +12 -19
- data/rdoc/RubyXL/ColumnRange.html +22 -74
- data/rdoc/RubyXL/ColumnRanges.html +23 -83
- data/rdoc/RubyXL/Comment.html +12 -19
- data/rdoc/RubyXL/CommentList.html +12 -19
- data/rdoc/RubyXL/CommentsFile.html +17 -51
- data/rdoc/RubyXL/ConditionalFormatValue.html +12 -19
- data/rdoc/RubyXL/ConditionalFormatting.html +12 -19
- data/rdoc/RubyXL/ConditionalFormattingRule.html +12 -19
- data/rdoc/RubyXL/Connection.html +99 -0
- data/rdoc/RubyXL/ConnectionTable.html +99 -0
- data/rdoc/RubyXL/ConnectionTables.html +99 -0
- data/rdoc/RubyXL/ConnectionTextField.html +99 -0
- data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
- data/rdoc/RubyXL/Connections.html +147 -0
- data/rdoc/RubyXL/ContentTypeDefault.html +11 -17
- data/rdoc/RubyXL/ContentTypeOverride.html +11 -17
- data/rdoc/RubyXL/ContentTypes.html +22 -63
- data/rdoc/RubyXL/ControlPropertiesFile.html +13 -22
- data/rdoc/RubyXL/CorePropertiesFile.html +34 -171
- data/rdoc/RubyXL/CustomColor.html +12 -19
- data/rdoc/RubyXL/CustomColorList.html +12 -19
- data/rdoc/RubyXL/CustomFilter.html +12 -19
- data/rdoc/RubyXL/CustomFilters.html +12 -19
- data/rdoc/RubyXL/CustomGeometry.html +12 -19
- data/rdoc/RubyXL/CustomProperties.html +12 -19
- data/rdoc/RubyXL/CustomPropertiesFile.html +11 -25
- data/rdoc/RubyXL/CustomProperty.html +12 -19
- data/rdoc/RubyXL/CustomPropertyFile.html +11 -25
- data/rdoc/RubyXL/CustomSheetView.html +12 -19
- data/rdoc/RubyXL/CustomSheetViews.html +12 -19
- data/rdoc/RubyXL/CustomWorkbookView.html +12 -19
- data/rdoc/RubyXL/CustomWorkbookViews.html +12 -19
- data/rdoc/RubyXL/CustomXMLFile.html +11 -22
- data/rdoc/RubyXL/DXF.html +12 -19
- data/rdoc/RubyXL/DXFs.html +12 -19
- data/rdoc/RubyXL/DataBar.html +12 -19
- data/rdoc/RubyXL/DataConsolidate.html +12 -19
- data/rdoc/RubyXL/DataConsolidationReference.html +12 -19
- data/rdoc/RubyXL/DataConsolidationReferences.html +12 -19
- data/rdoc/RubyXL/DataType.html +10 -39
- data/rdoc/RubyXL/DataValidation.html +12 -19
- data/rdoc/RubyXL/DataValidations.html +12 -19
- data/rdoc/RubyXL/DateGroupItem.html +12 -19
- data/rdoc/RubyXL/DefinedName.html +12 -19
- data/rdoc/RubyXL/DefinedNameExt.html +12 -19
- data/rdoc/RubyXL/DefinedNames.html +12 -19
- data/rdoc/RubyXL/DefinedNamesExt.html +12 -19
- data/rdoc/RubyXL/DocumentPropertiesFile.html +21 -68
- data/rdoc/RubyXL/DrawingFile.html +18 -49
- data/rdoc/RubyXL/DynamicFilter.html +12 -19
- data/rdoc/RubyXL/EmbeddedControl.html +12 -19
- data/rdoc/RubyXL/EmbeddedControls.html +12 -19
- data/rdoc/RubyXL/Extension.html +12 -19
- data/rdoc/RubyXL/ExtensionStorageArea.html +12 -19
- data/rdoc/RubyXL/Extents.html +12 -19
- data/rdoc/RubyXL/ExternalBook.html +12 -19
- data/rdoc/RubyXL/ExternalLinksFile.html +18 -49
- data/rdoc/RubyXL/ExternalReference.html +12 -19
- data/rdoc/RubyXL/ExternalReferences.html +12 -19
- data/rdoc/RubyXL/ExtraColorSchemeList.html +12 -19
- data/rdoc/RubyXL/FieldItem.html +12 -19
- data/rdoc/RubyXL/FileRecoveryProperties.html +12 -19
- data/rdoc/RubyXL/FileSharing.html +12 -19
- data/rdoc/RubyXL/FileVersion.html +12 -19
- data/rdoc/RubyXL/Fill.html +18 -39
- data/rdoc/RubyXL/Fills.html +18 -39
- data/rdoc/RubyXL/FilterContainer.html +12 -19
- data/rdoc/RubyXL/FloatNode.html +11 -17
- data/rdoc/RubyXL/FloatValue.html +11 -17
- data/rdoc/RubyXL/Font.html +21 -59
- data/rdoc/RubyXL/FontConvenienceMethods.html +48 -237
- data/rdoc/RubyXL/FontScheme.html +12 -19
- data/rdoc/RubyXL/Fonts.html +18 -39
- data/rdoc/RubyXL/Formula.html +12 -19
- data/rdoc/RubyXL/FunctionGroup.html +12 -19
- data/rdoc/RubyXL/FunctionGroups.html +12 -19
- data/rdoc/RubyXL/GenericStorageObject.html +21 -84
- data/rdoc/RubyXL/GradientFill.html +12 -19
- data/rdoc/RubyXL/HeaderFooterSettings.html +12 -19
- data/rdoc/RubyXL/Hyperlink.html +12 -19
- data/rdoc/RubyXL/HyperlinkRelFile.html +11 -22
- data/rdoc/RubyXL/Hyperlinks.html +12 -19
- data/rdoc/RubyXL/IconFilter.html +12 -19
- data/rdoc/RubyXL/IconSet.html +12 -19
- data/rdoc/RubyXL/IgnoredError.html +12 -19
- data/rdoc/RubyXL/IgnoredErrors.html +12 -19
- data/rdoc/RubyXL/IndexedColors.html +12 -19
- data/rdoc/RubyXL/InputCells.html +12 -19
- data/rdoc/RubyXL/IntegerNode.html +11 -17
- data/rdoc/RubyXL/IntegerValue.html +11 -17
- data/rdoc/RubyXL/LegacyCell.html +13 -66
- data/rdoc/RubyXL/LegacyWorksheet.html +25 -99
- data/rdoc/RubyXL/MRUColors.html +12 -19
- data/rdoc/RubyXL/MacrosFile.html +11 -25
- data/rdoc/RubyXL/MergedCell.html +12 -19
- data/rdoc/RubyXL/MergedCells.html +12 -19
- data/rdoc/RubyXL/NumFmt.html +12 -19
- data/rdoc/RubyXL/NumberFormat.html +18 -39
- data/rdoc/RubyXL/NumberFormats.html +18 -45
- data/rdoc/RubyXL/OLEObject.html +12 -19
- data/rdoc/RubyXL/OLEObjectFile.html +11 -25
- data/rdoc/RubyXL/OLEObjects.html +12 -19
- data/rdoc/RubyXL/OLESize.html +12 -19
- data/rdoc/RubyXL/OOXMLContainerObject.html +35 -132
- data/rdoc/RubyXL/OOXMLIgnored.html +19 -53
- data/rdoc/RubyXL/OOXMLObject.html +14 -25
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +91 -183
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +48 -185
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +47 -200
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +36 -133
- data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
- data/rdoc/RubyXL/Offset.html +12 -19
- data/rdoc/RubyXL/OlapProperties.html +99 -0
- data/rdoc/RubyXL/OleItem.html +99 -0
- data/rdoc/RubyXL/OleItems.html +99 -0
- data/rdoc/RubyXL/OleLink.html +99 -0
- data/rdoc/RubyXL/OutlineProperties.html +12 -19
- data/rdoc/RubyXL/PageMargins.html +12 -19
- data/rdoc/RubyXL/PageSetup.html +12 -19
- data/rdoc/RubyXL/PageSetupProperties.html +12 -19
- data/rdoc/RubyXL/Pane.html +12 -19
- data/rdoc/RubyXL/Parser.html +22 -56
- data/rdoc/RubyXL/PatternFill.html +12 -19
- data/rdoc/RubyXL/PhoneticProperties.html +12 -19
- data/rdoc/RubyXL/PhoneticRun.html +12 -19
- data/rdoc/RubyXL/PivotArea.html +12 -19
- data/rdoc/RubyXL/PivotCache.html +12 -19
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +13 -30
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +11 -25
- data/rdoc/RubyXL/PivotCaches.html +12 -19
- data/rdoc/RubyXL/PivotReference.html +12 -19
- data/rdoc/RubyXL/PivotReferences.html +12 -19
- data/rdoc/RubyXL/PivotTableFile.html +13 -30
- data/rdoc/RubyXL/PivotTableSelection.html +12 -19
- data/rdoc/RubyXL/PresetGeometry.html +12 -19
- data/rdoc/RubyXL/PrintOptions.html +12 -19
- data/rdoc/RubyXL/PrinterSettingsFile.html +11 -25
- data/rdoc/RubyXL/ProtectedRange.html +12 -19
- data/rdoc/RubyXL/ProtectedRanges.html +12 -19
- data/rdoc/RubyXL/Protection.html +12 -19
- data/rdoc/RubyXL/QueryParameter.html +99 -0
- data/rdoc/RubyXL/QueryParameters.html +99 -0
- data/rdoc/RubyXL/QueryTable.html +155 -0
- data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
- data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
- data/rdoc/RubyXL/QueryTableField.html +99 -0
- data/rdoc/RubyXL/QueryTableFields.html +99 -0
- data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
- data/rdoc/RubyXL/RID.html +11 -17
- data/rdoc/RubyXL/RawOOXML.html +20 -60
- data/rdoc/RubyXL/Reference.html +62 -228
- data/rdoc/RubyXL/Relationship.html +11 -17
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +13 -32
- data/rdoc/RubyXL/RelationshipSupport.html +25 -120
- data/rdoc/RubyXL/RevisionPointer.html +12 -22
- data/rdoc/RubyXL/RichText.html +19 -39
- data/rdoc/RubyXL/RichTextRun.html +17 -38
- data/rdoc/RubyXL/Row.html +33 -168
- data/rdoc/RubyXL/RowExt.html +12 -19
- data/rdoc/RubyXL/RunProperties.html +12 -19
- data/rdoc/RubyXL/Scenario.html +12 -19
- data/rdoc/RubyXL/Scenarios.html +12 -19
- data/rdoc/RubyXL/Selection.html +16 -37
- data/rdoc/RubyXL/ShapeGuide.html +12 -19
- data/rdoc/RubyXL/ShapeTextRectangle.html +12 -19
- data/rdoc/RubyXL/SharedStringsTable.html +37 -147
- data/rdoc/RubyXL/Sheet.html +12 -19
- data/rdoc/RubyXL/SheetCalculationProperties.html +12 -19
- data/rdoc/RubyXL/SheetData.html +19 -53
- data/rdoc/RubyXL/SheetDataExt.html +12 -19
- data/rdoc/RubyXL/SheetDataSet.html +12 -19
- data/rdoc/RubyXL/SheetMetadata.html +108 -0
- data/rdoc/RubyXL/SheetName.html +12 -19
- data/rdoc/RubyXL/SheetNames.html +12 -19
- data/rdoc/RubyXL/Sheets.html +12 -19
- data/rdoc/RubyXL/SlicerCacheFile.html +11 -25
- data/rdoc/RubyXL/SlicerFile.html +11 -25
- data/rdoc/RubyXL/SmartTagProperties.html +12 -19
- data/rdoc/RubyXL/SmartTagType.html +12 -19
- data/rdoc/RubyXL/SmartTagTypes.html +12 -19
- data/rdoc/RubyXL/SmartTags.html +12 -19
- data/rdoc/RubyXL/SortCondition.html +12 -19
- data/rdoc/RubyXL/SortState.html +12 -19
- data/rdoc/RubyXL/Sqref.html +19 -53
- data/rdoc/RubyXL/Stop.html +12 -19
- data/rdoc/RubyXL/StringNode.html +11 -17
- data/rdoc/RubyXL/StringNodeW3C.html +20 -54
- data/rdoc/RubyXL/StringValue.html +11 -17
- data/rdoc/RubyXL/Stylesheet.html +34 -117
- data/rdoc/RubyXL/TableFile.html +11 -25
- data/rdoc/RubyXL/TableParts.html +11 -17
- data/rdoc/RubyXL/TableStyle.html +12 -19
- data/rdoc/RubyXL/TableStyles.html +12 -19
- data/rdoc/RubyXL/Text.html +22 -67
- data/rdoc/RubyXL/TextImportSettings.html +99 -0
- data/rdoc/RubyXL/Theme.html +19 -75
- data/rdoc/RubyXL/ThemeElements.html +12 -19
- data/rdoc/RubyXL/ThumbnailFile.html +11 -25
- data/rdoc/RubyXL/Top10.html +12 -19
- data/rdoc/RubyXL/VMLDrawingFile.html +14 -32
- data/rdoc/RubyXL/Variant.html +12 -19
- data/rdoc/RubyXL/Vector.html +17 -38
- data/rdoc/RubyXL/VectorValue.html +11 -17
- data/rdoc/RubyXL/VisualProperties.html +12 -19
- data/rdoc/RubyXL/WebPublishObject.html +12 -19
- data/rdoc/RubyXL/WebPublishObjects.html +12 -19
- data/rdoc/RubyXL/WebPublishingItem.html +12 -19
- data/rdoc/RubyXL/WebPublishingItems.html +12 -19
- data/rdoc/RubyXL/WebPublishingProperties.html +12 -19
- data/rdoc/RubyXL/WebQueryProperties.html +99 -0
- data/rdoc/RubyXL/Workbook.html +486 -227
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +130 -888
- data/rdoc/RubyXL/WorkbookProperties.html +12 -19
- data/rdoc/RubyXL/WorkbookProtection.html +12 -19
- data/rdoc/RubyXL/WorkbookRoot.html +27 -114
- data/rdoc/RubyXL/WorkbookView.html +12 -19
- data/rdoc/RubyXL/WorkbookViews.html +12 -19
- data/rdoc/RubyXL/Worksheet.html +92 -121
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +298 -1109
- data/rdoc/RubyXL/WorksheetDimensions.html +12 -19
- data/rdoc/RubyXL/WorksheetFormatProperties.html +11 -17
- data/rdoc/RubyXL/WorksheetProperties.html +12 -19
- data/rdoc/RubyXL/WorksheetProtection.html +12 -19
- data/rdoc/RubyXL/WorksheetView.html +12 -19
- data/rdoc/RubyXL/WorksheetViews.html +12 -19
- data/rdoc/RubyXL/XF.html +12 -19
- data/rdoc/RubyXL.html +39 -318
- data/rdoc/created.rid +45 -38
- data/rdoc/css/rdoc.css +55 -6
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/index.html +33 -373
- data/rdoc/js/darkfish.js +22 -99
- data/rdoc/js/navigation.js +4 -41
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +32 -31
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +6 -6
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +205 -45
- data/rubyXL.gemspec +53 -29
- data/spec/lib/cell_spec.rb +57 -6
- data/spec/lib/color_spec.rb +2 -1
- data/spec/lib/parser_spec.rb +24 -27
- data/spec/lib/reference_spec.rb +9 -3
- data/spec/lib/rgb_color_spec.rb +27 -0
- data/spec/lib/stylesheet_spec.rb +8 -11
- data/spec/lib/text_spec.rb +1 -5
- data/spec/lib/workbook_spec.rb +25 -4
- data/spec/lib/worksheet_spec.rb +873 -479
- data/spec/spec_helper.rb +2 -0
- data/test/test_parse_write.rb +15 -15
- metadata +54 -10
- data/rdoc/js/jquery.js +0 -4
@@ -4,21 +4,23 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.
|
7
|
+
<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.25</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
11
|
var index_rel_prefix = "../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../js/
|
15
|
-
<script src="../js/
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
16
19
|
|
17
20
|
<link href="../css/fonts.css" rel="stylesheet">
|
18
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
19
22
|
|
20
23
|
|
21
|
-
|
22
24
|
<body id="top" role="document" class="module">
|
23
25
|
<nav role="navigation">
|
24
26
|
<div id="project-navigation">
|
@@ -58,148 +60,81 @@
|
|
58
60
|
|
59
61
|
|
60
62
|
|
61
|
-
|
63
|
+
|
64
|
+
<!-- Method Quickref -->
|
62
65
|
<div id="method-list-section" class="nav-section">
|
63
66
|
<h3>Methods</h3>
|
64
67
|
|
65
68
|
<ul class="link-list" role="directory">
|
66
|
-
|
69
|
+
<li ><a href="#method-i-add_validation_list">#add_validation_list</a>
|
67
70
|
<li ><a href="#method-i-change_column_alignment">#change_column_alignment</a>
|
68
|
-
|
69
71
|
<li ><a href="#method-i-change_column_bold">#change_column_bold</a>
|
70
|
-
|
71
72
|
<li ><a href="#method-i-change_column_border">#change_column_border</a>
|
72
|
-
|
73
73
|
<li ><a href="#method-i-change_column_border_color">#change_column_border_color</a>
|
74
|
-
|
75
74
|
<li ><a href="#method-i-change_column_fill">#change_column_fill</a>
|
76
|
-
|
77
75
|
<li ><a href="#method-i-change_column_font">#change_column_font</a>
|
78
|
-
|
79
76
|
<li ><a href="#method-i-change_column_font_color">#change_column_font_color</a>
|
80
|
-
|
81
77
|
<li ><a href="#method-i-change_column_font_name">#change_column_font_name</a>
|
82
|
-
|
83
78
|
<li ><a href="#method-i-change_column_font_size">#change_column_font_size</a>
|
84
|
-
|
85
79
|
<li ><a href="#method-i-change_column_horizontal_alignment">#change_column_horizontal_alignment</a>
|
86
|
-
|
87
80
|
<li ><a href="#method-i-change_column_italics">#change_column_italics</a>
|
88
|
-
|
89
81
|
<li ><a href="#method-i-change_column_strikethrough">#change_column_strikethrough</a>
|
90
|
-
|
91
82
|
<li ><a href="#method-i-change_column_underline">#change_column_underline</a>
|
92
|
-
|
93
83
|
<li ><a href="#method-i-change_column_vertical_alignment">#change_column_vertical_alignment</a>
|
94
|
-
|
95
84
|
<li ><a href="#method-i-change_column_width">#change_column_width</a>
|
96
|
-
|
97
85
|
<li ><a href="#method-i-change_column_width_raw">#change_column_width_raw</a>
|
98
|
-
|
99
86
|
<li ><a href="#method-i-change_row_alignment">#change_row_alignment</a>
|
100
|
-
|
101
87
|
<li ><a href="#method-i-change_row_bold">#change_row_bold</a>
|
102
|
-
|
103
88
|
<li ><a href="#method-i-change_row_border">#change_row_border</a>
|
104
|
-
|
105
89
|
<li ><a href="#method-i-change_row_border_color">#change_row_border_color</a>
|
106
|
-
|
107
90
|
<li ><a href="#method-i-change_row_fill">#change_row_fill</a>
|
108
|
-
|
109
91
|
<li ><a href="#method-i-change_row_font">#change_row_font</a>
|
110
|
-
|
111
92
|
<li ><a href="#method-i-change_row_font_color">#change_row_font_color</a>
|
112
|
-
|
113
93
|
<li ><a href="#method-i-change_row_font_name">#change_row_font_name</a>
|
114
|
-
|
115
94
|
<li ><a href="#method-i-change_row_font_size">#change_row_font_size</a>
|
116
|
-
|
117
95
|
<li ><a href="#method-i-change_row_height">#change_row_height</a>
|
118
|
-
|
119
96
|
<li ><a href="#method-i-change_row_horizontal_alignment">#change_row_horizontal_alignment</a>
|
120
|
-
|
121
97
|
<li ><a href="#method-i-change_row_italics">#change_row_italics</a>
|
122
|
-
|
123
98
|
<li ><a href="#method-i-change_row_strikethrough">#change_row_strikethrough</a>
|
124
|
-
|
125
99
|
<li ><a href="#method-i-change_row_underline">#change_row_underline</a>
|
126
|
-
|
127
100
|
<li ><a href="#method-i-change_row_vertical_alignment">#change_row_vertical_alignment</a>
|
128
|
-
|
129
101
|
<li ><a href="#method-i-column_font">#column_font</a>
|
130
|
-
|
131
102
|
<li ><a href="#method-i-delete_cell">#delete_cell</a>
|
132
|
-
|
133
103
|
<li ><a href="#method-i-delete_column">#delete_column</a>
|
134
|
-
|
135
104
|
<li ><a href="#method-i-delete_row">#delete_row</a>
|
136
|
-
|
137
105
|
<li ><a href="#method-i-get_col_style">#get_col_style</a>
|
138
|
-
|
139
106
|
<li ><a href="#method-i-get_cols_style_index">#get_cols_style_index</a>
|
140
|
-
|
141
107
|
<li ><a href="#method-i-get_column_alignment">#get_column_alignment</a>
|
142
|
-
|
143
108
|
<li ><a href="#method-i-get_column_border">#get_column_border</a>
|
144
|
-
|
145
109
|
<li ><a href="#method-i-get_column_border_color">#get_column_border_color</a>
|
146
|
-
|
147
110
|
<li ><a href="#method-i-get_column_fill">#get_column_fill</a>
|
148
|
-
|
149
111
|
<li ><a href="#method-i-get_column_font_color">#get_column_font_color</a>
|
150
|
-
|
151
112
|
<li ><a href="#method-i-get_column_font_name">#get_column_font_name</a>
|
152
|
-
|
153
113
|
<li ><a href="#method-i-get_column_font_size">#get_column_font_size</a>
|
154
|
-
|
155
114
|
<li ><a href="#method-i-get_column_width">#get_column_width</a>
|
156
|
-
|
157
115
|
<li ><a href="#method-i-get_column_width_raw">#get_column_width_raw</a>
|
158
|
-
|
159
116
|
<li ><a href="#method-i-get_row_alignment">#get_row_alignment</a>
|
160
|
-
|
161
117
|
<li ><a href="#method-i-get_row_border">#get_row_border</a>
|
162
|
-
|
163
118
|
<li ><a href="#method-i-get_row_border_color">#get_row_border_color</a>
|
164
|
-
|
165
119
|
<li ><a href="#method-i-get_row_fill">#get_row_fill</a>
|
166
|
-
|
167
120
|
<li ><a href="#method-i-get_row_font_color">#get_row_font_color</a>
|
168
|
-
|
169
121
|
<li ><a href="#method-i-get_row_font_name">#get_row_font_name</a>
|
170
|
-
|
171
122
|
<li ><a href="#method-i-get_row_font_size">#get_row_font_size</a>
|
172
|
-
|
173
123
|
<li ><a href="#method-i-get_row_height">#get_row_height</a>
|
174
|
-
|
175
124
|
<li ><a href="#method-i-get_row_style">#get_row_style</a>
|
176
|
-
|
177
125
|
<li ><a href="#method-i-insert_cell">#insert_cell</a>
|
178
|
-
|
179
126
|
<li ><a href="#method-i-insert_column">#insert_column</a>
|
180
|
-
|
181
127
|
<li ><a href="#method-i-insert_row">#insert_row</a>
|
182
|
-
|
183
128
|
<li ><a href="#method-i-is_column_bolded">#is_column_bolded</a>
|
184
|
-
|
185
129
|
<li ><a href="#method-i-is_column_italicized">#is_column_italicized</a>
|
186
|
-
|
187
130
|
<li ><a href="#method-i-is_column_struckthrough">#is_column_struckthrough</a>
|
188
|
-
|
189
131
|
<li ><a href="#method-i-is_column_underlined">#is_column_underlined</a>
|
190
|
-
|
191
132
|
<li ><a href="#method-i-is_row_bolded">#is_row_bolded</a>
|
192
|
-
|
193
133
|
<li ><a href="#method-i-is_row_italicized">#is_row_italicized</a>
|
194
|
-
|
195
134
|
<li ><a href="#method-i-is_row_struckthrough">#is_row_struckthrough</a>
|
196
|
-
|
197
135
|
<li ><a href="#method-i-is_row_underlined">#is_row_underlined</a>
|
198
|
-
|
199
136
|
<li ><a href="#method-i-merge_cells">#merge_cells</a>
|
200
|
-
|
201
137
|
<li ><a href="#method-i-row_font">#row_font</a>
|
202
|
-
|
203
138
|
</ul>
|
204
139
|
</div>
|
205
140
|
|
@@ -215,90 +150,80 @@
|
|
215
150
|
|
216
151
|
</section>
|
217
152
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
153
|
<section id="5Buntitled-5D" class="documentation-section">
|
222
|
-
|
223
154
|
|
224
|
-
|
225
155
|
|
226
|
-
|
227
156
|
<section class="constants-list">
|
228
157
|
<header>
|
229
158
|
<h3>Constants</h3>
|
230
159
|
</header>
|
231
160
|
<dl>
|
232
|
-
|
233
161
|
<dt id="BOLD">BOLD
|
234
|
-
|
235
162
|
<dd>
|
236
|
-
|
237
|
-
|
238
163
|
<dt id="COLOR">COLOR
|
239
|
-
|
240
164
|
<dd>
|
241
|
-
|
242
|
-
|
243
165
|
<dt id="ITALICS">ITALICS
|
244
|
-
|
245
166
|
<dd>
|
246
|
-
|
247
|
-
|
248
167
|
<dt id="NAME">NAME
|
249
|
-
|
250
168
|
<dd>
|
251
|
-
|
252
|
-
|
253
169
|
<dt id="SIZE">SIZE
|
254
|
-
|
255
170
|
<dd>
|
256
|
-
|
257
|
-
|
258
171
|
<dt id="STRIKETHROUGH">STRIKETHROUGH
|
259
|
-
|
260
172
|
<dd>
|
261
|
-
|
262
|
-
|
263
173
|
<dt id="UNDERLINE">UNDERLINE
|
264
|
-
|
265
174
|
<dd>
|
266
|
-
|
267
|
-
|
268
175
|
</dl>
|
269
176
|
</section>
|
270
|
-
|
271
177
|
|
272
|
-
|
273
178
|
|
274
|
-
|
179
|
+
|
275
180
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
276
181
|
<header>
|
277
182
|
<h3>Public Instance Methods</h3>
|
278
183
|
</header>
|
279
184
|
|
280
|
-
|
185
|
+
<div id="method-i-add_validation_list" class="method-detail ">
|
186
|
+
<div class="method-heading">
|
187
|
+
<span class="method-name">add_validation_list</span><span
|
188
|
+
class="method-args">(ref, list_arr)</span>
|
189
|
+
<span class="method-click-advice">click to toggle source</span>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
|
194
|
+
|
195
|
+
<div class="method-source-code" id="add_validation_list-source">
|
196
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 700</span>
|
197
|
+
<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>)
|
198
|
+
<span class="ruby-comment"># "Any double quote characters in the value should be escaped with another double quote.</span>
|
199
|
+
<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>
|
200
|
+
<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>
|
201
|
+
<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>
|
202
|
+
<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>
|
203
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator"><<</span>
|
204
|
+
<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>),
|
205
|
+
<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>),
|
206
|
+
<span class="ruby-value">:type</span> <span class="ruby-operator">=></span> <span class="ruby-string">'list'</span>})
|
207
|
+
<span class="ruby-keyword">end</span></pre>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
281
214
|
<div id="method-i-change_column_alignment" class="method-detail ">
|
282
|
-
|
283
215
|
<div class="method-heading">
|
284
216
|
<span class="method-name">change_column_alignment</span><span
|
285
|
-
class="method-args">(column_index, &block)</span>
|
286
|
-
|
217
|
+
class="method-args">(column_index, &block)</span>
|
287
218
|
<span class="method-click-advice">click to toggle source</span>
|
288
|
-
|
289
219
|
</div>
|
290
|
-
|
291
220
|
|
292
221
|
<div class="method-description">
|
293
222
|
|
294
|
-
|
295
|
-
|
296
|
-
|
297
223
|
|
298
|
-
|
299
224
|
<div class="method-source-code" id="change_column_alignment-source">
|
300
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
301
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
225
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 675</span>
|
226
|
+
<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>)
|
302
227
|
<span class="ruby-identifier">validate_workbook</span>
|
303
228
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
304
229
|
|
@@ -307,119 +232,86 @@
|
|
307
232
|
<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>
|
308
233
|
|
309
234
|
<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>
|
235
|
+
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
310
236
|
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
311
237
|
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
312
238
|
<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>)
|
313
239
|
}
|
314
240
|
<span class="ruby-keyword">end</span></pre>
|
315
241
|
</div>
|
316
|
-
|
317
242
|
</div>
|
318
243
|
|
319
|
-
|
320
244
|
|
321
|
-
|
322
245
|
</div>
|
323
246
|
|
324
|
-
|
325
247
|
<div id="method-i-change_column_bold" class="method-detail ">
|
326
|
-
|
327
248
|
<div class="method-heading">
|
328
249
|
<span class="method-name">change_column_bold</span><span
|
329
250
|
class="method-args">(column_index, bolded = false)</span>
|
330
|
-
|
331
251
|
<span class="method-click-advice">click to toggle source</span>
|
332
|
-
|
333
252
|
</div>
|
334
|
-
|
335
253
|
|
336
254
|
<div class="method-description">
|
337
255
|
|
338
|
-
|
339
|
-
|
340
|
-
|
341
256
|
|
342
|
-
|
343
257
|
<div class="method-source-code" id="change_column_bold-source">
|
344
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
345
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_bold</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
|
258
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 606</span>
|
259
|
+
<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>)
|
346
260
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
347
261
|
<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>
|
348
262
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
|
349
263
|
<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>)
|
350
264
|
<span class="ruby-keyword">end</span></pre>
|
351
265
|
</div>
|
352
|
-
|
353
266
|
</div>
|
354
267
|
|
355
|
-
|
356
268
|
|
357
|
-
|
358
269
|
</div>
|
359
270
|
|
360
|
-
|
361
271
|
<div id="method-i-change_column_border" class="method-detail ">
|
362
|
-
|
363
272
|
<div class="method-heading">
|
364
273
|
<span class="method-name">change_column_border</span><span
|
365
274
|
class="method-args">(column_index, direction, weight)</span>
|
366
|
-
|
367
275
|
<span class="method-click-advice">click to toggle source</span>
|
368
|
-
|
369
276
|
</div>
|
370
|
-
|
371
277
|
|
372
278
|
<div class="method-description">
|
373
279
|
|
374
|
-
|
375
|
-
|
376
|
-
|
377
280
|
|
378
|
-
|
379
281
|
<div class="method-source-code" id="change_column_border-source">
|
380
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
381
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_border</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
282
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 635</span>
|
283
|
+
<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>)
|
382
284
|
<span class="ruby-identifier">validate_workbook</span>
|
383
285
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
384
286
|
|
385
287
|
<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>)
|
386
288
|
|
387
289
|
<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>
|
290
|
+
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
388
291
|
<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>]
|
389
|
-
<span class="ruby-
|
292
|
+
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
293
|
+
<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>)
|
390
294
|
}
|
391
295
|
<span class="ruby-keyword">end</span></pre>
|
392
296
|
</div>
|
393
|
-
|
394
297
|
</div>
|
395
298
|
|
396
|
-
|
397
299
|
|
398
|
-
|
399
300
|
</div>
|
400
301
|
|
401
|
-
|
402
302
|
<div id="method-i-change_column_border_color" class="method-detail ">
|
403
|
-
|
404
303
|
<div class="method-heading">
|
405
304
|
<span class="method-name">change_column_border_color</span><span
|
406
305
|
class="method-args">(column_index, direction, color)</span>
|
407
|
-
|
408
306
|
<span class="method-click-advice">click to toggle source</span>
|
409
|
-
|
410
307
|
</div>
|
411
|
-
|
412
308
|
|
413
309
|
<div class="method-description">
|
414
310
|
|
415
|
-
|
416
|
-
|
417
|
-
|
418
311
|
|
419
|
-
|
420
312
|
<div class="method-source-code" id="change_column_border_color-source">
|
421
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
422
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_border_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
313
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 649</span>
|
314
|
+
<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>)
|
423
315
|
<span class="ruby-identifier">validate_workbook</span>
|
424
316
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
425
317
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)
|
@@ -432,36 +324,24 @@
|
|
432
324
|
}
|
433
325
|
<span class="ruby-keyword">end</span></pre>
|
434
326
|
</div>
|
435
|
-
|
436
327
|
</div>
|
437
328
|
|
438
|
-
|
439
329
|
|
440
|
-
|
441
330
|
</div>
|
442
331
|
|
443
|
-
|
444
332
|
<div id="method-i-change_column_fill" class="method-detail ">
|
445
|
-
|
446
333
|
<div class="method-heading">
|
447
334
|
<span class="method-name">change_column_fill</span><span
|
448
|
-
class="method-args">(column_index, color_code =
|
449
|
-
|
335
|
+
class="method-args">(column_index, color_code = 'ffffff')</span>
|
450
336
|
<span class="method-click-advice">click to toggle source</span>
|
451
|
-
|
452
337
|
</div>
|
453
|
-
|
454
338
|
|
455
339
|
<div class="method-description">
|
456
340
|
|
457
|
-
|
458
|
-
|
459
|
-
|
460
341
|
|
461
|
-
|
462
342
|
<div class="method-source-code" id="change_column_fill-source">
|
463
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
464
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_fill</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">color_code</span> = <span class="ruby-string">'ffffff'</span>)
|
343
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 401</span>
|
344
|
+
<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>)
|
465
345
|
<span class="ruby-identifier">validate_workbook</span>
|
466
346
|
<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>)
|
467
347
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
@@ -469,42 +349,31 @@
|
|
469
349
|
<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>)
|
470
350
|
|
471
351
|
<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>
|
352
|
+
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
472
353
|
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
473
|
-
<span class="ruby-
|
354
|
+
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
355
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">color_code</span>)
|
474
356
|
}
|
475
357
|
<span class="ruby-keyword">end</span></pre>
|
476
358
|
</div>
|
477
|
-
|
478
359
|
</div>
|
479
360
|
|
480
|
-
|
481
361
|
|
482
|
-
|
483
362
|
</div>
|
484
363
|
|
485
|
-
|
486
364
|
<div id="method-i-change_column_font" class="method-detail ">
|
487
|
-
|
488
365
|
<div class="method-heading">
|
489
366
|
<span class="method-name">change_column_font</span><span
|
490
367
|
class="method-args">(column_index, change_type, arg, font, xf)</span>
|
491
|
-
|
492
368
|
<span class="method-click-advice">click to toggle source</span>
|
493
|
-
|
494
369
|
</div>
|
495
|
-
|
496
370
|
|
497
371
|
<div class="method-description">
|
498
|
-
|
499
|
-
<p>Helper method to update the fonts and cell styles array main method to
|
500
|
-
change font, called from each separate font mutator method</p>
|
501
|
-
|
502
|
-
|
372
|
+
<p>Helper method to update the fonts and cell styles array main method to change font, called from each separate font mutator method</p>
|
503
373
|
|
504
|
-
|
505
374
|
<div class="method-source-code" id="change_column_font-source">
|
506
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
507
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
375
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 563</span>
|
376
|
+
<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>)
|
508
377
|
<span class="ruby-identifier">validate_workbook</span>
|
509
378
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
510
379
|
|
@@ -517,36 +386,24 @@ change font, called from each separate font mutator method</p>
|
|
517
386
|
}
|
518
387
|
<span class="ruby-keyword">end</span></pre>
|
519
388
|
</div>
|
520
|
-
|
521
389
|
</div>
|
522
390
|
|
523
|
-
|
524
391
|
|
525
|
-
|
526
392
|
</div>
|
527
393
|
|
528
|
-
|
529
394
|
<div id="method-i-change_column_font_color" class="method-detail ">
|
530
|
-
|
531
395
|
<div class="method-heading">
|
532
396
|
<span class="method-name">change_column_font_color</span><span
|
533
|
-
class="method-args">(column_index, font_color
|
534
|
-
|
397
|
+
class="method-args">(column_index, font_color='000000')</span>
|
535
398
|
<span class="method-click-advice">click to toggle source</span>
|
536
|
-
|
537
399
|
</div>
|
538
|
-
|
539
400
|
|
540
401
|
<div class="method-description">
|
541
402
|
|
542
|
-
|
543
|
-
|
544
|
-
|
545
403
|
|
546
|
-
|
547
404
|
<div class="method-source-code" id="change_column_font_color-source">
|
548
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
549
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
405
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 590</span>
|
406
|
+
<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>)
|
550
407
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
|
551
408
|
|
552
409
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
@@ -555,316 +412,207 @@ change font, called from each separate font mutator method</p>
|
|
555
412
|
<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>)
|
556
413
|
<span class="ruby-keyword">end</span></pre>
|
557
414
|
</div>
|
558
|
-
|
559
415
|
</div>
|
560
416
|
|
561
|
-
|
562
417
|
|
563
|
-
|
564
418
|
</div>
|
565
419
|
|
566
|
-
|
567
420
|
<div id="method-i-change_column_font_name" class="method-detail ">
|
568
|
-
|
569
421
|
<div class="method-heading">
|
570
422
|
<span class="method-name">change_column_font_name</span><span
|
571
|
-
class="method-args">(column_index = 0, font_name =
|
572
|
-
|
423
|
+
class="method-args">(column_index = 0, font_name = 'Verdana')</span>
|
573
424
|
<span class="method-click-advice">click to toggle source</span>
|
574
|
-
|
575
425
|
</div>
|
576
|
-
|
577
426
|
|
578
427
|
<div class="method-description">
|
579
428
|
|
580
|
-
|
581
|
-
|
582
|
-
|
583
429
|
|
584
|
-
|
585
430
|
<div class="method-source-code" id="change_column_font_name-source">
|
586
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
587
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
431
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 576</span>
|
432
|
+
<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>)
|
588
433
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
589
434
|
<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>
|
590
435
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
|
591
436
|
<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>)
|
592
437
|
<span class="ruby-keyword">end</span></pre>
|
593
438
|
</div>
|
594
|
-
|
595
439
|
</div>
|
596
440
|
|
597
|
-
|
598
441
|
|
599
|
-
|
600
442
|
</div>
|
601
443
|
|
602
|
-
|
603
444
|
<div id="method-i-change_column_font_size" class="method-detail ">
|
604
|
-
|
605
445
|
<div class="method-heading">
|
606
446
|
<span class="method-name">change_column_font_size</span><span
|
607
447
|
class="method-args">(column_index, font_size=10)</span>
|
608
|
-
|
609
448
|
<span class="method-click-advice">click to toggle source</span>
|
610
|
-
|
611
449
|
</div>
|
612
|
-
|
613
450
|
|
614
451
|
<div class="method-description">
|
615
452
|
|
616
|
-
|
617
|
-
|
618
|
-
|
619
453
|
|
620
|
-
|
621
454
|
<div class="method-source-code" id="change_column_font_size-source">
|
622
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
623
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
455
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 583</span>
|
456
|
+
<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>)
|
624
457
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
625
458
|
<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>
|
626
459
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
|
627
460
|
<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>)
|
628
461
|
<span class="ruby-keyword">end</span></pre>
|
629
462
|
</div>
|
630
|
-
|
631
463
|
</div>
|
632
464
|
|
633
|
-
|
634
465
|
|
635
|
-
|
636
466
|
</div>
|
637
467
|
|
638
|
-
|
639
468
|
<div id="method-i-change_column_horizontal_alignment" class="method-detail ">
|
640
|
-
|
641
469
|
<div class="method-heading">
|
642
470
|
<span class="method-name">change_column_horizontal_alignment</span><span
|
643
|
-
class="method-args">(column_index, alignment =
|
644
|
-
|
471
|
+
class="method-args">(column_index, alignment = 'center')</span>
|
645
472
|
<span class="method-click-advice">click to toggle source</span>
|
646
|
-
|
647
473
|
</div>
|
648
|
-
|
649
474
|
|
650
475
|
<div class="method-description">
|
651
476
|
|
652
|
-
|
653
|
-
|
654
|
-
|
655
477
|
|
656
|
-
|
657
478
|
<div class="method-source-code" id="change_column_horizontal_alignment-source">
|
658
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
659
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_horizontal_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
|
479
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 627</span>
|
480
|
+
<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>)
|
660
481
|
<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> }
|
661
482
|
<span class="ruby-keyword">end</span></pre>
|
662
483
|
</div>
|
663
|
-
|
664
484
|
</div>
|
665
485
|
|
666
|
-
|
667
486
|
|
668
|
-
|
669
487
|
</div>
|
670
488
|
|
671
|
-
|
672
489
|
<div id="method-i-change_column_italics" class="method-detail ">
|
673
|
-
|
674
490
|
<div class="method-heading">
|
675
491
|
<span class="method-name">change_column_italics</span><span
|
676
492
|
class="method-args">(column_index, italicized = false)</span>
|
677
|
-
|
678
493
|
<span class="method-click-advice">click to toggle source</span>
|
679
|
-
|
680
494
|
</div>
|
681
|
-
|
682
495
|
|
683
496
|
<div class="method-description">
|
684
497
|
|
685
|
-
|
686
|
-
|
687
|
-
|
688
498
|
|
689
|
-
|
690
499
|
<div class="method-source-code" id="change_column_italics-source">
|
691
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
692
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_italics</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
|
500
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 599</span>
|
501
|
+
<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>)
|
693
502
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
694
503
|
<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>
|
695
504
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
|
696
505
|
<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>)
|
697
506
|
<span class="ruby-keyword">end</span></pre>
|
698
507
|
</div>
|
699
|
-
|
700
508
|
</div>
|
701
509
|
|
702
|
-
|
703
510
|
|
704
|
-
|
705
511
|
</div>
|
706
512
|
|
707
|
-
|
708
513
|
<div id="method-i-change_column_strikethrough" class="method-detail ">
|
709
|
-
|
710
514
|
<div class="method-heading">
|
711
515
|
<span class="method-name">change_column_strikethrough</span><span
|
712
516
|
class="method-args">(column_index, struckthrough=false)</span>
|
713
|
-
|
714
517
|
<span class="method-click-advice">click to toggle source</span>
|
715
|
-
|
716
518
|
</div>
|
717
|
-
|
718
519
|
|
719
520
|
<div class="method-description">
|
720
521
|
|
721
|
-
|
722
|
-
|
723
|
-
|
724
522
|
|
725
|
-
|
726
523
|
<div class="method-source-code" id="change_column_strikethrough-source">
|
727
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
728
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_strikethrough</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
|
524
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 620</span>
|
525
|
+
<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>)
|
729
526
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
730
527
|
<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>
|
731
528
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
|
732
529
|
<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>)
|
733
530
|
<span class="ruby-keyword">end</span></pre>
|
734
531
|
</div>
|
735
|
-
|
736
532
|
</div>
|
737
533
|
|
738
|
-
|
739
534
|
|
740
|
-
|
741
535
|
</div>
|
742
536
|
|
743
|
-
|
744
537
|
<div id="method-i-change_column_underline" class="method-detail ">
|
745
|
-
|
746
538
|
<div class="method-heading">
|
747
539
|
<span class="method-name">change_column_underline</span><span
|
748
540
|
class="method-args">(column_index, underlined = false)</span>
|
749
|
-
|
750
541
|
<span class="method-click-advice">click to toggle source</span>
|
751
|
-
|
752
542
|
</div>
|
753
|
-
|
754
543
|
|
755
544
|
<div class="method-description">
|
756
545
|
|
757
|
-
|
758
|
-
|
759
|
-
|
760
546
|
|
761
|
-
|
762
547
|
<div class="method-source-code" id="change_column_underline-source">
|
763
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
764
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_underline</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">underlined</span> = <span class="ruby-keyword">false</span>)
|
548
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 613</span>
|
549
|
+
<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>)
|
765
550
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
|
766
551
|
<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>
|
767
552
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
|
768
553
|
<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>)
|
769
554
|
<span class="ruby-keyword">end</span></pre>
|
770
555
|
</div>
|
771
|
-
|
772
556
|
</div>
|
773
557
|
|
774
|
-
|
775
558
|
|
776
|
-
|
777
559
|
</div>
|
778
560
|
|
779
|
-
|
780
561
|
<div id="method-i-change_column_vertical_alignment" class="method-detail ">
|
781
|
-
|
782
562
|
<div class="method-heading">
|
783
563
|
<span class="method-name">change_column_vertical_alignment</span><span
|
784
|
-
class="method-args">(column_index, alignment =
|
785
|
-
|
564
|
+
class="method-args">(column_index, alignment = 'center')</span>
|
786
565
|
<span class="method-click-advice">click to toggle source</span>
|
787
|
-
|
788
566
|
</div>
|
789
|
-
|
790
567
|
|
791
568
|
<div class="method-description">
|
792
569
|
|
793
|
-
|
794
|
-
|
795
|
-
|
796
570
|
|
797
|
-
|
798
571
|
<div class="method-source-code" id="change_column_vertical_alignment-source">
|
799
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
800
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_vertical_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">'center'</span>)
|
572
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 631</span>
|
573
|
+
<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>)
|
801
574
|
<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> }
|
802
575
|
<span class="ruby-keyword">end</span></pre>
|
803
576
|
</div>
|
804
|
-
|
805
577
|
</div>
|
806
578
|
|
807
|
-
|
808
579
|
|
809
|
-
|
810
580
|
</div>
|
811
581
|
|
812
|
-
|
813
582
|
<div id="method-i-change_column_width" class="method-detail ">
|
814
|
-
|
815
583
|
<div class="method-heading">
|
816
584
|
<span class="method-name">change_column_width</span><span
|
817
585
|
class="method-args">(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)</span>
|
818
|
-
|
819
586
|
<span class="method-click-advice">click to toggle source</span>
|
820
|
-
|
821
587
|
</div>
|
822
|
-
|
823
588
|
|
824
589
|
<div class="method-description">
|
825
|
-
|
826
|
-
<p>Get column width measured in number of digits, as per <a
|
827
|
-
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>
|
828
|
-
|
829
|
-
|
590
|
+
<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>
|
830
591
|
|
831
|
-
|
832
592
|
<div class="method-source-code" id="change_column_width-source">
|
833
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
834
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
593
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 384</span>
|
594
|
+
<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>)
|
835
595
|
<span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, ((<span class="ruby-identifier">width_in_chars</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-operator">*</span> <span class="ruby-value">256</span>).<span class="ruby-identifier">to_i</span> <span class="ruby-operator">/</span> <span class="ruby-value">256.0</span>)
|
836
596
|
<span class="ruby-keyword">end</span></pre>
|
837
597
|
</div>
|
838
|
-
|
839
598
|
</div>
|
840
599
|
|
841
|
-
|
842
600
|
|
843
|
-
|
844
601
|
</div>
|
845
602
|
|
846
|
-
|
847
603
|
<div id="method-i-change_column_width_raw" class="method-detail ">
|
848
|
-
|
849
604
|
<div class="method-heading">
|
850
605
|
<span class="method-name">change_column_width_raw</span><span
|
851
606
|
class="method-args">(column_index, width)</span>
|
852
|
-
|
853
607
|
<span class="method-click-advice">click to toggle source</span>
|
854
|
-
|
855
608
|
</div>
|
856
|
-
|
857
609
|
|
858
610
|
<div class="method-description">
|
859
|
-
|
860
611
|
<p>Set raw column width value</p>
|
861
|
-
|
862
|
-
|
863
612
|
|
864
|
-
|
865
613
|
<div class="method-source-code" id="change_column_width_raw-source">
|
866
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
867
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width</span>)
|
614
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 374</span>
|
615
|
+
<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>)
|
868
616
|
<span class="ruby-identifier">validate_workbook</span>
|
869
617
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
870
618
|
<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>)
|
@@ -872,36 +620,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
872
620
|
<span class="ruby-identifier">range</span>.<span class="ruby-identifier">custom_width</span> = <span class="ruby-keyword">true</span>
|
873
621
|
<span class="ruby-keyword">end</span></pre>
|
874
622
|
</div>
|
875
|
-
|
876
623
|
</div>
|
877
624
|
|
878
|
-
|
879
625
|
|
880
|
-
|
881
626
|
</div>
|
882
627
|
|
883
|
-
|
884
628
|
<div id="method-i-change_row_alignment" class="method-detail ">
|
885
|
-
|
886
629
|
<div class="method-heading">
|
887
630
|
<span class="method-name">change_row_alignment</span><span
|
888
|
-
class="method-args">(row, &block)</span>
|
889
|
-
|
631
|
+
class="method-args">(row, &block)</span>
|
890
632
|
<span class="method-click-advice">click to toggle source</span>
|
891
|
-
|
892
633
|
</div>
|
893
|
-
|
894
634
|
|
895
635
|
<div class="method-description">
|
896
636
|
|
897
|
-
|
898
|
-
|
899
|
-
|
900
637
|
|
901
|
-
|
902
638
|
<div class="method-source-code" id="change_row_alignment-source">
|
903
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
904
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
639
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 662</span>
|
640
|
+
<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>)
|
905
641
|
<span class="ruby-identifier">validate_workbook</span>
|
906
642
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
907
643
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
@@ -914,72 +650,48 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
914
650
|
}
|
915
651
|
<span class="ruby-keyword">end</span></pre>
|
916
652
|
</div>
|
917
|
-
|
918
653
|
</div>
|
919
654
|
|
920
|
-
|
921
655
|
|
922
|
-
|
923
656
|
</div>
|
924
657
|
|
925
|
-
|
926
658
|
<div id="method-i-change_row_bold" class="method-detail ">
|
927
|
-
|
928
659
|
<div class="method-heading">
|
929
660
|
<span class="method-name">change_row_bold</span><span
|
930
661
|
class="method-args">(row = 0, bolded = false)</span>
|
931
|
-
|
932
662
|
<span class="method-click-advice">click to toggle source</span>
|
933
|
-
|
934
663
|
</div>
|
935
|
-
|
936
664
|
|
937
665
|
<div class="method-description">
|
938
666
|
|
939
|
-
|
940
|
-
|
941
|
-
|
942
667
|
|
943
|
-
|
944
668
|
<div class="method-source-code" id="change_row_bold-source">
|
945
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
946
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
669
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 531</span>
|
670
|
+
<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>)
|
947
671
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
948
672
|
<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>
|
949
673
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
|
950
674
|
<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>)
|
951
675
|
<span class="ruby-keyword">end</span></pre>
|
952
676
|
</div>
|
953
|
-
|
954
677
|
</div>
|
955
678
|
|
956
|
-
|
957
679
|
|
958
|
-
|
959
680
|
</div>
|
960
681
|
|
961
|
-
|
962
682
|
<div id="method-i-change_row_border" class="method-detail ">
|
963
|
-
|
964
683
|
<div class="method-heading">
|
965
684
|
<span class="method-name">change_row_border</span><span
|
966
685
|
class="method-args">(row, direction, weight)</span>
|
967
|
-
|
968
686
|
<span class="method-click-advice">click to toggle source</span>
|
969
|
-
|
970
687
|
</div>
|
971
|
-
|
972
688
|
|
973
689
|
<div class="method-description">
|
974
690
|
|
975
|
-
|
976
|
-
|
977
|
-
|
978
691
|
|
979
|
-
|
980
692
|
<div class="method-source-code" id="change_row_border-source">
|
981
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
982
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">change_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
693
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 457</span>
|
694
|
+
<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>)
|
983
695
|
<span class="ruby-identifier">validate_workbook</span>
|
984
696
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
985
697
|
|
@@ -990,36 +702,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
990
702
|
}
|
991
703
|
<span class="ruby-keyword">end</span></pre>
|
992
704
|
</div>
|
993
|
-
|
994
705
|
</div>
|
995
706
|
|
996
|
-
|
997
707
|
|
998
|
-
|
999
708
|
</div>
|
1000
709
|
|
1001
|
-
|
1002
710
|
<div id="method-i-change_row_border_color" class="method-detail ">
|
1003
|
-
|
1004
711
|
<div class="method-heading">
|
1005
712
|
<span class="method-name">change_row_border_color</span><span
|
1006
|
-
class="method-args">(row, direction, color =
|
1007
|
-
|
713
|
+
class="method-args">(row, direction, color = '000000')</span>
|
1008
714
|
<span class="method-click-advice">click to toggle source</span>
|
1009
|
-
|
1010
715
|
</div>
|
1011
|
-
|
1012
716
|
|
1013
717
|
<div class="method-description">
|
1014
718
|
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
719
|
|
1019
|
-
|
1020
720
|
<div class="method-source-code" id="change_row_border_color-source">
|
1021
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1022
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
721
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 468</span>
|
722
|
+
<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>)
|
1023
723
|
<span class="ruby-identifier">validate_workbook</span>
|
1024
724
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1025
725
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)
|
@@ -1031,36 +731,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
1031
731
|
}
|
1032
732
|
<span class="ruby-keyword">end</span></pre>
|
1033
733
|
</div>
|
1034
|
-
|
1035
734
|
</div>
|
1036
735
|
|
1037
|
-
|
1038
736
|
|
1039
|
-
|
1040
737
|
</div>
|
1041
738
|
|
1042
|
-
|
1043
739
|
<div id="method-i-change_row_fill" class="method-detail ">
|
1044
|
-
|
1045
740
|
<div class="method-heading">
|
1046
741
|
<span class="method-name">change_row_fill</span><span
|
1047
|
-
class="method-args">(row_index = 0, rgb =
|
1048
|
-
|
742
|
+
class="method-args">(row_index = 0, rgb = 'ffffff')</span>
|
1049
743
|
<span class="method-click-advice">click to toggle source</span>
|
1050
|
-
|
1051
744
|
</div>
|
1052
|
-
|
1053
745
|
|
1054
746
|
<div class="method-description">
|
1055
747
|
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
748
|
|
1060
|
-
|
1061
749
|
<div class="method-source-code" id="change_row_fill-source">
|
1062
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1063
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
750
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 480</span>
|
751
|
+
<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>)
|
1064
752
|
<span class="ruby-identifier">validate_workbook</span>
|
1065
753
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
1066
754
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">rgb</span>)
|
@@ -1069,40 +757,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
1069
757
|
<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> }
|
1070
758
|
<span class="ruby-keyword">end</span></pre>
|
1071
759
|
</div>
|
1072
|
-
|
1073
760
|
</div>
|
1074
761
|
|
1075
|
-
|
1076
762
|
|
1077
|
-
|
1078
763
|
</div>
|
1079
764
|
|
1080
|
-
|
1081
765
|
<div id="method-i-change_row_font" class="method-detail ">
|
1082
|
-
|
1083
766
|
<div class="method-heading">
|
1084
767
|
<span class="method-name">change_row_font</span><span
|
1085
768
|
class="method-args">(row_index, change_type, arg, font)</span>
|
1086
|
-
|
1087
769
|
<span class="method-click-advice">click to toggle source</span>
|
1088
|
-
|
1089
770
|
</div>
|
1090
|
-
|
1091
771
|
|
1092
772
|
<div class="method-description">
|
1093
|
-
|
1094
|
-
<p>Helper method to update the row styles array change_type - <a
|
1095
|
-
href="WorksheetConvenienceMethods.html#NAME">NAME</a> or <a
|
1096
|
-
href="WorksheetConvenienceMethods.html#SIZE">SIZE</a> or <a
|
1097
|
-
href="WorksheetConvenienceMethods.html#COLOR">COLOR</a> etc main method to
|
1098
|
-
change font, called from each separate font mutator method</p>
|
1099
|
-
|
1100
|
-
|
773
|
+
<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>
|
1101
774
|
|
1102
|
-
|
1103
775
|
<div class="method-source-code" id="change_row_font-source">
|
1104
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1105
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
776
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 492</span>
|
777
|
+
<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>)
|
1106
778
|
<span class="ruby-identifier">validate_workbook</span>
|
1107
779
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
1108
780
|
|
@@ -1112,36 +784,24 @@ change font, called from each separate font mutator method</p>
|
|
1112
784
|
<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> }
|
1113
785
|
<span class="ruby-keyword">end</span></pre>
|
1114
786
|
</div>
|
1115
|
-
|
1116
787
|
</div>
|
1117
788
|
|
1118
|
-
|
1119
789
|
|
1120
|
-
|
1121
790
|
</div>
|
1122
791
|
|
1123
|
-
|
1124
792
|
<div id="method-i-change_row_font_color" class="method-detail ">
|
1125
|
-
|
1126
793
|
<div class="method-heading">
|
1127
794
|
<span class="method-name">change_row_font_color</span><span
|
1128
|
-
class="method-args">(row = 0, font_color =
|
1129
|
-
|
795
|
+
class="method-args">(row = 0, font_color = '000000')</span>
|
1130
796
|
<span class="method-click-advice">click to toggle source</span>
|
1131
|
-
|
1132
797
|
</div>
|
1133
|
-
|
1134
798
|
|
1135
799
|
<div class="method-description">
|
1136
800
|
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
801
|
|
1141
|
-
|
1142
802
|
<div class="method-source-code" id="change_row_font_color-source">
|
1143
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1144
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
803
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 516</span>
|
804
|
+
<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>)
|
1145
805
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1146
806
|
<span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
|
1147
807
|
<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>
|
@@ -1149,108 +809,72 @@ change font, called from each separate font mutator method</p>
|
|
1149
809
|
<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>)
|
1150
810
|
<span class="ruby-keyword">end</span></pre>
|
1151
811
|
</div>
|
1152
|
-
|
1153
812
|
</div>
|
1154
813
|
|
1155
|
-
|
1156
814
|
|
1157
|
-
|
1158
815
|
</div>
|
1159
816
|
|
1160
|
-
|
1161
817
|
<div id="method-i-change_row_font_name" class="method-detail ">
|
1162
|
-
|
1163
818
|
<div class="method-heading">
|
1164
819
|
<span class="method-name">change_row_font_name</span><span
|
1165
|
-
class="method-args">(row = 0, font_name =
|
1166
|
-
|
820
|
+
class="method-args">(row = 0, font_name = 'Verdana')</span>
|
1167
821
|
<span class="method-click-advice">click to toggle source</span>
|
1168
|
-
|
1169
822
|
</div>
|
1170
|
-
|
1171
823
|
|
1172
824
|
<div class="method-description">
|
1173
825
|
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
826
|
|
1178
|
-
|
1179
827
|
<div class="method-source-code" id="change_row_font_name-source">
|
1180
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1181
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
828
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 502</span>
|
829
|
+
<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>)
|
1182
830
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1183
831
|
<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>
|
1184
832
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
|
1185
833
|
<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>)
|
1186
834
|
<span class="ruby-keyword">end</span></pre>
|
1187
835
|
</div>
|
1188
|
-
|
1189
836
|
</div>
|
1190
837
|
|
1191
|
-
|
1192
838
|
|
1193
|
-
|
1194
839
|
</div>
|
1195
840
|
|
1196
|
-
|
1197
841
|
<div id="method-i-change_row_font_size" class="method-detail ">
|
1198
|
-
|
1199
842
|
<div class="method-heading">
|
1200
843
|
<span class="method-name">change_row_font_size</span><span
|
1201
844
|
class="method-args">(row = 0, font_size=10)</span>
|
1202
|
-
|
1203
845
|
<span class="method-click-advice">click to toggle source</span>
|
1204
|
-
|
1205
846
|
</div>
|
1206
|
-
|
1207
847
|
|
1208
848
|
<div class="method-description">
|
1209
849
|
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
850
|
|
1214
|
-
|
1215
851
|
<div class="method-source-code" id="change_row_font_size-source">
|
1216
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1217
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
852
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 509</span>
|
853
|
+
<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>)
|
1218
854
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1219
855
|
<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>
|
1220
856
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
|
1221
857
|
<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>)
|
1222
858
|
<span class="ruby-keyword">end</span></pre>
|
1223
859
|
</div>
|
1224
|
-
|
1225
860
|
</div>
|
1226
861
|
|
1227
|
-
|
1228
862
|
|
1229
|
-
|
1230
863
|
</div>
|
1231
864
|
|
1232
|
-
|
1233
865
|
<div id="method-i-change_row_height" class="method-detail ">
|
1234
|
-
|
1235
866
|
<div class="method-heading">
|
1236
867
|
<span class="method-name">change_row_height</span><span
|
1237
868
|
class="method-args">(row = 0, height = 10)</span>
|
1238
|
-
|
1239
869
|
<span class="method-click-advice">click to toggle source</span>
|
1240
|
-
|
1241
870
|
</div>
|
1242
|
-
|
1243
871
|
|
1244
872
|
<div class="method-description">
|
1245
873
|
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
874
|
|
1250
|
-
|
1251
875
|
<div class="method-source-code" id="change_row_height-source">
|
1252
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1253
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
876
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 552</span>
|
877
|
+
<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>)
|
1254
878
|
<span class="ruby-identifier">validate_workbook</span>
|
1255
879
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1256
880
|
|
@@ -1259,251 +883,165 @@ change font, called from each separate font mutator method</p>
|
|
1259
883
|
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">custom_height</span> = <span class="ruby-keyword">true</span>
|
1260
884
|
<span class="ruby-keyword">end</span></pre>
|
1261
885
|
</div>
|
1262
|
-
|
1263
886
|
</div>
|
1264
887
|
|
1265
|
-
|
1266
888
|
|
1267
|
-
|
1268
889
|
</div>
|
1269
890
|
|
1270
|
-
|
1271
891
|
<div id="method-i-change_row_horizontal_alignment" class="method-detail ">
|
1272
|
-
|
1273
892
|
<div class="method-heading">
|
1274
893
|
<span class="method-name">change_row_horizontal_alignment</span><span
|
1275
|
-
class="method-args">(row = 0, alignment =
|
1276
|
-
|
894
|
+
class="method-args">(row = 0, alignment = 'center')</span>
|
1277
895
|
<span class="method-click-advice">click to toggle source</span>
|
1278
|
-
|
1279
896
|
</div>
|
1280
|
-
|
1281
897
|
|
1282
898
|
<div class="method-description">
|
1283
899
|
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
900
|
|
1288
|
-
|
1289
901
|
<div class="method-source-code" id="change_row_horizontal_alignment-source">
|
1290
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1291
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
902
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 445</span>
|
903
|
+
<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>)
|
1292
904
|
<span class="ruby-identifier">validate_workbook</span>
|
1293
905
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
1294
906
|
<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> }
|
1295
907
|
<span class="ruby-keyword">end</span></pre>
|
1296
908
|
</div>
|
1297
|
-
|
1298
909
|
</div>
|
1299
910
|
|
1300
|
-
|
1301
911
|
|
1302
|
-
|
1303
912
|
</div>
|
1304
913
|
|
1305
|
-
|
1306
914
|
<div id="method-i-change_row_italics" class="method-detail ">
|
1307
|
-
|
1308
915
|
<div class="method-heading">
|
1309
916
|
<span class="method-name">change_row_italics</span><span
|
1310
917
|
class="method-args">(row = 0, italicized = false)</span>
|
1311
|
-
|
1312
918
|
<span class="method-click-advice">click to toggle source</span>
|
1313
|
-
|
1314
919
|
</div>
|
1315
|
-
|
1316
920
|
|
1317
921
|
<div class="method-description">
|
1318
922
|
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
923
|
|
1323
|
-
|
1324
924
|
<div class="method-source-code" id="change_row_italics-source">
|
1325
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1326
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
925
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 524</span>
|
926
|
+
<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>)
|
1327
927
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1328
928
|
<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>
|
1329
929
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
|
1330
930
|
<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>)
|
1331
931
|
<span class="ruby-keyword">end</span></pre>
|
1332
932
|
</div>
|
1333
|
-
|
1334
933
|
</div>
|
1335
934
|
|
1336
|
-
|
1337
935
|
|
1338
|
-
|
1339
936
|
</div>
|
1340
937
|
|
1341
|
-
|
1342
938
|
<div id="method-i-change_row_strikethrough" class="method-detail ">
|
1343
|
-
|
1344
939
|
<div class="method-heading">
|
1345
940
|
<span class="method-name">change_row_strikethrough</span><span
|
1346
941
|
class="method-args">(row = 0, struckthrough=false)</span>
|
1347
|
-
|
1348
942
|
<span class="method-click-advice">click to toggle source</span>
|
1349
|
-
|
1350
943
|
</div>
|
1351
|
-
|
1352
944
|
|
1353
945
|
<div class="method-description">
|
1354
946
|
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
947
|
|
1359
|
-
|
1360
948
|
<div class="method-source-code" id="change_row_strikethrough-source">
|
1361
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1362
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
949
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 545</span>
|
950
|
+
<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>)
|
1363
951
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1364
952
|
<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>
|
1365
953
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
|
1366
954
|
<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>)
|
1367
955
|
<span class="ruby-keyword">end</span></pre>
|
1368
956
|
</div>
|
1369
|
-
|
1370
957
|
</div>
|
1371
958
|
|
1372
|
-
|
1373
959
|
|
1374
|
-
|
1375
960
|
</div>
|
1376
961
|
|
1377
|
-
|
1378
962
|
<div id="method-i-change_row_underline" class="method-detail ">
|
1379
|
-
|
1380
963
|
<div class="method-heading">
|
1381
964
|
<span class="method-name">change_row_underline</span><span
|
1382
965
|
class="method-args">(row = 0, underlined=false)</span>
|
1383
|
-
|
1384
966
|
<span class="method-click-advice">click to toggle source</span>
|
1385
|
-
|
1386
967
|
</div>
|
1387
|
-
|
1388
968
|
|
1389
969
|
<div class="method-description">
|
1390
970
|
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
971
|
|
1395
|
-
|
1396
972
|
<div class="method-source-code" id="change_row_underline-source">
|
1397
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1398
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
973
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 538</span>
|
974
|
+
<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>)
|
1399
975
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
|
1400
976
|
<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>
|
1401
977
|
<span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
|
1402
978
|
<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>)
|
1403
979
|
<span class="ruby-keyword">end</span></pre>
|
1404
980
|
</div>
|
1405
|
-
|
1406
981
|
</div>
|
1407
982
|
|
1408
|
-
|
1409
983
|
|
1410
|
-
|
1411
984
|
</div>
|
1412
985
|
|
1413
|
-
|
1414
986
|
<div id="method-i-change_row_vertical_alignment" class="method-detail ">
|
1415
|
-
|
1416
987
|
<div class="method-heading">
|
1417
988
|
<span class="method-name">change_row_vertical_alignment</span><span
|
1418
|
-
class="method-args">(row = 0, alignment =
|
1419
|
-
|
989
|
+
class="method-args">(row = 0, alignment = 'center')</span>
|
1420
990
|
<span class="method-click-advice">click to toggle source</span>
|
1421
|
-
|
1422
991
|
</div>
|
1423
|
-
|
1424
992
|
|
1425
993
|
<div class="method-description">
|
1426
994
|
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
995
|
|
1431
|
-
|
1432
996
|
<div class="method-source-code" id="change_row_vertical_alignment-source">
|
1433
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1434
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
997
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 451</span>
|
998
|
+
<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>)
|
1435
999
|
<span class="ruby-identifier">validate_workbook</span>
|
1436
1000
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
1437
1001
|
<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> }
|
1438
1002
|
<span class="ruby-keyword">end</span></pre>
|
1439
1003
|
</div>
|
1440
|
-
|
1441
1004
|
</div>
|
1442
1005
|
|
1443
|
-
|
1444
1006
|
|
1445
|
-
|
1446
1007
|
</div>
|
1447
1008
|
|
1448
|
-
|
1449
1009
|
<div id="method-i-column_font" class="method-detail ">
|
1450
|
-
|
1451
1010
|
<div class="method-heading">
|
1452
1011
|
<span class="method-name">column_font</span><span
|
1453
1012
|
class="method-args">(col)</span>
|
1454
|
-
|
1455
1013
|
<span class="method-click-advice">click to toggle source</span>
|
1456
|
-
|
1457
1014
|
</div>
|
1458
|
-
|
1459
1015
|
|
1460
1016
|
<div class="method-description">
|
1461
1017
|
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
1018
|
|
1466
|
-
|
1467
1019
|
<div class="method-source-code" id="column_font-source">
|
1468
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1469
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
1020
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 432</span>
|
1021
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">column_font</span>(<span class="ruby-identifier">col</span>)
|
1470
1022
|
<span class="ruby-identifier">validate_workbook</span>
|
1471
1023
|
|
1472
1024
|
<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>]
|
1473
1025
|
<span class="ruby-keyword">end</span></pre>
|
1474
1026
|
</div>
|
1475
|
-
|
1476
1027
|
</div>
|
1477
1028
|
|
1478
|
-
|
1479
1029
|
|
1480
|
-
|
1481
1030
|
</div>
|
1482
1031
|
|
1483
|
-
|
1484
1032
|
<div id="method-i-delete_cell" class="method-detail ">
|
1485
|
-
|
1486
1033
|
<div class="method-heading">
|
1487
1034
|
<span class="method-name">delete_cell</span><span
|
1488
1035
|
class="method-args">(row_index = 0, column_index=0, shift=nil)</span>
|
1489
|
-
|
1490
1036
|
<span class="method-click-advice">click to toggle source</span>
|
1491
|
-
|
1492
1037
|
</div>
|
1493
|
-
|
1494
1038
|
|
1495
1039
|
<div class="method-description">
|
1496
|
-
|
1497
|
-
<p>by default, only sets cell to nil if :left is specified, method will shift
|
1498
|
-
row contents to the right of the deleted cell to the left if :up is
|
1499
|
-
specified, method will shift column contents below the deleted cell upward</p>
|
1500
|
-
|
1501
|
-
|
1040
|
+
<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>
|
1502
1041
|
|
1503
|
-
|
1504
1042
|
<div class="method-source-code" id="delete_cell-source">
|
1505
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1506
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
1043
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 40</span>
|
1044
|
+
<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>)
|
1507
1045
|
<span class="ruby-identifier">validate_workbook</span>
|
1508
1046
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
|
1509
1047
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
@@ -1518,8 +1056,14 @@ specified, method will shift column contents below the deleted cell upward</p>
|
|
1518
1056
|
<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>
|
1519
1057
|
<span class="ruby-keyword">when</span> <span class="ruby-value">:up</span> <span class="ruby-keyword">then</span>
|
1520
1058
|
(<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>
|
1521
|
-
<span class="ruby-identifier">
|
1522
|
-
<span class="ruby-
|
1059
|
+
<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>]
|
1060
|
+
<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>
|
1061
|
+
<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>
|
1062
|
+
<span class="ruby-keyword">else</span>
|
1063
|
+
<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>)
|
1064
|
+
<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>]
|
1065
|
+
<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>)
|
1066
|
+
<span class="ruby-keyword">end</span>
|
1523
1067
|
}
|
1524
1068
|
<span class="ruby-keyword">else</span>
|
1525
1069
|
<span class="ruby-identifier">raise</span> <span class="ruby-string">'invalid shift option'</span>
|
@@ -1528,82 +1072,77 @@ specified, method will shift column contents below the deleted cell upward</p>
|
|
1528
1072
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">old_cell</span>
|
1529
1073
|
<span class="ruby-keyword">end</span></pre>
|
1530
1074
|
</div>
|
1531
|
-
|
1532
1075
|
</div>
|
1533
1076
|
|
1534
|
-
|
1535
1077
|
|
1536
|
-
|
1537
1078
|
</div>
|
1538
1079
|
|
1539
|
-
|
1540
1080
|
<div id="method-i-delete_column" class="method-detail ">
|
1541
|
-
|
1542
1081
|
<div class="method-heading">
|
1543
1082
|
<span class="method-name">delete_column</span><span
|
1544
1083
|
class="method-args">(column_index = 0)</span>
|
1545
|
-
|
1546
1084
|
<span class="method-click-advice">click to toggle source</span>
|
1547
|
-
|
1548
1085
|
</div>
|
1549
|
-
|
1550
1086
|
|
1551
1087
|
<div class="method-description">
|
1552
1088
|
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
1089
|
|
1557
|
-
|
1558
1090
|
<div class="method-source-code" id="delete_column-source">
|
1559
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1560
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
1091
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 204</span>
|
1092
|
+
<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>)
|
1561
1093
|
<span class="ruby-identifier">validate_workbook</span>
|
1562
1094
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
1563
1095
|
|
1564
1096
|
<span class="ruby-comment"># Delete column</span>
|
1565
|
-
<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>) }
|
1097
|
+
<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-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>) }
|
1566
1098
|
|
1567
1099
|
<span class="ruby-comment"># Update column numbers for cells to the right of the deleted column</span>
|
1568
1100
|
<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>
|
1101
|
+
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
|
1569
1102
|
<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>
|
1570
1103
|
<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>)
|
1571
1104
|
}
|
1572
1105
|
}
|
1573
1106
|
|
1574
1107
|
<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>) }
|
1108
|
+
|
1109
|
+
<span class="ruby-comment"># Update row number of merged cells</span>
|
1110
|
+
<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>
|
1111
|
+
|
1112
|
+
<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">col_range</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">column_index</span><span class="ruby-operator">..</span><span class="ruby-identifier">column_index</span>) }
|
1113
|
+
<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>
|
1114
|
+
<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">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">column_index</span>
|
1115
|
+
|
1116
|
+
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">column_index</span>
|
1117
|
+
<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>(
|
1118
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span>,
|
1119
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span>,
|
1120
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</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>),
|
1121
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
|
1122
|
+
)
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
<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> }
|
1575
1126
|
<span class="ruby-keyword">end</span></pre>
|
1576
1127
|
</div>
|
1577
|
-
|
1578
1128
|
</div>
|
1579
1129
|
|
1580
|
-
|
1581
1130
|
|
1582
|
-
|
1583
1131
|
</div>
|
1584
1132
|
|
1585
|
-
|
1586
1133
|
<div id="method-i-delete_row" class="method-detail ">
|
1587
|
-
|
1588
1134
|
<div class="method-heading">
|
1589
1135
|
<span class="method-name">delete_row</span><span
|
1590
1136
|
class="method-args">(row_index=0)</span>
|
1591
|
-
|
1592
1137
|
<span class="method-click-advice">click to toggle source</span>
|
1593
|
-
|
1594
1138
|
</div>
|
1595
|
-
|
1596
1139
|
|
1597
1140
|
<div class="method-description">
|
1598
1141
|
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
1142
|
|
1603
|
-
|
1604
1143
|
<div class="method-source-code" id="delete_row-source">
|
1605
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1606
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">delete_row</span>(<span class="ruby-identifier">row_index</span>=<span class="ruby-value">0</span>)
|
1144
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 126</span>
|
1145
|
+
<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>)
|
1607
1146
|
<span class="ruby-identifier">validate_workbook</span>
|
1608
1147
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
|
1609
1148
|
|
@@ -1615,144 +1154,113 @@ specified, method will shift column contents below the deleted cell upward</p>
|
|
1615
1154
|
<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> }
|
1616
1155
|
}
|
1617
1156
|
|
1157
|
+
<span class="ruby-comment"># Update row number of merged cells</span>
|
1158
|
+
<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>
|
1159
|
+
<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">row_range</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">row_index</span><span class="ruby-operator">..</span><span class="ruby-identifier">row_index</span>) }
|
1160
|
+
<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>
|
1161
|
+
<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">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">row_index</span>
|
1162
|
+
|
1163
|
+
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator"><=</span> <span class="ruby-identifier">row_index</span>
|
1164
|
+
<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>(
|
1165
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</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>),
|
1166
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
|
1167
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span>,
|
1168
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span>,
|
1169
|
+
)
|
1170
|
+
}
|
1171
|
+
<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> }
|
1172
|
+
<span class="ruby-keyword">end</span>
|
1173
|
+
|
1618
1174
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">deleted</span>
|
1619
1175
|
<span class="ruby-keyword">end</span></pre>
|
1620
1176
|
</div>
|
1621
|
-
|
1622
1177
|
</div>
|
1623
1178
|
|
1624
|
-
|
1625
1179
|
|
1626
|
-
|
1627
1180
|
</div>
|
1628
1181
|
|
1629
|
-
|
1630
1182
|
<div id="method-i-get_col_style" class="method-detail ">
|
1631
|
-
|
1632
1183
|
<div class="method-heading">
|
1633
1184
|
<span class="method-name">get_col_style</span><span
|
1634
1185
|
class="method-args">(column_index)</span>
|
1635
|
-
|
1636
1186
|
<span class="method-click-advice">click to toggle source</span>
|
1637
|
-
|
1638
1187
|
</div>
|
1639
|
-
|
1640
1188
|
|
1641
1189
|
<div class="method-description">
|
1642
|
-
|
1643
1190
|
<p>Helper method to get the style index for a column</p>
|
1644
|
-
|
1645
|
-
|
1646
1191
|
|
1647
|
-
|
1648
1192
|
<div class="method-source-code" id="get_col_style-source">
|
1649
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1650
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
|
1193
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 389</span>
|
1194
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
|
1651
1195
|
<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>)
|
1652
1196
|
(<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>
|
1653
1197
|
<span class="ruby-keyword">end</span></pre>
|
1654
1198
|
</div>
|
1655
|
-
|
1656
1199
|
</div>
|
1657
1200
|
|
1658
|
-
|
1659
1201
|
|
1660
|
-
|
1661
1202
|
</div>
|
1662
1203
|
|
1663
|
-
|
1664
1204
|
<div id="method-i-get_cols_style_index" class="method-detail ">
|
1665
|
-
|
1666
1205
|
<div class="method-heading">
|
1667
1206
|
<span class="method-name">get_cols_style_index</span><span
|
1668
1207
|
class="method-args">(column_index)</span>
|
1669
|
-
|
1670
1208
|
<span class="method-click-advice">click to toggle source</span>
|
1671
|
-
|
1672
1209
|
</div>
|
1673
|
-
|
1674
1210
|
|
1675
1211
|
<div class="method-description">
|
1676
1212
|
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
1213
|
|
1681
|
-
|
1682
1214
|
<div class="method-source-code" id="get_cols_style_index-source">
|
1683
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1684
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
|
1215
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 315</span>
|
1216
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
|
1685
1217
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
1686
1218
|
<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>)
|
1687
1219
|
(<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>
|
1688
1220
|
<span class="ruby-keyword">end</span></pre>
|
1689
1221
|
</div>
|
1690
|
-
|
1691
1222
|
</div>
|
1692
1223
|
|
1693
|
-
|
1694
1224
|
|
1695
|
-
|
1696
1225
|
</div>
|
1697
1226
|
|
1698
|
-
|
1699
1227
|
<div id="method-i-get_column_alignment" class="method-detail ">
|
1700
|
-
|
1701
1228
|
<div class="method-heading">
|
1702
1229
|
<span class="method-name">get_column_alignment</span><span
|
1703
1230
|
class="method-args">(col, type)</span>
|
1704
|
-
|
1705
1231
|
<span class="method-click-advice">click to toggle source</span>
|
1706
|
-
|
1707
1232
|
</div>
|
1708
|
-
|
1709
1233
|
|
1710
1234
|
<div class="method-description">
|
1711
1235
|
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
1236
|
|
1716
|
-
|
1717
1237
|
<div class="method-source-code" id="get_column_alignment-source">
|
1718
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1719
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">type</span>)
|
1238
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 438</span>
|
1239
|
+
<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>)
|
1720
1240
|
<span class="ruby-identifier">validate_workbook</span>
|
1721
1241
|
|
1722
1242
|
<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>)]
|
1723
1243
|
<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>)
|
1724
1244
|
<span class="ruby-keyword">end</span></pre>
|
1725
1245
|
</div>
|
1726
|
-
|
1727
1246
|
</div>
|
1728
1247
|
|
1729
|
-
|
1730
1248
|
|
1731
|
-
|
1732
1249
|
</div>
|
1733
1250
|
|
1734
|
-
|
1735
1251
|
<div id="method-i-get_column_border" class="method-detail ">
|
1736
|
-
|
1737
1252
|
<div class="method-heading">
|
1738
1253
|
<span class="method-name">get_column_border</span><span
|
1739
1254
|
class="method-args">(col, border_direction)</span>
|
1740
|
-
|
1741
1255
|
<span class="method-click-advice">click to toggle source</span>
|
1742
|
-
|
1743
1256
|
</div>
|
1744
|
-
|
1745
1257
|
|
1746
1258
|
<div class="method-description">
|
1747
1259
|
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
1260
|
|
1752
|
-
|
1753
1261
|
<div class="method-source-code" id="get_column_border-source">
|
1754
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1755
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
|
1262
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 416</span>
|
1263
|
+
<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>)
|
1756
1264
|
<span class="ruby-identifier">validate_workbook</span>
|
1757
1265
|
|
1758
1266
|
<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>)]
|
@@ -1760,36 +1268,24 @@ specified, method will shift column contents below the deleted cell upward</p>
|
|
1760
1268
|
<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>)
|
1761
1269
|
<span class="ruby-keyword">end</span></pre>
|
1762
1270
|
</div>
|
1763
|
-
|
1764
1271
|
</div>
|
1765
1272
|
|
1766
|
-
|
1767
1273
|
|
1768
|
-
|
1769
1274
|
</div>
|
1770
1275
|
|
1771
|
-
|
1772
1276
|
<div id="method-i-get_column_border_color" class="method-detail ">
|
1773
|
-
|
1774
1277
|
<div class="method-heading">
|
1775
1278
|
<span class="method-name">get_column_border_color</span><span
|
1776
1279
|
class="method-args">(col, border_direction)</span>
|
1777
|
-
|
1778
1280
|
<span class="method-click-advice">click to toggle source</span>
|
1779
|
-
|
1780
1281
|
</div>
|
1781
|
-
|
1782
1282
|
|
1783
1283
|
<div class="method-description">
|
1784
1284
|
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
1285
|
|
1789
|
-
|
1790
1286
|
<div class="method-source-code" id="get_column_border_color-source">
|
1791
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1792
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_border_color</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
|
1287
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 424</span>
|
1288
|
+
<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>)
|
1793
1289
|
<span class="ruby-identifier">validate_workbook</span>
|
1794
1290
|
|
1795
1291
|
<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>)]
|
@@ -1797,210 +1293,137 @@ specified, method will shift column contents below the deleted cell upward</p>
|
|
1797
1293
|
<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>)
|
1798
1294
|
<span class="ruby-keyword">end</span></pre>
|
1799
1295
|
</div>
|
1800
|
-
|
1801
1296
|
</div>
|
1802
1297
|
|
1803
|
-
|
1804
1298
|
|
1805
|
-
|
1806
1299
|
</div>
|
1807
1300
|
|
1808
|
-
|
1809
1301
|
<div id="method-i-get_column_fill" class="method-detail ">
|
1810
|
-
|
1811
1302
|
<div class="method-heading">
|
1812
1303
|
<span class="method-name">get_column_fill</span><span
|
1813
1304
|
class="method-args">(col=0)</span>
|
1814
|
-
|
1815
1305
|
<span class="method-click-advice">click to toggle source</span>
|
1816
|
-
|
1817
1306
|
</div>
|
1818
|
-
|
1819
1307
|
|
1820
1308
|
<div class="method-description">
|
1821
1309
|
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
1310
|
|
1826
|
-
|
1827
1311
|
<div class="method-source-code" id="get_column_fill-source">
|
1828
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1829
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_fill</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
|
1312
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 394</span>
|
1313
|
+
<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>)
|
1830
1314
|
<span class="ruby-identifier">validate_workbook</span>
|
1831
1315
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">col</span>)
|
1832
1316
|
|
1833
1317
|
<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>))
|
1834
1318
|
<span class="ruby-keyword">end</span></pre>
|
1835
1319
|
</div>
|
1836
|
-
|
1837
1320
|
</div>
|
1838
1321
|
|
1839
|
-
|
1840
1322
|
|
1841
|
-
|
1842
1323
|
</div>
|
1843
1324
|
|
1844
|
-
|
1845
1325
|
<div id="method-i-get_column_font_color" class="method-detail ">
|
1846
|
-
|
1847
1326
|
<div class="method-heading">
|
1848
1327
|
<span class="method-name">get_column_font_color</span><span
|
1849
1328
|
class="method-args">(col = 0)</span>
|
1850
|
-
|
1851
1329
|
<span class="method-click-advice">click to toggle source</span>
|
1852
|
-
|
1853
1330
|
</div>
|
1854
|
-
|
1855
1331
|
|
1856
1332
|
<div class="method-description">
|
1857
1333
|
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
1334
|
|
1862
|
-
|
1863
1335
|
<div class="method-source-code" id="get_column_font_color-source">
|
1864
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1865
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_color</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1336
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 331</span>
|
1337
|
+
<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>)
|
1866
1338
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
1867
1339
|
<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>)
|
1868
1340
|
<span class="ruby-keyword">end</span></pre>
|
1869
1341
|
</div>
|
1870
|
-
|
1871
1342
|
</div>
|
1872
1343
|
|
1873
|
-
|
1874
1344
|
|
1875
|
-
|
1876
1345
|
</div>
|
1877
1346
|
|
1878
|
-
|
1879
1347
|
<div id="method-i-get_column_font_name" class="method-detail ">
|
1880
|
-
|
1881
1348
|
<div class="method-heading">
|
1882
1349
|
<span class="method-name">get_column_font_name</span><span
|
1883
1350
|
class="method-args">(col = 0)</span>
|
1884
|
-
|
1885
1351
|
<span class="method-click-advice">click to toggle source</span>
|
1886
|
-
|
1887
1352
|
</div>
|
1888
|
-
|
1889
1353
|
|
1890
1354
|
<div class="method-description">
|
1891
1355
|
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
1356
|
|
1896
|
-
|
1897
1357
|
<div class="method-source-code" id="get_column_font_name-source">
|
1898
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1899
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_name</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1358
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 321</span>
|
1359
|
+
<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>)
|
1900
1360
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
1901
1361
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
|
1902
1362
|
<span class="ruby-keyword">end</span></pre>
|
1903
1363
|
</div>
|
1904
|
-
|
1905
1364
|
</div>
|
1906
1365
|
|
1907
|
-
|
1908
1366
|
|
1909
|
-
|
1910
1367
|
</div>
|
1911
1368
|
|
1912
|
-
|
1913
1369
|
<div id="method-i-get_column_font_size" class="method-detail ">
|
1914
|
-
|
1915
1370
|
<div class="method-heading">
|
1916
1371
|
<span class="method-name">get_column_font_size</span><span
|
1917
1372
|
class="method-args">(col = 0)</span>
|
1918
|
-
|
1919
1373
|
<span class="method-click-advice">click to toggle source</span>
|
1920
|
-
|
1921
1374
|
</div>
|
1922
|
-
|
1923
1375
|
|
1924
1376
|
<div class="method-description">
|
1925
1377
|
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
1378
|
|
1930
|
-
|
1931
1379
|
<div class="method-source-code" id="get_column_font_size-source">
|
1932
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1933
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_font_size</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1380
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 326</span>
|
1381
|
+
<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>)
|
1934
1382
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
1935
1383
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
|
1936
1384
|
<span class="ruby-keyword">end</span></pre>
|
1937
1385
|
</div>
|
1938
|
-
|
1939
1386
|
</div>
|
1940
1387
|
|
1941
|
-
|
1942
1388
|
|
1943
|
-
|
1944
1389
|
</div>
|
1945
1390
|
|
1946
|
-
|
1947
1391
|
<div id="method-i-get_column_width" class="method-detail ">
|
1948
|
-
|
1949
1392
|
<div class="method-heading">
|
1950
1393
|
<span class="method-name">get_column_width</span><span
|
1951
1394
|
class="method-args">(column_index = 0)</span>
|
1952
|
-
|
1953
1395
|
<span class="method-click-advice">click to toggle source</span>
|
1954
|
-
|
1955
1396
|
</div>
|
1956
|
-
|
1957
1397
|
|
1958
1398
|
<div class="method-description">
|
1959
|
-
|
1960
|
-
<p>Get column width measured in number of digits, as per <a
|
1961
|
-
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>
|
1962
|
-
|
1963
|
-
|
1399
|
+
<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>
|
1964
1400
|
|
1965
|
-
|
1966
1401
|
<div class="method-source-code" id="get_column_width-source">
|
1967
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
1968
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_width</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
1402
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 367</span>
|
1403
|
+
<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>)
|
1969
1404
|
<span class="ruby-identifier">width</span> = <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>)
|
1970
1405
|
<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>
|
1971
1406
|
(<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>
|
1972
1407
|
<span class="ruby-keyword">end</span></pre>
|
1973
1408
|
</div>
|
1974
|
-
|
1975
1409
|
</div>
|
1976
1410
|
|
1977
|
-
|
1978
1411
|
|
1979
|
-
|
1980
1412
|
</div>
|
1981
1413
|
|
1982
|
-
|
1983
1414
|
<div id="method-i-get_column_width_raw" class="method-detail ">
|
1984
|
-
|
1985
1415
|
<div class="method-heading">
|
1986
1416
|
<span class="method-name">get_column_width_raw</span><span
|
1987
1417
|
class="method-args">(column_index = 0)</span>
|
1988
|
-
|
1989
1418
|
<span class="method-click-advice">click to toggle source</span>
|
1990
|
-
|
1991
1419
|
</div>
|
1992
|
-
|
1993
1420
|
|
1994
1421
|
<div class="method-description">
|
1995
|
-
|
1996
1422
|
<p>Get raw column width value as stored in the file</p>
|
1997
|
-
|
1998
|
-
|
1999
1423
|
|
2000
|
-
|
2001
1424
|
<div class="method-source-code" id="get_column_width_raw-source">
|
2002
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2003
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
1425
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 357</span>
|
1426
|
+
<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>)
|
2004
1427
|
<span class="ruby-identifier">validate_workbook</span>
|
2005
1428
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
|
2006
1429
|
|
@@ -2008,36 +1431,24 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
2008
1431
|
<span class="ruby-identifier">range</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span>
|
2009
1432
|
<span class="ruby-keyword">end</span></pre>
|
2010
1433
|
</div>
|
2011
|
-
|
2012
1434
|
</div>
|
2013
1435
|
|
2014
|
-
|
2015
1436
|
|
2016
|
-
|
2017
1437
|
</div>
|
2018
1438
|
|
2019
|
-
|
2020
1439
|
<div id="method-i-get_row_alignment" class="method-detail ">
|
2021
|
-
|
2022
1440
|
<div class="method-heading">
|
2023
1441
|
<span class="method-name">get_row_alignment</span><span
|
2024
1442
|
class="method-args">(row, is_horizontal)</span>
|
2025
|
-
|
2026
1443
|
<span class="method-click-advice">click to toggle source</span>
|
2027
|
-
|
2028
1444
|
</div>
|
2029
|
-
|
2030
1445
|
|
2031
1446
|
<div class="method-description">
|
2032
1447
|
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
1448
|
|
2037
|
-
|
2038
1449
|
<div class="method-source-code" id="get_row_alignment-source">
|
2039
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2040
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">is_horizontal</span>)
|
1450
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 304</span>
|
1451
|
+
<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>)
|
2041
1452
|
<span class="ruby-identifier">validate_workbook</span>
|
2042
1453
|
|
2043
1454
|
<span class="ruby-identifier">xf_obj</span> = <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>)
|
@@ -2048,312 +1459,204 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
2048
1459
|
<span class="ruby-keyword">end</span>
|
2049
1460
|
<span class="ruby-keyword">end</span></pre>
|
2050
1461
|
</div>
|
2051
|
-
|
2052
1462
|
</div>
|
2053
1463
|
|
2054
|
-
|
2055
1464
|
|
2056
|
-
|
2057
1465
|
</div>
|
2058
1466
|
|
2059
|
-
|
2060
1467
|
<div id="method-i-get_row_border" class="method-detail ">
|
2061
|
-
|
2062
1468
|
<div class="method-heading">
|
2063
1469
|
<span class="method-name">get_row_border</span><span
|
2064
1470
|
class="method-args">(row, border_direction)</span>
|
2065
|
-
|
2066
1471
|
<span class="method-click-advice">click to toggle source</span>
|
2067
|
-
|
2068
1472
|
</div>
|
2069
|
-
|
2070
1473
|
|
2071
1474
|
<div class="method-description">
|
2072
1475
|
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
1476
|
|
2077
|
-
|
2078
1477
|
<div class="method-source-code" id="get_row_border-source">
|
2079
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2080
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
|
1478
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 286</span>
|
1479
|
+
<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>)
|
2081
1480
|
<span class="ruby-identifier">validate_workbook</span>
|
2082
1481
|
|
2083
1482
|
<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>]
|
2084
1483
|
<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>)
|
2085
1484
|
<span class="ruby-keyword">end</span></pre>
|
2086
1485
|
</div>
|
2087
|
-
|
2088
1486
|
</div>
|
2089
1487
|
|
2090
|
-
|
2091
1488
|
|
2092
|
-
|
2093
1489
|
</div>
|
2094
1490
|
|
2095
|
-
|
2096
1491
|
<div id="method-i-get_row_border_color" class="method-detail ">
|
2097
|
-
|
2098
1492
|
<div class="method-heading">
|
2099
1493
|
<span class="method-name">get_row_border_color</span><span
|
2100
1494
|
class="method-args">(row, border_direction)</span>
|
2101
|
-
|
2102
1495
|
<span class="method-click-advice">click to toggle source</span>
|
2103
|
-
|
2104
1496
|
</div>
|
2105
|
-
|
2106
1497
|
|
2107
1498
|
<div class="method-description">
|
2108
1499
|
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
1500
|
|
2113
|
-
|
2114
1501
|
<div class="method-source-code" id="get_row_border_color-source">
|
2115
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2116
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
|
1502
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 293</span>
|
1503
|
+
<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>)
|
2117
1504
|
<span class="ruby-identifier">validate_workbook</span>
|
2118
1505
|
|
2119
1506
|
<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>]
|
2120
1507
|
<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>)
|
2121
1508
|
<span class="ruby-keyword">end</span></pre>
|
2122
1509
|
</div>
|
2123
|
-
|
2124
1510
|
</div>
|
2125
1511
|
|
2126
|
-
|
2127
1512
|
|
2128
|
-
|
2129
1513
|
</div>
|
2130
1514
|
|
2131
|
-
|
2132
1515
|
<div id="method-i-get_row_fill" class="method-detail ">
|
2133
|
-
|
2134
1516
|
<div class="method-heading">
|
2135
1517
|
<span class="method-name">get_row_fill</span><span
|
2136
1518
|
class="method-args">(row = 0)</span>
|
2137
|
-
|
2138
1519
|
<span class="method-click-advice">click to toggle source</span>
|
2139
|
-
|
2140
1520
|
</div>
|
2141
|
-
|
2142
1521
|
|
2143
1522
|
<div class="method-description">
|
2144
1523
|
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2148
1524
|
|
2149
|
-
|
2150
1525
|
<div class="method-source-code" id="get_row_fill-source">
|
2151
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2152
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_fill</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1526
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 245</span>
|
1527
|
+
<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>)
|
2153
1528
|
(<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>
|
2154
1529
|
<span class="ruby-keyword">end</span></pre>
|
2155
1530
|
</div>
|
2156
|
-
|
2157
1531
|
</div>
|
2158
1532
|
|
2159
|
-
|
2160
1533
|
|
2161
|
-
|
2162
1534
|
</div>
|
2163
1535
|
|
2164
|
-
|
2165
1536
|
<div id="method-i-get_row_font_color" class="method-detail ">
|
2166
|
-
|
2167
1537
|
<div class="method-heading">
|
2168
1538
|
<span class="method-name">get_row_font_color</span><span
|
2169
1539
|
class="method-args">(row = 0)</span>
|
2170
|
-
|
2171
1540
|
<span class="method-click-advice">click to toggle source</span>
|
2172
|
-
|
2173
1541
|
</div>
|
2174
|
-
|
2175
1542
|
|
2176
1543
|
<div class="method-description">
|
2177
1544
|
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2181
1545
|
|
2182
|
-
|
2183
1546
|
<div class="method-source-code" id="get_row_font_color-source">
|
2184
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2185
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1547
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 257</span>
|
1548
|
+
<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>)
|
2186
1549
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
|
2187
1550
|
<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>
|
2188
1551
|
<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>)
|
2189
1552
|
<span class="ruby-keyword">end</span></pre>
|
2190
1553
|
</div>
|
2191
|
-
|
2192
1554
|
</div>
|
2193
1555
|
|
2194
|
-
|
2195
1556
|
|
2196
|
-
|
2197
1557
|
</div>
|
2198
1558
|
|
2199
|
-
|
2200
1559
|
<div id="method-i-get_row_font_name" class="method-detail ">
|
2201
|
-
|
2202
1560
|
<div class="method-heading">
|
2203
1561
|
<span class="method-name">get_row_font_name</span><span
|
2204
1562
|
class="method-args">(row = 0)</span>
|
2205
|
-
|
2206
1563
|
<span class="method-click-advice">click to toggle source</span>
|
2207
|
-
|
2208
1564
|
</div>
|
2209
|
-
|
2210
1565
|
|
2211
1566
|
<div class="method-description">
|
2212
1567
|
|
2213
|
-
|
2214
|
-
|
2215
|
-
|
2216
1568
|
|
2217
|
-
|
2218
1569
|
<div class="method-source-code" id="get_row_font_name-source">
|
2219
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2220
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1570
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 249</span>
|
1571
|
+
<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>)
|
2221
1572
|
(<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>
|
2222
1573
|
<span class="ruby-keyword">end</span></pre>
|
2223
1574
|
</div>
|
2224
|
-
|
2225
1575
|
</div>
|
2226
1576
|
|
2227
|
-
|
2228
1577
|
|
2229
|
-
|
2230
1578
|
</div>
|
2231
1579
|
|
2232
|
-
|
2233
1580
|
<div id="method-i-get_row_font_size" class="method-detail ">
|
2234
|
-
|
2235
1581
|
<div class="method-heading">
|
2236
1582
|
<span class="method-name">get_row_font_size</span><span
|
2237
1583
|
class="method-args">(row = 0)</span>
|
2238
|
-
|
2239
1584
|
<span class="method-click-advice">click to toggle source</span>
|
2240
|
-
|
2241
1585
|
</div>
|
2242
|
-
|
2243
1586
|
|
2244
1587
|
<div class="method-description">
|
2245
1588
|
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2249
1589
|
|
2250
|
-
|
2251
1590
|
<div class="method-source-code" id="get_row_font_size-source">
|
2252
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2253
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1591
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 253</span>
|
1592
|
+
<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>)
|
2254
1593
|
(<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>
|
2255
1594
|
<span class="ruby-keyword">end</span></pre>
|
2256
1595
|
</div>
|
2257
|
-
|
2258
1596
|
</div>
|
2259
1597
|
|
2260
|
-
|
2261
1598
|
|
2262
|
-
|
2263
1599
|
</div>
|
2264
1600
|
|
2265
|
-
|
2266
1601
|
<div id="method-i-get_row_height" class="method-detail ">
|
2267
|
-
|
2268
1602
|
<div class="method-heading">
|
2269
1603
|
<span class="method-name">get_row_height</span><span
|
2270
1604
|
class="method-args">(row = 0)</span>
|
2271
|
-
|
2272
1605
|
<span class="method-click-advice">click to toggle source</span>
|
2273
|
-
|
2274
1606
|
</div>
|
2275
|
-
|
2276
1607
|
|
2277
1608
|
<div class="method-description">
|
2278
1609
|
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
1610
|
|
2283
|
-
|
2284
1611
|
<div class="method-source-code" id="get_row_height-source">
|
2285
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2286
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1612
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 279</span>
|
1613
|
+
<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>)
|
2287
1614
|
<span class="ruby-identifier">validate_workbook</span>
|
2288
1615
|
<span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
|
2289
1616
|
<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>]
|
2290
1617
|
<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>
|
2291
1618
|
<span class="ruby-keyword">end</span></pre>
|
2292
1619
|
</div>
|
2293
|
-
|
2294
1620
|
</div>
|
2295
1621
|
|
2296
|
-
|
2297
1622
|
|
2298
|
-
|
2299
1623
|
</div>
|
2300
1624
|
|
2301
|
-
|
2302
1625
|
<div id="method-i-get_row_style" class="method-detail ">
|
2303
|
-
|
2304
1626
|
<div class="method-heading">
|
2305
1627
|
<span class="method-name">get_row_style</span><span
|
2306
1628
|
class="method-args">(row_index)</span>
|
2307
|
-
|
2308
1629
|
<span class="method-click-advice">click to toggle source</span>
|
2309
|
-
|
2310
1630
|
</div>
|
2311
|
-
|
2312
1631
|
|
2313
1632
|
<div class="method-description">
|
2314
1633
|
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
2318
1634
|
|
2319
|
-
|
2320
1635
|
<div class="method-source-code" id="get_row_style-source">
|
2321
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2322
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
|
1636
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 240</span>
|
1637
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
|
2323
1638
|
<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>]
|
2324
1639
|
(<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>
|
2325
1640
|
<span class="ruby-keyword">end</span></pre>
|
2326
1641
|
</div>
|
2327
|
-
|
2328
1642
|
</div>
|
2329
1643
|
|
2330
|
-
|
2331
1644
|
|
2332
|
-
|
2333
1645
|
</div>
|
2334
1646
|
|
2335
|
-
|
2336
1647
|
<div id="method-i-insert_cell" class="method-detail ">
|
2337
|
-
|
2338
1648
|
<div class="method-heading">
|
2339
1649
|
<span class="method-name">insert_cell</span><span
|
2340
1650
|
class="method-args">(row = 0, col = 0, data = nil, formula = nil, shift = nil)</span>
|
2341
|
-
|
2342
1651
|
<span class="method-click-advice">click to toggle source</span>
|
2343
|
-
|
2344
1652
|
</div>
|
2345
|
-
|
2346
1653
|
|
2347
1654
|
<div class="method-description">
|
2348
1655
|
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
1656
|
|
2353
|
-
|
2354
1657
|
<div class="method-source-code" id="insert_cell-source">
|
2355
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2356
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">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>)
|
1658
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 11</span>
|
1659
|
+
<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>)
|
2357
1660
|
<span class="ruby-identifier">validate_workbook</span>
|
2358
1661
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>)
|
2359
1662
|
|
@@ -2362,9 +1665,15 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
2362
1665
|
<span class="ruby-keyword">when</span> <span class="ruby-value">:right</span> <span class="ruby-keyword">then</span>
|
2363
1666
|
<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>)
|
2364
1667
|
<span class="ruby-keyword">when</span> <span class="ruby-value">:down</span> <span class="ruby-keyword">then</span>
|
2365
|
-
<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>
|
2366
|
-
(<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
|
2367
|
-
<span class="ruby-identifier">
|
1668
|
+
<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>))
|
1669
|
+
(<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>
|
1670
|
+
<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>]
|
1671
|
+
<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>
|
1672
|
+
<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>
|
1673
|
+
<span class="ruby-keyword">else</span>
|
1674
|
+
<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>)
|
1675
|
+
<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>]
|
1676
|
+
<span class="ruby-keyword">end</span>
|
2368
1677
|
}
|
2369
1678
|
<span class="ruby-keyword">else</span>
|
2370
1679
|
<span class="ruby-identifier">raise</span> <span class="ruby-string">'invalid shift option'</span>
|
@@ -2373,54 +1682,42 @@ href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet
|
|
2373
1682
|
<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>)
|
2374
1683
|
<span class="ruby-keyword">end</span></pre>
|
2375
1684
|
</div>
|
2376
|
-
|
2377
1685
|
</div>
|
2378
1686
|
|
2379
|
-
|
2380
1687
|
|
2381
|
-
|
2382
1688
|
</div>
|
2383
1689
|
|
2384
|
-
|
2385
1690
|
<div id="method-i-insert_column" class="method-detail ">
|
2386
|
-
|
2387
1691
|
<div class="method-heading">
|
2388
1692
|
<span class="method-name">insert_column</span><span
|
2389
1693
|
class="method-args">(column_index = 0)</span>
|
2390
|
-
|
2391
1694
|
<span class="method-click-advice">click to toggle source</span>
|
2392
|
-
|
2393
1695
|
</div>
|
2394
|
-
|
2395
1696
|
|
2396
1697
|
<div class="method-description">
|
2397
|
-
|
2398
|
-
<p>Inserts column at <code>column_index</code>, pushes everything right, takes
|
2399
|
-
styles from column to left NOTE: use of this method will break formulas
|
2400
|
-
which reference cells which are being “pushed right”</p>
|
2401
|
-
|
2402
|
-
|
1698
|
+
<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>
|
2403
1699
|
|
2404
|
-
|
2405
1700
|
<div class="method-source-code" id="insert_column-source">
|
2406
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2407
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
|
1701
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 160</span>
|
1702
|
+
<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>)
|
2408
1703
|
<span class="ruby-identifier">validate_workbook</span>
|
2409
1704
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
|
2410
1705
|
|
2411
1706
|
<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>)
|
2412
1707
|
|
2413
|
-
<span class="ruby-comment">#
|
1708
|
+
<span class="ruby-comment"># Go through each cell in column</span>
|
2414
1709
|
<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>
|
1710
|
+
<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>
|
1711
|
+
|
2415
1712
|
<span class="ruby-identifier">old_cell</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
|
2416
1713
|
<span class="ruby-identifier">c</span> = <span class="ruby-keyword">nil</span>
|
2417
1714
|
|
2418
1715
|
<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>
|
2419
1716
|
<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>
|
2420
1717
|
|
2421
|
-
<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>
|
2422
|
-
<span class="ruby-value">:row</span>
|
2423
|
-
<span class="ruby-value">:datatype</span>
|
1718
|
+
<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>,
|
1719
|
+
<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>,
|
1720
|
+
<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>)
|
2424
1721
|
<span class="ruby-keyword">end</span>
|
2425
1722
|
|
2426
1723
|
<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>)
|
@@ -2428,41 +1725,42 @@ which reference cells which are being “pushed right”</p>
|
|
2428
1725
|
|
2429
1726
|
<span class="ruby-identifier">cols</span>.<span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span>)
|
2430
1727
|
|
1728
|
+
<span class="ruby-comment"># Update merged cells for all rows below</span>
|
1729
|
+
<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>
|
1730
|
+
<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>
|
1731
|
+
<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">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">column_index</span>
|
1732
|
+
|
1733
|
+
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">column_index</span>
|
1734
|
+
<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>(
|
1735
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span>,
|
1736
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span>,
|
1737
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</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>),
|
1738
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
|
1739
|
+
)
|
1740
|
+
}
|
1741
|
+
<span class="ruby-keyword">end</span>
|
1742
|
+
|
2431
1743
|
<span class="ruby-comment"># TODO: update column numbers</span>
|
2432
1744
|
<span class="ruby-keyword">end</span></pre>
|
2433
1745
|
</div>
|
2434
|
-
|
2435
1746
|
</div>
|
2436
1747
|
|
2437
|
-
|
2438
1748
|
|
2439
|
-
|
2440
1749
|
</div>
|
2441
1750
|
|
2442
|
-
|
2443
1751
|
<div id="method-i-insert_row" class="method-detail ">
|
2444
|
-
|
2445
1752
|
<div class="method-heading">
|
2446
1753
|
<span class="method-name">insert_row</span><span
|
2447
1754
|
class="method-args">(row_index = 0)</span>
|
2448
|
-
|
2449
1755
|
<span class="method-click-advice">click to toggle source</span>
|
2450
|
-
|
2451
1756
|
</div>
|
2452
|
-
|
2453
1757
|
|
2454
1758
|
<div class="method-description">
|
2455
|
-
|
2456
|
-
<p>Inserts row at row_index, pushes down, copies style from the row above
|
2457
|
-
(that's what Excel 2013 does!) NOTE: use of this method will break
|
2458
|
-
formulas which reference cells which are being “pushed down”</p>
|
2459
|
-
|
2460
|
-
|
1759
|
+
<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>
|
2461
1760
|
|
2462
|
-
|
2463
1761
|
<div class="method-source-code" id="insert_row-source">
|
2464
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2465
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">insert_row</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>)
|
1762
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 73</span>
|
1763
|
+
<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>)
|
2466
1764
|
<span class="ruby-identifier">validate_workbook</span>
|
2467
1765
|
<span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
|
2468
1766
|
|
@@ -2473,7 +1771,7 @@ formulas which reference cells which are being “pushed down”</p>
|
|
2473
1771
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span> <span class="ruby-keyword">then</span>
|
2474
1772
|
<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>
|
2475
1773
|
<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>
|
2476
|
-
<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>
|
1774
|
+
<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>)
|
2477
1775
|
<span class="ruby-identifier">nc</span>.<span class="ruby-identifier">worksheet</span> = <span class="ruby-keyword">self</span>
|
2478
1776
|
<span class="ruby-identifier">nc</span>
|
2479
1777
|
<span class="ruby-keyword">end</span>
|
@@ -2485,7 +1783,7 @@ formulas which reference cells which are being “pushed down”</p>
|
|
2485
1783
|
<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>)
|
2486
1784
|
|
2487
1785
|
<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>)
|
2488
|
-
<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>
|
1786
|
+
<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>)
|
2489
1787
|
|
2490
1788
|
<span class="ruby-comment"># Update row values for all rows below</span>
|
2491
1789
|
<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>
|
@@ -2497,365 +1795,256 @@ formulas which reference cells which are being “pushed down”</p>
|
|
2497
1795
|
}
|
2498
1796
|
}
|
2499
1797
|
|
1798
|
+
<span class="ruby-comment"># Update merged cells for all rows below</span>
|
1799
|
+
<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>
|
1800
|
+
<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>
|
1801
|
+
<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">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">row_index</span>
|
1802
|
+
|
1803
|
+
<span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">row_index</span>
|
1804
|
+
<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>(
|
1805
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</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>),
|
1806
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
|
1807
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span>,
|
1808
|
+
<span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span>,
|
1809
|
+
)
|
1810
|
+
}
|
1811
|
+
<span class="ruby-keyword">end</span>
|
1812
|
+
|
2500
1813
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">new_row</span>
|
2501
1814
|
<span class="ruby-keyword">end</span></pre>
|
2502
1815
|
</div>
|
2503
|
-
|
2504
1816
|
</div>
|
2505
1817
|
|
2506
|
-
|
2507
1818
|
|
2508
|
-
|
2509
1819
|
</div>
|
2510
1820
|
|
2511
|
-
|
2512
1821
|
<div id="method-i-is_column_bolded" class="method-detail ">
|
2513
|
-
|
2514
1822
|
<div class="method-heading">
|
2515
1823
|
<span class="method-name">is_column_bolded</span><span
|
2516
1824
|
class="method-args">(col = 0)</span>
|
2517
|
-
|
2518
1825
|
<span class="method-click-advice">click to toggle source</span>
|
2519
|
-
|
2520
1826
|
</div>
|
2521
|
-
|
2522
1827
|
|
2523
1828
|
<div class="method-description">
|
2524
1829
|
|
2525
|
-
|
2526
|
-
|
2527
|
-
|
2528
1830
|
|
2529
|
-
|
2530
1831
|
<div class="method-source-code" id="is_column_bolded-source">
|
2531
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2532
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_bolded</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1832
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 341</span>
|
1833
|
+
<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>)
|
2533
1834
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2534
1835
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
|
2535
1836
|
<span class="ruby-keyword">end</span></pre>
|
2536
1837
|
</div>
|
2537
|
-
|
2538
1838
|
</div>
|
2539
1839
|
|
2540
|
-
|
2541
1840
|
|
2542
|
-
|
2543
1841
|
</div>
|
2544
1842
|
|
2545
|
-
|
2546
1843
|
<div id="method-i-is_column_italicized" class="method-detail ">
|
2547
|
-
|
2548
1844
|
<div class="method-heading">
|
2549
1845
|
<span class="method-name">is_column_italicized</span><span
|
2550
1846
|
class="method-args">(col = 0)</span>
|
2551
|
-
|
2552
1847
|
<span class="method-click-advice">click to toggle source</span>
|
2553
|
-
|
2554
1848
|
</div>
|
2555
|
-
|
2556
1849
|
|
2557
1850
|
<div class="method-description">
|
2558
1851
|
|
2559
|
-
|
2560
|
-
|
2561
|
-
|
2562
1852
|
|
2563
|
-
|
2564
1853
|
<div class="method-source-code" id="is_column_italicized-source">
|
2565
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2566
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_italicized</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1854
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 336</span>
|
1855
|
+
<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>)
|
2567
1856
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2568
1857
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
|
2569
1858
|
<span class="ruby-keyword">end</span></pre>
|
2570
1859
|
</div>
|
2571
|
-
|
2572
1860
|
</div>
|
2573
1861
|
|
2574
|
-
|
2575
1862
|
|
2576
|
-
|
2577
1863
|
</div>
|
2578
1864
|
|
2579
|
-
|
2580
1865
|
<div id="method-i-is_column_struckthrough" class="method-detail ">
|
2581
|
-
|
2582
1866
|
<div class="method-heading">
|
2583
1867
|
<span class="method-name">is_column_struckthrough</span><span
|
2584
1868
|
class="method-args">(col = 0)</span>
|
2585
|
-
|
2586
1869
|
<span class="method-click-advice">click to toggle source</span>
|
2587
|
-
|
2588
1870
|
</div>
|
2589
|
-
|
2590
1871
|
|
2591
1872
|
<div class="method-description">
|
2592
1873
|
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2596
1874
|
|
2597
|
-
|
2598
1875
|
<div class="method-source-code" id="is_column_struckthrough-source">
|
2599
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2600
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_struckthrough</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1876
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 351</span>
|
1877
|
+
<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>)
|
2601
1878
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2602
1879
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
|
2603
1880
|
<span class="ruby-keyword">end</span></pre>
|
2604
1881
|
</div>
|
2605
|
-
|
2606
1882
|
</div>
|
2607
1883
|
|
2608
|
-
|
2609
1884
|
|
2610
|
-
|
2611
1885
|
</div>
|
2612
1886
|
|
2613
|
-
|
2614
1887
|
<div id="method-i-is_column_underlined" class="method-detail ">
|
2615
|
-
|
2616
1888
|
<div class="method-heading">
|
2617
1889
|
<span class="method-name">is_column_underlined</span><span
|
2618
1890
|
class="method-args">(col = 0)</span>
|
2619
|
-
|
2620
1891
|
<span class="method-click-advice">click to toggle source</span>
|
2621
|
-
|
2622
1892
|
</div>
|
2623
|
-
|
2624
1893
|
|
2625
1894
|
<div class="method-description">
|
2626
1895
|
|
2627
|
-
|
2628
|
-
|
2629
|
-
|
2630
1896
|
|
2631
|
-
|
2632
1897
|
<div class="method-source-code" id="is_column_underlined-source">
|
2633
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2634
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_column_underlined</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
|
1898
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 346</span>
|
1899
|
+
<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>)
|
2635
1900
|
<span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
|
2636
1901
|
<span class="ruby-identifier">font</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
|
2637
1902
|
<span class="ruby-keyword">end</span></pre>
|
2638
1903
|
</div>
|
2639
|
-
|
2640
1904
|
</div>
|
2641
1905
|
|
2642
|
-
|
2643
1906
|
|
2644
|
-
|
2645
1907
|
</div>
|
2646
1908
|
|
2647
|
-
|
2648
1909
|
<div id="method-i-is_row_bolded" class="method-detail ">
|
2649
|
-
|
2650
1910
|
<div class="method-heading">
|
2651
1911
|
<span class="method-name">is_row_bolded</span><span
|
2652
1912
|
class="method-args">(row = 0)</span>
|
2653
|
-
|
2654
1913
|
<span class="method-click-advice">click to toggle source</span>
|
2655
|
-
|
2656
1914
|
</div>
|
2657
|
-
|
2658
1915
|
|
2659
1916
|
<div class="method-description">
|
2660
1917
|
|
2661
|
-
|
2662
|
-
|
2663
|
-
|
2664
1918
|
|
2665
|
-
|
2666
1919
|
<div class="method-source-code" id="is_row_bolded-source">
|
2667
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2668
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_bolded</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1920
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 267</span>
|
1921
|
+
<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>)
|
2669
1922
|
(<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>
|
2670
1923
|
<span class="ruby-keyword">end</span></pre>
|
2671
1924
|
</div>
|
2672
|
-
|
2673
1925
|
</div>
|
2674
1926
|
|
2675
|
-
|
2676
1927
|
|
2677
|
-
|
2678
1928
|
</div>
|
2679
1929
|
|
2680
|
-
|
2681
1930
|
<div id="method-i-is_row_italicized" class="method-detail ">
|
2682
|
-
|
2683
1931
|
<div class="method-heading">
|
2684
1932
|
<span class="method-name">is_row_italicized</span><span
|
2685
1933
|
class="method-args">(row = 0)</span>
|
2686
|
-
|
2687
1934
|
<span class="method-click-advice">click to toggle source</span>
|
2688
|
-
|
2689
1935
|
</div>
|
2690
|
-
|
2691
1936
|
|
2692
1937
|
<div class="method-description">
|
2693
1938
|
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
1939
|
|
2698
|
-
|
2699
1940
|
<div class="method-source-code" id="is_row_italicized-source">
|
2700
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2701
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_italicized</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1941
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 263</span>
|
1942
|
+
<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>)
|
2702
1943
|
(<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>
|
2703
1944
|
<span class="ruby-keyword">end</span></pre>
|
2704
1945
|
</div>
|
2705
|
-
|
2706
1946
|
</div>
|
2707
1947
|
|
2708
|
-
|
2709
1948
|
|
2710
|
-
|
2711
1949
|
</div>
|
2712
1950
|
|
2713
|
-
|
2714
1951
|
<div id="method-i-is_row_struckthrough" class="method-detail ">
|
2715
|
-
|
2716
1952
|
<div class="method-heading">
|
2717
1953
|
<span class="method-name">is_row_struckthrough</span><span
|
2718
1954
|
class="method-args">(row = 0)</span>
|
2719
|
-
|
2720
1955
|
<span class="method-click-advice">click to toggle source</span>
|
2721
|
-
|
2722
1956
|
</div>
|
2723
|
-
|
2724
1957
|
|
2725
1958
|
<div class="method-description">
|
2726
1959
|
|
2727
|
-
|
2728
|
-
|
2729
|
-
|
2730
1960
|
|
2731
|
-
|
2732
1961
|
<div class="method-source-code" id="is_row_struckthrough-source">
|
2733
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2734
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_struckthrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1962
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 275</span>
|
1963
|
+
<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>)
|
2735
1964
|
(<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>
|
2736
1965
|
<span class="ruby-keyword">end</span></pre>
|
2737
1966
|
</div>
|
2738
|
-
|
2739
1967
|
</div>
|
2740
1968
|
|
2741
|
-
|
2742
1969
|
|
2743
|
-
|
2744
1970
|
</div>
|
2745
1971
|
|
2746
|
-
|
2747
1972
|
<div id="method-i-is_row_underlined" class="method-detail ">
|
2748
|
-
|
2749
1973
|
<div class="method-heading">
|
2750
1974
|
<span class="method-name">is_row_underlined</span><span
|
2751
1975
|
class="method-args">(row = 0)</span>
|
2752
|
-
|
2753
1976
|
<span class="method-click-advice">click to toggle source</span>
|
2754
|
-
|
2755
1977
|
</div>
|
2756
|
-
|
2757
1978
|
|
2758
1979
|
<div class="method-description">
|
2759
1980
|
|
2760
|
-
|
2761
|
-
|
2762
|
-
|
2763
1981
|
|
2764
|
-
|
2765
1982
|
<div class="method-source-code" id="is_row_underlined-source">
|
2766
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2767
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_row_underlined</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
|
1983
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 271</span>
|
1984
|
+
<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>)
|
2768
1985
|
(<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>
|
2769
1986
|
<span class="ruby-keyword">end</span></pre>
|
2770
1987
|
</div>
|
2771
|
-
|
2772
1988
|
</div>
|
2773
1989
|
|
2774
|
-
|
2775
1990
|
|
2776
|
-
|
2777
1991
|
</div>
|
2778
1992
|
|
2779
|
-
|
2780
1993
|
<div id="method-i-merge_cells" class="method-detail ">
|
2781
|
-
|
2782
1994
|
<div class="method-heading">
|
2783
1995
|
<span class="method-name">merge_cells</span><span
|
2784
1996
|
class="method-args">(start_row, start_col, end_row, end_col)</span>
|
2785
|
-
|
2786
1997
|
<span class="method-click-advice">click to toggle source</span>
|
2787
|
-
|
2788
1998
|
</div>
|
2789
|
-
|
2790
1999
|
|
2791
2000
|
<div class="method-description">
|
2792
|
-
|
2793
2001
|
<p>Merges cells within a rectangular area</p>
|
2794
|
-
|
2795
|
-
|
2796
2002
|
|
2797
|
-
|
2798
2003
|
<div class="method-source-code" id="merge_cells-source">
|
2799
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2800
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merge_cells</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">end_col</span>)
|
2004
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 692</span>
|
2005
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">merge_cells</span>(<span class="ruby-identifier">start_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">end_col</span>)
|
2801
2006
|
<span class="ruby-identifier">validate_workbook</span>
|
2802
2007
|
|
2803
2008
|
<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>
|
2804
2009
|
<span class="ruby-comment"># TODO: add validation to make sure ranges are not intersecting with existing ones</span>
|
2805
|
-
<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>
|
2010
|
+
<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">start_row</span>, <span class="ruby-identifier">end_row</span>, <span class="ruby-identifier">start_col</span>, <span class="ruby-identifier">end_col</span>))
|
2806
2011
|
<span class="ruby-keyword">end</span></pre>
|
2807
2012
|
</div>
|
2808
|
-
|
2809
2013
|
</div>
|
2810
2014
|
|
2811
|
-
|
2812
2015
|
|
2813
|
-
|
2814
2016
|
</div>
|
2815
2017
|
|
2816
|
-
|
2817
2018
|
<div id="method-i-row_font" class="method-detail ">
|
2818
|
-
|
2819
2019
|
<div class="method-heading">
|
2820
2020
|
<span class="method-name">row_font</span><span
|
2821
2021
|
class="method-args">(row)</span>
|
2822
|
-
|
2823
2022
|
<span class="method-click-advice">click to toggle source</span>
|
2824
|
-
|
2825
2023
|
</div>
|
2826
|
-
|
2827
2024
|
|
2828
2025
|
<div class="method-description">
|
2829
2026
|
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
2027
|
|
2834
|
-
|
2835
2028
|
<div class="method-source-code" id="row_font-source">
|
2836
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
2837
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
|
2029
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 300</span>
|
2030
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">row_font</span>(<span class="ruby-identifier">row</span>)
|
2838
2031
|
(<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>
|
2839
2032
|
<span class="ruby-keyword">end</span></pre>
|
2840
2033
|
</div>
|
2841
|
-
|
2842
2034
|
</div>
|
2843
2035
|
|
2844
|
-
|
2845
2036
|
|
2846
|
-
|
2847
2037
|
</div>
|
2848
2038
|
|
2849
|
-
|
2850
2039
|
</section>
|
2851
|
-
|
2040
|
+
|
2852
2041
|
</section>
|
2853
2042
|
</main>
|
2854
2043
|
|
2855
2044
|
|
2856
2045
|
<footer id="validator-badges" role="contentinfo">
|
2857
|
-
<p><a href="
|
2858
|
-
<p>Generated by <a href="https://
|
2046
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
2047
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
|
2859
2048
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
2860
2049
|
</footer>
|
2861
2050
|
|