rubyXL 3.2.6 → 3.2.7
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/README.rdoc +7 -1
- data/VERSION +1 -1
- data/lib/rubyXL/cell.rb +0 -73
- data/lib/rubyXL/convenience_methods.rb +493 -9
- data/lib/rubyXL/objects/border.rb +1 -1
- data/lib/rubyXL/objects/column_range.rb +31 -14
- data/lib/rubyXL/objects/container_nodes.rb +9 -0
- data/lib/rubyXL/objects/document_properties.rb +4 -6
- data/lib/rubyXL/objects/fill.rb +7 -5
- data/lib/rubyXL/objects/font.rb +3 -3
- data/lib/rubyXL/objects/sheet_data.rb +2 -0
- data/lib/rubyXL/objects/stylesheet.rb +9 -9
- data/lib/rubyXL/objects/theme.rb +1 -1
- data/lib/rubyXL/objects/workbook.rb +1 -1
- data/lib/rubyXL/objects/worksheet.rb +2 -0
- data/lib/rubyXL/worksheet.rb +5 -415
- data/rdoc/README_rdoc.html +14 -2
- data/rdoc/RubyXL/AExtension.html +1 -1
- data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
- data/rdoc/RubyXL/AdjustHandleList.html +1 -1
- data/rdoc/RubyXL/Alignment.html +1 -1
- data/rdoc/RubyXL/AlternateContent.html +1 -1
- data/rdoc/RubyXL/Authors.html +1 -1
- data/rdoc/RubyXL/AutoFilter.html +1 -1
- data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
- data/rdoc/RubyXL/BinaryImageFile.html +1 -1
- data/rdoc/RubyXL/BodyProperties.html +1 -1
- data/rdoc/RubyXL/BooleanNode.html +1 -1
- data/rdoc/RubyXL/BooleanValue.html +1 -1
- data/rdoc/RubyXL/Border.html +1 -1
- data/rdoc/RubyXL/BorderEdge.html +1 -1
- data/rdoc/RubyXL/Borders.html +1 -1
- data/rdoc/RubyXL/Break.html +1 -1
- data/rdoc/RubyXL/BreakList.html +1 -1
- data/rdoc/RubyXL/CT_AdjPoint2D.html +1 -1
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +1 -1
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +1 -1
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +1 -1
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +1 -1
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +1 -1
- data/rdoc/RubyXL/CT_Backdrop.html +1 -1
- data/rdoc/RubyXL/CT_Bevel.html +1 -1
- data/rdoc/RubyXL/CT_BiLevelEffect.html +1 -1
- data/rdoc/RubyXL/CT_BlendEffect.html +1 -1
- data/rdoc/RubyXL/CT_Blip.html +1 -1
- data/rdoc/RubyXL/CT_BlipFillProperties.html +1 -1
- data/rdoc/RubyXL/CT_BlurEffect.html +1 -1
- data/rdoc/RubyXL/CT_Camera.html +1 -1
- data/rdoc/RubyXL/CT_Color.html +1 -1
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +1 -1
- data/rdoc/RubyXL/CT_ColorMapping.html +1 -1
- data/rdoc/RubyXL/CT_ColorScheme.html +1 -1
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +1 -1
- data/rdoc/RubyXL/CT_ConnectionSite.html +1 -1
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +1 -1
- data/rdoc/RubyXL/CT_DashStop.html +1 -1
- data/rdoc/RubyXL/CT_DashStopList.html +1 -1
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +1 -1
- data/rdoc/RubyXL/CT_DuotoneEffect.html +1 -1
- data/rdoc/RubyXL/CT_EffectContainer.html +1 -1
- data/rdoc/RubyXL/CT_EffectList.html +1 -1
- data/rdoc/RubyXL/CT_EffectReference.html +1 -1
- data/rdoc/RubyXL/CT_EffectStyleItem.html +1 -1
- data/rdoc/RubyXL/CT_EffectStyleList.html +1 -1
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +1 -1
- data/rdoc/RubyXL/CT_FillEffect.html +1 -1
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +1 -1
- data/rdoc/RubyXL/CT_FillStyleList.html +1 -1
- data/rdoc/RubyXL/CT_FlatText.html +1 -1
- data/rdoc/RubyXL/CT_FontCollection.html +1 -1
- data/rdoc/RubyXL/CT_FontReference.html +1 -1
- data/rdoc/RubyXL/CT_GeomGuideList.html +1 -1
- data/rdoc/RubyXL/CT_GlowEffect.html +1 -1
- data/rdoc/RubyXL/CT_GradientFillProperties.html +1 -1
- data/rdoc/RubyXL/CT_GradientStop.html +1 -1
- data/rdoc/RubyXL/CT_GradientStopList.html +1 -1
- data/rdoc/RubyXL/CT_HSLEffect.html +1 -1
- data/rdoc/RubyXL/CT_HslColor.html +1 -1
- data/rdoc/RubyXL/CT_Hyperlink.html +1 -1
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +1 -1
- data/rdoc/RubyXL/CT_LightRig.html +1 -1
- data/rdoc/RubyXL/CT_LineEndProperties.html +1 -1
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +1 -1
- data/rdoc/RubyXL/CT_LineProperties.html +1 -1
- data/rdoc/RubyXL/CT_LineStyleList.html +1 -1
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +1 -1
- data/rdoc/RubyXL/CT_LuminanceEffect.html +1 -1
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +1 -1
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +1 -1
- data/rdoc/RubyXL/CT_Path2D.html +1 -1
- data/rdoc/RubyXL/CT_Path2DArcTo.html +1 -1
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +1 -1
- data/rdoc/RubyXL/CT_Path2DList.html +1 -1
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +1 -1
- data/rdoc/RubyXL/CT_Path2DTo.html +1 -1
- data/rdoc/RubyXL/CT_PathShadeProperties.html +1 -1
- data/rdoc/RubyXL/CT_PatternFillProperties.html +1 -1
- data/rdoc/RubyXL/CT_Point3D.html +1 -1
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +1 -1
- data/rdoc/RubyXL/CT_PresetColor.html +1 -1
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +1 -1
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +1 -1
- data/rdoc/RubyXL/CT_PresetTextShape.html +1 -1
- data/rdoc/RubyXL/CT_ReflectionEffect.html +1 -1
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +1 -1
- data/rdoc/RubyXL/CT_RelativeRect.html +1 -1
- data/rdoc/RubyXL/CT_SRgbColor.html +1 -1
- data/rdoc/RubyXL/CT_ScRgbColor.html +1 -1
- data/rdoc/RubyXL/CT_Scene3D.html +1 -1
- data/rdoc/RubyXL/CT_SchemeColor.html +1 -1
- data/rdoc/RubyXL/CT_Shape3D.html +1 -1
- data/rdoc/RubyXL/CT_ShapeStyle.html +1 -1
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +1 -1
- data/rdoc/RubyXL/CT_SphereCoords.html +1 -1
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +1 -1
- data/rdoc/RubyXL/CT_StyleMatrix.html +1 -1
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +1 -1
- data/rdoc/RubyXL/CT_SupplementalFont.html +1 -1
- data/rdoc/RubyXL/CT_SystemColor.html +1 -1
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +1 -1
- data/rdoc/RubyXL/CT_TextBlipBullet.html +1 -1
- data/rdoc/RubyXL/CT_TextCharBullet.html +1 -1
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +1 -1
- data/rdoc/RubyXL/CT_TextFont.html +1 -1
- data/rdoc/RubyXL/CT_TextListStyle.html +1 -1
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +1 -1
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +1 -1
- data/rdoc/RubyXL/CT_TextSpacing.html +1 -1
- data/rdoc/RubyXL/CT_TextTabStop.html +1 -1
- data/rdoc/RubyXL/CT_TextTabStopList.html +1 -1
- data/rdoc/RubyXL/CT_TileInfoProperties.html +1 -1
- data/rdoc/RubyXL/CT_TintEffect.html +1 -1
- data/rdoc/RubyXL/CT_Transform2D.html +1 -1
- data/rdoc/RubyXL/CT_TransformEffect.html +1 -1
- data/rdoc/RubyXL/CT_Vector3D.html +1 -1
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +1 -1
- data/rdoc/RubyXL/CalculationChain.html +1 -1
- data/rdoc/RubyXL/CalculationChainCell.html +1 -1
- data/rdoc/RubyXL/CalculationProperties.html +1 -1
- data/rdoc/RubyXL/Cell.html +15 -11
- data/rdoc/RubyXL/CellConvenienceMethods.html +98 -0
- data/rdoc/RubyXL/CellSmartTag.html +1 -1
- data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
- data/rdoc/RubyXL/CellSmartTags.html +1 -1
- data/rdoc/RubyXL/CellStyle.html +1 -1
- data/rdoc/RubyXL/CellStyleXFs.html +1 -1
- data/rdoc/RubyXL/CellStyles.html +1 -1
- data/rdoc/RubyXL/CellValue.html +2 -2
- data/rdoc/RubyXL/CellWatch.html +1 -1
- data/rdoc/RubyXL/CellWatches.html +1 -1
- data/rdoc/RubyXL/CellXFs.html +1 -1
- data/rdoc/RubyXL/ChartColorsFile.html +1 -1
- data/rdoc/RubyXL/ChartFile.html +1 -1
- data/rdoc/RubyXL/ChartStyleFile.html +1 -1
- data/rdoc/RubyXL/ChartUserShapesFile.html +1 -1
- data/rdoc/RubyXL/Chartsheet.html +1 -1
- data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
- data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
- data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
- data/rdoc/RubyXL/ChartsheetView.html +1 -1
- data/rdoc/RubyXL/ChartsheetViews.html +1 -1
- data/rdoc/RubyXL/Color.html +1 -1
- data/rdoc/RubyXL/ColorFilter.html +1 -1
- data/rdoc/RubyXL/ColorScale.html +1 -1
- data/rdoc/RubyXL/ColorSet.html +1 -1
- data/rdoc/RubyXL/Colors.html +1 -1
- data/rdoc/RubyXL/ColumnRange.html +1 -1
- data/rdoc/RubyXL/ColumnRanges.html +56 -40
- data/rdoc/RubyXL/Comment.html +1 -1
- data/rdoc/RubyXL/CommentList.html +1 -1
- data/rdoc/RubyXL/CommentsFile.html +1 -1
- data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
- data/rdoc/RubyXL/ConditionalFormatting.html +1 -1
- data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
- data/rdoc/RubyXL/ContentTypeDefault.html +1 -1
- data/rdoc/RubyXL/ContentTypeOverride.html +1 -1
- data/rdoc/RubyXL/ContentTypes.html +1 -1
- data/rdoc/RubyXL/ControlPropertiesFile.html +1 -1
- data/rdoc/RubyXL/CorePropertiesFile.html +1 -1
- data/rdoc/RubyXL/CustomColor.html +1 -1
- data/rdoc/RubyXL/CustomColorList.html +1 -1
- data/rdoc/RubyXL/CustomFilter.html +1 -1
- data/rdoc/RubyXL/CustomFilters.html +1 -1
- data/rdoc/RubyXL/CustomGeometry.html +1 -1
- data/rdoc/RubyXL/CustomProperties.html +1 -1
- data/rdoc/RubyXL/CustomPropertiesFile.html +1 -1
- data/rdoc/RubyXL/CustomProperty.html +1 -1
- data/rdoc/RubyXL/CustomSheetView.html +1 -1
- data/rdoc/RubyXL/CustomSheetViews.html +1 -1
- data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
- data/rdoc/RubyXL/CustomWorkbookViews.html +1 -1
- data/rdoc/RubyXL/CustomXMLFile.html +1 -1
- data/rdoc/RubyXL/DXF.html +1 -1
- data/rdoc/RubyXL/DXFs.html +1 -1
- data/rdoc/RubyXL/DataBar.html +1 -1
- data/rdoc/RubyXL/DataConsolidate.html +1 -1
- data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
- data/rdoc/RubyXL/DataConsolidationReferences.html +1 -1
- data/rdoc/RubyXL/DataType.html +1 -1
- data/rdoc/RubyXL/DataValidation.html +1 -1
- data/rdoc/RubyXL/DataValidations.html +1 -1
- data/rdoc/RubyXL/DateGroupItem.html +1 -1
- data/rdoc/RubyXL/DefinedName.html +1 -1
- data/rdoc/RubyXL/DefinedNames.html +1 -1
- data/rdoc/RubyXL/DocumentPropertiesFile.html +1 -1
- data/rdoc/RubyXL/DrawingFile.html +1 -1
- data/rdoc/RubyXL/DynamicFilter.html +1 -1
- data/rdoc/RubyXL/EmbeddedControl.html +1 -1
- data/rdoc/RubyXL/EmbeddedControls.html +1 -1
- data/rdoc/RubyXL/Extension.html +1 -1
- data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
- data/rdoc/RubyXL/Extents.html +1 -1
- data/rdoc/RubyXL/ExternalLinksFile.html +1 -1
- data/rdoc/RubyXL/ExternalReference.html +1 -1
- data/rdoc/RubyXL/ExternalReferences.html +1 -1
- data/rdoc/RubyXL/ExtraColorSchemeList.html +1 -1
- data/rdoc/RubyXL/FieldItem.html +1 -1
- data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
- data/rdoc/RubyXL/FileSharing.html +1 -1
- data/rdoc/RubyXL/FileVersion.html +1 -1
- data/rdoc/RubyXL/Fill.html +1 -1
- data/rdoc/RubyXL/Fills.html +1 -1
- data/rdoc/RubyXL/FilterContainer.html +1 -1
- data/rdoc/RubyXL/FloatNode.html +1 -1
- data/rdoc/RubyXL/FloatValue.html +1 -1
- data/rdoc/RubyXL/Font.html +6 -6
- data/rdoc/RubyXL/FontScheme.html +1 -1
- data/rdoc/RubyXL/Fonts.html +1 -1
- data/rdoc/RubyXL/Formula.html +1 -1
- data/rdoc/RubyXL/FunctionGroup.html +1 -1
- data/rdoc/RubyXL/FunctionGroups.html +1 -1
- data/rdoc/RubyXL/GenericStorageObject.html +1 -1
- data/rdoc/RubyXL/GradientFill.html +1 -1
- data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
- data/rdoc/RubyXL/Hyperlink.html +1 -1
- data/rdoc/RubyXL/HyperlinkRelFile.html +1 -1
- data/rdoc/RubyXL/Hyperlinks.html +1 -1
- data/rdoc/RubyXL/IconFilter.html +1 -1
- data/rdoc/RubyXL/IconSet.html +1 -1
- data/rdoc/RubyXL/IgnoredError.html +1 -1
- data/rdoc/RubyXL/IgnoredErrors.html +1 -1
- data/rdoc/RubyXL/IndexedColors.html +1 -1
- data/rdoc/RubyXL/InputCells.html +1 -1
- data/rdoc/RubyXL/IntegerNode.html +1 -1
- data/rdoc/RubyXL/IntegerValue.html +1 -1
- data/rdoc/RubyXL/LegacyCell.html +15 -514
- data/rdoc/RubyXL/LegacyWorksheet.html +134 -2518
- data/rdoc/RubyXL/MRUColors.html +1 -1
- data/rdoc/RubyXL/MacrosFile.html +1 -1
- data/rdoc/RubyXL/MergedCell.html +1 -1
- data/rdoc/RubyXL/MergedCells.html +1 -1
- data/rdoc/RubyXL/NumFmt.html +1 -1
- data/rdoc/RubyXL/NumberFormat.html +1 -1
- data/rdoc/RubyXL/NumberFormats.html +1 -1
- data/rdoc/RubyXL/OLEObject.html +1 -1
- data/rdoc/RubyXL/OLEObjects.html +1 -1
- data/rdoc/RubyXL/OLESize.html +1 -1
- data/rdoc/RubyXL/OOXMLContainerObject.html +1 -1
- data/rdoc/RubyXL/OOXMLObject.html +1 -1
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +1 -1
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +1 -1
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +1 -1
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
- data/rdoc/RubyXL/Offset.html +1 -1
- data/rdoc/RubyXL/OutlineProperties.html +1 -1
- data/rdoc/RubyXL/PageMargins.html +1 -1
- data/rdoc/RubyXL/PageSetup.html +1 -1
- data/rdoc/RubyXL/PageSetupProperties.html +1 -1
- data/rdoc/RubyXL/Pane.html +1 -1
- data/rdoc/RubyXL/Parser.html +1 -1
- data/rdoc/RubyXL/PatternFill.html +1 -1
- data/rdoc/RubyXL/PhoneticProperties.html +1 -1
- data/rdoc/RubyXL/PhoneticRun.html +1 -1
- data/rdoc/RubyXL/PivotArea.html +1 -1
- data/rdoc/RubyXL/PivotCache.html +1 -1
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +1 -1
- data/rdoc/RubyXL/PivotCaches.html +1 -1
- data/rdoc/RubyXL/PivotReference.html +1 -1
- data/rdoc/RubyXL/PivotReferences.html +1 -1
- data/rdoc/RubyXL/PivotTableFile.html +1 -1
- data/rdoc/RubyXL/PivotTableSelection.html +1 -1
- data/rdoc/RubyXL/PresetGeometry.html +1 -1
- data/rdoc/RubyXL/PrintOptions.html +1 -1
- data/rdoc/RubyXL/PrinterSettingsFile.html +1 -1
- data/rdoc/RubyXL/ProtectedRange.html +1 -1
- data/rdoc/RubyXL/ProtectedRanges.html +1 -1
- data/rdoc/RubyXL/Protection.html +1 -1
- data/rdoc/RubyXL/RID.html +1 -1
- data/rdoc/RubyXL/RawOOXML.html +1 -1
- data/rdoc/RubyXL/Reference.html +1 -1
- data/rdoc/RubyXL/Relationship.html +1 -1
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +1 -1
- data/rdoc/RubyXL/RelationshipSupport.html +1 -1
- data/rdoc/RubyXL/RichText.html +1 -1
- data/rdoc/RubyXL/RichTextRun.html +1 -1
- data/rdoc/RubyXL/Row.html +1 -1
- data/rdoc/RubyXL/RunProperties.html +1 -1
- data/rdoc/RubyXL/Scenario.html +1 -1
- data/rdoc/RubyXL/Scenarios.html +1 -1
- data/rdoc/RubyXL/Selection.html +1 -1
- data/rdoc/RubyXL/ShapeGuide.html +1 -1
- data/rdoc/RubyXL/ShapeTextRectangle.html +1 -1
- data/rdoc/RubyXL/SharedStringsTable.html +1 -1
- data/rdoc/RubyXL/Sheet.html +1 -1
- data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
- data/rdoc/RubyXL/SheetData.html +1 -1
- data/rdoc/RubyXL/Sheets.html +1 -1
- data/rdoc/RubyXL/SlicerCacheFile.html +1 -1
- data/rdoc/RubyXL/SlicerFile.html +1 -1
- data/rdoc/RubyXL/SmartTagProperties.html +1 -1
- data/rdoc/RubyXL/SmartTagType.html +1 -1
- data/rdoc/RubyXL/SmartTagTypes.html +1 -1
- data/rdoc/RubyXL/SmartTags.html +1 -1
- data/rdoc/RubyXL/SortCondition.html +1 -1
- data/rdoc/RubyXL/SortState.html +1 -1
- data/rdoc/RubyXL/Sqref.html +1 -1
- data/rdoc/RubyXL/Stop.html +1 -1
- data/rdoc/RubyXL/StringNode.html +1 -1
- data/rdoc/RubyXL/StringNodeW3C.html +95 -1
- data/rdoc/RubyXL/StringValue.html +1 -1
- data/rdoc/RubyXL/Stylesheet.html +1 -1
- data/rdoc/RubyXL/TableFile.html +1 -1
- data/rdoc/RubyXL/TableParts.html +1 -1
- data/rdoc/RubyXL/TableStyle.html +1 -1
- data/rdoc/RubyXL/TableStyles.html +1 -1
- data/rdoc/RubyXL/Text.html +1 -1
- data/rdoc/RubyXL/Theme.html +1 -1
- data/rdoc/RubyXL/ThemeElements.html +1 -1
- data/rdoc/RubyXL/ThumbnailFile.html +1 -1
- data/rdoc/RubyXL/Top10.html +1 -1
- data/rdoc/RubyXL/VMLDrawingFile.html +1 -1
- data/rdoc/RubyXL/Variant.html +1 -1
- data/rdoc/RubyXL/Vector.html +1 -1
- data/rdoc/RubyXL/VectorValue.html +1 -1
- data/rdoc/RubyXL/VisualProperties.html +1 -1
- data/rdoc/RubyXL/WebPublishObject.html +1 -1
- data/rdoc/RubyXL/WebPublishObjects.html +1 -1
- data/rdoc/RubyXL/WebPublishingItem.html +1 -1
- data/rdoc/RubyXL/WebPublishingItems.html +1 -1
- data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
- data/rdoc/RubyXL/Workbook.html +1 -1
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +8 -45
- data/rdoc/RubyXL/WorkbookProperties.html +1 -1
- data/rdoc/RubyXL/WorkbookProtection.html +1 -1
- data/rdoc/RubyXL/WorkbookRoot.html +1 -1
- data/rdoc/RubyXL/WorkbookView.html +1 -1
- data/rdoc/RubyXL/WorkbookViews.html +1 -1
- data/rdoc/RubyXL/Worksheet.html +1 -1
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +98 -0
- data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
- data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
- data/rdoc/RubyXL/WorksheetProperties.html +1 -1
- data/rdoc/RubyXL/WorksheetProtection.html +1 -1
- data/rdoc/RubyXL/WorksheetView.html +1 -1
- data/rdoc/RubyXL/WorksheetViews.html +1 -1
- data/rdoc/RubyXL/XF.html +1 -1
- data/rdoc/RubyXL.html +1 -1
- data/rdoc/created.rid +18 -18
- data/rdoc/index.html +2 -2
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/table_of_contents.html +76 -464
- data/rubyXL.gemspec +5 -3
- data/spec/lib/worksheet_spec.rb +55 -7
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78d8560310cff3db8a14ada15250fd8ccc4a0cf4
|
|
4
|
+
data.tar.gz: 934202bae68313dbc61ee8e35b1b70d3e36b856e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8abe16d619a9ef123a2b621fcf4bb17f8e7266fbceb1919a3b9d1ad6ab3ce21a597d15900834883e12ecba77a271fc2071ddf3b05dfbe28de7164324aaea06b9
|
|
7
|
+
data.tar.gz: 9580942eb45bca0b491622c16bd82e528444340c22e90345b772f6b3903ab2a3fae815cc5e0d1c3c6b78f98039c2c41b05570afe643bcaf442ff3b59acf1fb02
|
data/README.rdoc
CHANGED
|
@@ -188,11 +188,17 @@ WARNING: Use of this method WILL break formulas referencing cells which have bee
|
|
|
188
188
|
worksheet.delete_cell(0, 0, :up) # Deletes A1, shifts contents of first column up
|
|
189
189
|
worksheet.delete_cell(0, 0) # Deletes A1, does not shift cells
|
|
190
190
|
|
|
191
|
+
== I/O
|
|
192
|
+
|
|
191
193
|
=== Writing
|
|
192
194
|
workbook.write("path/to/desired/Excel/file.xlsx")
|
|
193
195
|
|
|
196
|
+
=== Streaming
|
|
197
|
+
The gem can provide +StringIO+ object containing the resulting +xlsx+ file, eliminating the need to save it to disk first. This capability comes in handy for web servers.
|
|
198
|
+
|
|
199
|
+
workbook.stream
|
|
194
200
|
|
|
195
|
-
|
|
201
|
+
== Miscellaneous
|
|
196
202
|
Reference.ind2ref(0,0) == 'A1' # Converts row and column index to Excel-style cell reference
|
|
197
203
|
Reference.ref2ind('A1') == [0, 0] # Converts Excel-style cell reference to row and column index
|
|
198
204
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.2.
|
|
1
|
+
3.2.7
|
data/lib/rubyXL/cell.rb
CHANGED
|
@@ -96,54 +96,6 @@ module RubyXL
|
|
|
96
96
|
end
|
|
97
97
|
private :update_font_references
|
|
98
98
|
|
|
99
|
-
# changes horizontal alignment of cell
|
|
100
|
-
def change_horizontal_alignment(alignment = 'center')
|
|
101
|
-
validate_worksheet
|
|
102
|
-
self.style_index = workbook.modify_alignment(self.style_index, true, alignment)
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
# changes vertical alignment of cell
|
|
106
|
-
def change_vertical_alignment(alignment = 'center')
|
|
107
|
-
validate_worksheet
|
|
108
|
-
self.style_index = workbook.modify_alignment(self.style_index, false, alignment)
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# changes wrap of cell
|
|
112
|
-
def change_text_wrap(wrap = false)
|
|
113
|
-
validate_worksheet
|
|
114
|
-
self.style_index = workbook.modify_text_wrap(self.style_index, wrap)
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
def change_border(direction, weight)
|
|
118
|
-
validate_worksheet
|
|
119
|
-
self.style_index = workbook.modify_border(self.style_index, direction, weight)
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
def change_border_top(weight = 'thin')
|
|
123
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
124
|
-
change_border(:top, weight)
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
def change_border_left(weight = 'thin')
|
|
128
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
129
|
-
change_border(:left, weight)
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
def change_border_right(weight = 'thin')
|
|
133
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
134
|
-
change_border(:right, weight)
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
def change_border_bottom(weight = 'thin')
|
|
138
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
139
|
-
change_border(:bottom, weight)
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
def change_border_diagonal(weight = 'thin')
|
|
143
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
144
|
-
change_border(:diagonal, weight)
|
|
145
|
-
end
|
|
146
|
-
|
|
147
99
|
def change_contents(data, formula_expression = nil)
|
|
148
100
|
validate_worksheet
|
|
149
101
|
|
|
@@ -229,31 +181,6 @@ module RubyXL
|
|
|
229
181
|
xf_obj.alignment.wrap_text
|
|
230
182
|
end
|
|
231
183
|
|
|
232
|
-
# returns cell's top border
|
|
233
|
-
def border_top()
|
|
234
|
-
return get_border(:top)
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
# returns cell's left border
|
|
238
|
-
def border_left()
|
|
239
|
-
return get_border(:left)
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
# returns cell's right border
|
|
243
|
-
def border_right()
|
|
244
|
-
return get_border(:right)
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
# returns cell's bottom border
|
|
248
|
-
def border_bottom()
|
|
249
|
-
return get_border(:bottom)
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
# returns cell's diagonal border
|
|
253
|
-
def border_diagonal()
|
|
254
|
-
return get_border(:diagonal)
|
|
255
|
-
end
|
|
256
|
-
|
|
257
184
|
def inspect
|
|
258
185
|
str = "#<#{self.class}(#{row},#{column}): #{raw_value.inspect}"
|
|
259
186
|
str += " =#{self.formula.expression}" if self.formula
|
|
@@ -147,17 +147,11 @@ module RubyXL
|
|
|
147
147
|
new_xf_id
|
|
148
148
|
end
|
|
149
149
|
|
|
150
|
-
def
|
|
151
|
-
xf = cell_xfs[style_index].dup
|
|
152
|
-
xf.alignment = RubyXL::Alignment.new(:wrap_text => wrap, :apply_alignment => true)
|
|
153
|
-
register_new_xf(xf, style_index)
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
def modify_alignment(style_index, is_horizontal, alignment)
|
|
150
|
+
def modify_alignment(style_index, &block)
|
|
157
151
|
xf = cell_xfs[style_index].dup
|
|
152
|
+
xf.alignment ||= RubyXL::Alignment.new
|
|
158
153
|
xf.apply_alignment = true
|
|
159
|
-
xf.alignment
|
|
160
|
-
:vertical => is_horizontal ? nil : alignment)
|
|
154
|
+
yield(xf.alignment)
|
|
161
155
|
register_new_xf(xf, style_index)
|
|
162
156
|
end
|
|
163
157
|
|
|
@@ -187,4 +181,494 @@ module RubyXL
|
|
|
187
181
|
|
|
188
182
|
end
|
|
189
183
|
|
|
184
|
+
|
|
185
|
+
module WorksheetConvenienceMethods
|
|
186
|
+
|
|
187
|
+
def get_row_fill(row = 0)
|
|
188
|
+
(row = sheet_data.rows[row]) && row.get_fill_color
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def get_row_font_name(row = 0)
|
|
192
|
+
(font = row_font(row)) && font.get_name
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def get_row_font_size(row = 0)
|
|
196
|
+
(font = row_font(row)) && font.get_size
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def get_row_font_color(row = 0)
|
|
200
|
+
font = row_font(row)
|
|
201
|
+
color = font && font.color
|
|
202
|
+
color && (color.rgb || '000000')
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
def is_row_italicized(row = 0)
|
|
206
|
+
(font = row_font(row)) && font.is_italic
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
def is_row_bolded(row = 0)
|
|
210
|
+
(font = row_font(row)) && font.is_bold
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
def is_row_underlined(row = 0)
|
|
214
|
+
(font = row_font(row)) && font.is_underlined
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def is_row_struckthrough(row = 0)
|
|
218
|
+
(font = row_font(row)) && font.is_strikethrough
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
def get_row_height(row = 0)
|
|
222
|
+
validate_workbook
|
|
223
|
+
validate_nonnegative(row)
|
|
224
|
+
return nil unless row_exists(row)
|
|
225
|
+
row = sheet_data.rows[row]
|
|
226
|
+
row && row.ht || 13
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
def get_row_horizontal_alignment(row = 0)
|
|
230
|
+
return get_row_alignment(row, true)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def get_row_vertical_alignment(row = 0)
|
|
234
|
+
return get_row_alignment(row, false)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def get_row_border_top(row = 0)
|
|
238
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_border` instead."
|
|
239
|
+
return get_row_border(row, :top)
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
def get_row_border_left(row = 0)
|
|
243
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_border` instead."
|
|
244
|
+
return get_row_border(row, :left)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
def get_row_border_right(row = 0)
|
|
248
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_border` instead."
|
|
249
|
+
return get_row_border(row, :right)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
def get_row_border_bottom(row = 0)
|
|
253
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_border` instead."
|
|
254
|
+
return get_row_border(row, :bottom)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
def get_row_border_diagonal(row = 0)
|
|
258
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_row_border` instead."
|
|
259
|
+
return get_row_border(row, :diagonal)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
def get_column_font_name(col = 0)
|
|
263
|
+
font = column_font(col)
|
|
264
|
+
font && font.get_name
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
def get_column_font_size(col = 0)
|
|
268
|
+
font = column_font(col)
|
|
269
|
+
font && font.get_size
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
def get_column_font_color(col = 0)
|
|
273
|
+
font = column_font(col)
|
|
274
|
+
font && (font.get_rgb_color || '000000')
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
def is_column_italicized(col = 0)
|
|
278
|
+
font = column_font(col)
|
|
279
|
+
font && font.is_italic
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
def is_column_bolded(col = 0)
|
|
283
|
+
font = column_font(col)
|
|
284
|
+
font && font.is_bold
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
def is_column_underlined(col = 0)
|
|
288
|
+
font = column_font(col)
|
|
289
|
+
font && font.is_underlined
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
def is_column_struckthrough(col = 0)
|
|
293
|
+
font = column_font(col)
|
|
294
|
+
font && font.is_strikethrough
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Get raw column width value as stored in the file
|
|
298
|
+
def get_column_width_raw(column_index = 0)
|
|
299
|
+
validate_workbook
|
|
300
|
+
validate_nonnegative(column_index)
|
|
301
|
+
|
|
302
|
+
range = cols.locate_range(column_index)
|
|
303
|
+
range && range.width
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Get column width measured in number of digits, as per
|
|
307
|
+
# http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx
|
|
308
|
+
def get_column_width(column_index = 0)
|
|
309
|
+
width = get_column_width_raw(column_index)
|
|
310
|
+
return RubyXL::ColumnRange::DEFAULT_WIDTH if width.nil?
|
|
311
|
+
(width - (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)).round
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
def get_column_fill(col=0)
|
|
315
|
+
validate_workbook
|
|
316
|
+
validate_nonnegative(col)
|
|
317
|
+
return nil unless column_exists(col)
|
|
318
|
+
|
|
319
|
+
@workbook.get_fill_color(get_col_xf(col))
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
def get_column_horizontal_alignment(col=0)
|
|
323
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_alignment` instead."
|
|
324
|
+
get_column_alignment(col, :horizontal)
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
def get_column_vertical_alignment(col=0)
|
|
328
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_alignment` instead."
|
|
329
|
+
get_column_alignment(col, :vertical)
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
def get_column_border_top(col=0)
|
|
333
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_border` instead."
|
|
334
|
+
get_column_border(col, :top)
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
def get_column_border_left(col=0)
|
|
338
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_border` instead."
|
|
339
|
+
get_column_border(col, :left)
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
def get_column_border_right(col=0)
|
|
343
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_border` instead."
|
|
344
|
+
get_column_border(col, :right)
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
def get_column_border_bottom(col=0)
|
|
348
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_border` instead."
|
|
349
|
+
get_column_border(col, :bottom)
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
def get_column_border_diagonal(col=0)
|
|
353
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_column_border` instead."
|
|
354
|
+
get_column_border(col, :diagonal)
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
def change_row_horizontal_alignment(row = 0, alignment = 'center')
|
|
358
|
+
validate_workbook
|
|
359
|
+
validate_nonnegative(row)
|
|
360
|
+
change_row_alignment(row) { |a| a.horizontal = alignment }
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
def change_row_vertical_alignment(row = 0, alignment = 'center')
|
|
364
|
+
validate_workbook
|
|
365
|
+
validate_nonnegative(row)
|
|
366
|
+
change_row_alignment(row) { |a| a.vertical = alignment }
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
def change_row_border_top(row = 0, weight = 'thin')
|
|
370
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
371
|
+
change_row_border(row, :top, weight)
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
def change_row_border_left(row = 0, weight = 'thin')
|
|
375
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
376
|
+
change_row_border(row, :left, weight)
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
def change_row_border_right(row = 0, weight = 'thin')
|
|
380
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
381
|
+
change_row_border(row, :right, weight)
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
def change_row_border_bottom(row = 0, weight = 'thin')
|
|
385
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
386
|
+
change_row_border(row, :bottom, weight)
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
def change_row_border_diagonal(row = 0, weight = 'thin')
|
|
390
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
391
|
+
change_row_border(row, :diagonal, weight)
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
def change_row_border(row, direction, weight)
|
|
395
|
+
validate_workbook
|
|
396
|
+
ensure_cell_exists(row)
|
|
397
|
+
|
|
398
|
+
sheet_data.rows[row].style_index = @workbook.modify_border(get_row_style(row), direction, weight)
|
|
399
|
+
|
|
400
|
+
sheet_data[row].cells.each { |c|
|
|
401
|
+
c.change_border(direction, weight) unless c.nil?
|
|
402
|
+
}
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
def change_row_fill(row_index = 0, rgb = 'ffffff')
|
|
406
|
+
validate_workbook
|
|
407
|
+
ensure_cell_exists(row_index)
|
|
408
|
+
Color.validate_color(rgb)
|
|
409
|
+
|
|
410
|
+
sheet_data.rows[row_index].style_index = @workbook.modify_fill(get_row_style(row_index), rgb)
|
|
411
|
+
sheet_data[row_index].cells.each { |c| c.change_fill(rgb) unless c.nil? }
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
def change_row_font_name(row = 0, font_name = 'Verdana')
|
|
415
|
+
ensure_cell_exists(row)
|
|
416
|
+
font = row_font(row).dup
|
|
417
|
+
font.set_name(font_name)
|
|
418
|
+
change_row_font(row, Worksheet::NAME, font_name, font)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
def change_row_font_size(row = 0, font_size=10)
|
|
422
|
+
ensure_cell_exists(row)
|
|
423
|
+
font = row_font(row).dup
|
|
424
|
+
font.set_size(font_size)
|
|
425
|
+
change_row_font(row, Worksheet::SIZE, font_size, font)
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
def change_row_font_color(row = 0, font_color = '000000')
|
|
429
|
+
ensure_cell_exists(row)
|
|
430
|
+
Color.validate_color(font_color)
|
|
431
|
+
font = row_font(row).dup
|
|
432
|
+
font.set_rgb_color(font_color)
|
|
433
|
+
change_row_font(row, Worksheet::COLOR, font_color, font)
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
def change_row_italics(row = 0, italicized = false)
|
|
437
|
+
ensure_cell_exists(row)
|
|
438
|
+
font = row_font(row).dup
|
|
439
|
+
font.set_italic(italicized)
|
|
440
|
+
change_row_font(row, Worksheet::ITALICS, italicized, font)
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
def change_row_bold(row = 0, bolded = false)
|
|
444
|
+
ensure_cell_exists(row)
|
|
445
|
+
font = row_font(row).dup
|
|
446
|
+
font.set_bold(bolded)
|
|
447
|
+
change_row_font(row, Worksheet::BOLD, bolded, font)
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
def change_row_underline(row = 0, underlined=false)
|
|
451
|
+
ensure_cell_exists(row)
|
|
452
|
+
font = row_font(row).dup
|
|
453
|
+
font.set_underline(underlined)
|
|
454
|
+
change_row_font(row, Worksheet::UNDERLINE, underlined, font)
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
def change_row_strikethrough(row = 0, struckthrough=false)
|
|
458
|
+
ensure_cell_exists(row)
|
|
459
|
+
font = row_font(row).dup
|
|
460
|
+
font.set_strikethrough(struckthrough)
|
|
461
|
+
change_row_font(row, Worksheet::STRIKETHROUGH, struckthrough, font)
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
def change_row_height(row = 0, height = 10)
|
|
465
|
+
validate_workbook
|
|
466
|
+
ensure_cell_exists(row)
|
|
467
|
+
|
|
468
|
+
c = sheet_data.rows[row]
|
|
469
|
+
c.ht = height
|
|
470
|
+
c.custom_height = true
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
def change_column_font_name(column_index = 0, font_name = 'Verdana')
|
|
474
|
+
xf = get_col_xf(column_index)
|
|
475
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
476
|
+
font.set_name(font_name)
|
|
477
|
+
change_column_font(column_index, Worksheet::NAME, font_name, font, xf)
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
def change_column_font_size(column_index, font_size=10)
|
|
481
|
+
xf = get_col_xf(column_index)
|
|
482
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
483
|
+
font.set_size(font_size)
|
|
484
|
+
change_column_font(column_index, Worksheet::SIZE, font_size, font, xf)
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
def change_column_font_color(column_index, font_color='000000')
|
|
488
|
+
Color.validate_color(font_color)
|
|
489
|
+
|
|
490
|
+
xf = get_col_xf(column_index)
|
|
491
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
492
|
+
font.set_rgb_color(font_color)
|
|
493
|
+
change_column_font(column_index, Worksheet::COLOR, font_color, font, xf)
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
def change_column_italics(column_index, italicized = false)
|
|
497
|
+
xf = get_col_xf(column_index)
|
|
498
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
499
|
+
font.set_italic(italicized)
|
|
500
|
+
change_column_font(column_index, Worksheet::ITALICS, italicized, font, xf)
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
def change_column_bold(column_index, bolded = false)
|
|
504
|
+
xf = get_col_xf(column_index)
|
|
505
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
506
|
+
font.set_bold(bolded)
|
|
507
|
+
change_column_font(column_index, Worksheet::BOLD, bolded, font, xf)
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
def change_column_underline(column_index, underlined = false)
|
|
511
|
+
xf = get_col_xf(column_index)
|
|
512
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
513
|
+
font.set_underline(underlined)
|
|
514
|
+
change_column_font(column_index, Worksheet::UNDERLINE, underlined, font, xf)
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
def change_column_strikethrough(column_index, struckthrough=false)
|
|
518
|
+
xf = get_col_xf(column_index)
|
|
519
|
+
font = @workbook.fonts[xf.font_id].dup
|
|
520
|
+
font.set_strikethrough(struckthrough)
|
|
521
|
+
change_column_font(column_index, Worksheet::STRIKETHROUGH, struckthrough, font, xf)
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
def change_column_horizontal_alignment(column_index, alignment = 'center')
|
|
525
|
+
change_column_alignment(column_index) { |a| a.horizontal = alignment }
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
def change_column_vertical_alignment(column_index, alignment = 'center')
|
|
529
|
+
change_column_alignment(column_index) { |a| a.vertical = alignment }
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
def change_column_border_top(column_index, weight = 'thin')
|
|
533
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
534
|
+
change_column_border(column_index, :top, weight)
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
def change_column_border_left(column_index, weight = 'thin')
|
|
538
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
539
|
+
change_column_border(column_index, :left, weight)
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
def change_column_border_right(column_index, weight = 'thin')
|
|
543
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
544
|
+
change_column_border(column_index, :right, weight)
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
def change_column_border_bottom(column_index, weight = 'thin')
|
|
548
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
549
|
+
change_column_border(column_index, :bottom, weight)
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
def change_column_border_diagonal(column_index, weight = 'thin')
|
|
553
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
554
|
+
change_column_border(column_index, :diagonal, weight)
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
def change_column_border(column_index, direction, weight)
|
|
558
|
+
validate_workbook
|
|
559
|
+
ensure_cell_exists(0, column_index)
|
|
560
|
+
|
|
561
|
+
cols.get_range(column_index).style_index = @workbook.modify_border(get_col_style(column_index), direction, weight)
|
|
562
|
+
|
|
563
|
+
sheet_data.rows.each { |row|
|
|
564
|
+
c = row.cells[column_index]
|
|
565
|
+
c.change_border(direction, weight) unless c.nil?
|
|
566
|
+
}
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
def change_row_alignment(row, &block)
|
|
570
|
+
validate_workbook
|
|
571
|
+
validate_nonnegative(row)
|
|
572
|
+
ensure_cell_exists(row)
|
|
573
|
+
|
|
574
|
+
sheet_data.rows[row].style_index = @workbook.modify_alignment(get_row_style(row), &block)
|
|
575
|
+
|
|
576
|
+
sheet_data[row].cells.each { |c|
|
|
577
|
+
next if c.nil?
|
|
578
|
+
c.style_index = @workbook.modify_alignment(c.style_index, &block)
|
|
579
|
+
}
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
def change_column_alignment(column_index, &block)
|
|
583
|
+
validate_workbook
|
|
584
|
+
ensure_cell_exists(0, column_index)
|
|
585
|
+
|
|
586
|
+
cols.get_range(column_index).style_index = @workbook.modify_alignment(get_col_style(column_index), &block)
|
|
587
|
+
# Excel gets confused if width is not explicitly set for a column that had alignment changes
|
|
588
|
+
change_column_width(column_index) if get_column_width_raw(column_index).nil?
|
|
589
|
+
|
|
590
|
+
sheet_data.rows.each { |row|
|
|
591
|
+
c = row[column_index]
|
|
592
|
+
next if c.nil?
|
|
593
|
+
c.style_index = @workbook.modify_alignment(c.style_index, &block)
|
|
594
|
+
}
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
module CellConvenienceMethods
|
|
601
|
+
|
|
602
|
+
def change_horizontal_alignment(alignment = 'center')
|
|
603
|
+
validate_worksheet
|
|
604
|
+
self.style_index = workbook.modify_alignment(self.style_index) { |a| a.horizontal = alignment }
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
def change_vertical_alignment(alignment = 'center')
|
|
608
|
+
validate_worksheet
|
|
609
|
+
self.style_index = workbook.modify_alignment(self.style_index) { |a| a.vertical = alignment }
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
def change_text_wrap(wrap = false)
|
|
613
|
+
validate_worksheet
|
|
614
|
+
self.style_index = workbook.modify_alignment(self.style_index) { |a| a.wrap_text = wrap }
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
def change_border(direction, weight)
|
|
618
|
+
validate_worksheet
|
|
619
|
+
self.style_index = workbook.modify_border(self.style_index, direction, weight)
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
def change_border_top(weight = 'thin')
|
|
623
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
624
|
+
change_border(:top, weight)
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
def change_border_left(weight = 'thin')
|
|
628
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
629
|
+
change_border(:left, weight)
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
def change_border_right(weight = 'thin')
|
|
633
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
634
|
+
change_border(:right, weight)
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
def change_border_bottom(weight = 'thin')
|
|
638
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
639
|
+
change_border(:bottom, weight)
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
def change_border_diagonal(weight = 'thin')
|
|
643
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_border` instead."
|
|
644
|
+
change_border(:diagonal, weight)
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
def border_top()
|
|
648
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
|
|
649
|
+
return get_border(:top)
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
def border_left()
|
|
653
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
|
|
654
|
+
return get_border(:left)
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
def border_right()
|
|
658
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
|
|
659
|
+
return get_border(:right)
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
def border_bottom()
|
|
663
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
|
|
664
|
+
return get_border(:bottom)
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
def border_diagonal()
|
|
668
|
+
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `get_border` instead."
|
|
669
|
+
return get_border(:diagonal)
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
end
|
|
673
|
+
|
|
190
674
|
end
|