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