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
data/lib/rubyXL/worksheet.rb
CHANGED
|
@@ -99,177 +99,6 @@ module LegacyWorksheet
|
|
|
99
99
|
end
|
|
100
100
|
private :find_first_row_with_content
|
|
101
101
|
|
|
102
|
-
#changes color of fill in (zer0 indexed) row
|
|
103
|
-
def change_row_fill(row_index = 0, rgb = 'ffffff')
|
|
104
|
-
validate_workbook
|
|
105
|
-
ensure_cell_exists(row_index)
|
|
106
|
-
Color.validate_color(rgb)
|
|
107
|
-
|
|
108
|
-
sheet_data.rows[row_index].style_index = @workbook.modify_fill(get_row_style(row_index), rgb)
|
|
109
|
-
sheet_data[row_index].cells.each { |c| c.change_fill(rgb) unless c.nil? }
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
def change_row_font_name(row = 0, font_name = 'Verdana')
|
|
113
|
-
ensure_cell_exists(row)
|
|
114
|
-
font = row_font(row).dup
|
|
115
|
-
font.set_name(font_name)
|
|
116
|
-
change_row_font(row, Worksheet::NAME, font_name, font)
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
def change_row_font_size(row = 0, font_size=10)
|
|
120
|
-
ensure_cell_exists(row)
|
|
121
|
-
font = row_font(row).dup
|
|
122
|
-
font.set_size(font_size)
|
|
123
|
-
change_row_font(row, Worksheet::SIZE, font_size, font)
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def change_row_font_color(row = 0, font_color = '000000')
|
|
127
|
-
ensure_cell_exists(row)
|
|
128
|
-
Color.validate_color(font_color)
|
|
129
|
-
font = row_font(row).dup
|
|
130
|
-
font.set_rgb_color(font_color)
|
|
131
|
-
change_row_font(row, Worksheet::COLOR, font_color, font)
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
def change_row_italics(row = 0, italicized = false)
|
|
135
|
-
ensure_cell_exists(row)
|
|
136
|
-
font = row_font(row).dup
|
|
137
|
-
font.set_italic(italicized)
|
|
138
|
-
change_row_font(row, Worksheet::ITALICS, italicized, font)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
def change_row_bold(row = 0, bolded = false)
|
|
142
|
-
ensure_cell_exists(row)
|
|
143
|
-
font = row_font(row).dup
|
|
144
|
-
font.set_bold(bolded)
|
|
145
|
-
change_row_font(row, Worksheet::BOLD, bolded, font)
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
def change_row_underline(row = 0, underlined=false)
|
|
149
|
-
ensure_cell_exists(row)
|
|
150
|
-
font = row_font(row).dup
|
|
151
|
-
font.set_underline(underlined)
|
|
152
|
-
change_row_font(row, Worksheet::UNDERLINE, underlined, font)
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
def change_row_strikethrough(row = 0, struckthrough=false)
|
|
156
|
-
ensure_cell_exists(row)
|
|
157
|
-
font = row_font(row).dup
|
|
158
|
-
font.set_strikethrough(struckthrough)
|
|
159
|
-
change_row_font(row, Worksheet::STRIKETHROUGH, struckthrough, font)
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
def change_row_height(row = 0, height = 10)
|
|
163
|
-
validate_workbook
|
|
164
|
-
ensure_cell_exists(row)
|
|
165
|
-
|
|
166
|
-
c = sheet_data.rows[row]
|
|
167
|
-
c.ht = height
|
|
168
|
-
c.custom_height = true
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
def change_row_horizontal_alignment(row = 0, alignment = 'center')
|
|
172
|
-
validate_workbook
|
|
173
|
-
validate_nonnegative(row)
|
|
174
|
-
change_row_alignment(row, alignment, true)
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
def change_row_vertical_alignment(row = 0, alignment = 'center')
|
|
178
|
-
validate_workbook
|
|
179
|
-
validate_nonnegative(row)
|
|
180
|
-
change_row_alignment(row, alignment, false)
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def change_row_border_top(row = 0, weight = 'thin')
|
|
184
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
185
|
-
change_row_border(row, :top, weight)
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
def change_row_border_left(row = 0, weight = 'thin')
|
|
189
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
190
|
-
change_row_border(row, :left, weight)
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
def change_row_border_right(row = 0, weight = 'thin')
|
|
194
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
195
|
-
change_row_border(row, :right, weight)
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
def change_row_border_bottom(row = 0, weight = 'thin')
|
|
199
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
200
|
-
change_row_border(row, :bottom, weight)
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
def change_row_border_diagonal(row = 0, weight = 'thin')
|
|
204
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_row_border` instead."
|
|
205
|
-
change_row_border(row, :diagonal, weight)
|
|
206
|
-
end
|
|
207
|
-
|
|
208
|
-
def change_row_border(row, direction, weight)
|
|
209
|
-
validate_workbook
|
|
210
|
-
ensure_cell_exists(row)
|
|
211
|
-
|
|
212
|
-
sheet_data.rows[row].style_index = @workbook.modify_border(get_row_style(row), direction, weight)
|
|
213
|
-
|
|
214
|
-
sheet_data[row].cells.each { |c|
|
|
215
|
-
c.change_border(direction, weight) unless c.nil?
|
|
216
|
-
}
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# Changes font name of column
|
|
220
|
-
def change_column_font_name(column_index = 0, font_name = 'Verdana')
|
|
221
|
-
xf = get_col_xf(column_index)
|
|
222
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
223
|
-
font.set_name(font_name)
|
|
224
|
-
change_column_font(column_index, Worksheet::NAME, font_name, font, xf)
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
# Changes font size of column
|
|
228
|
-
def change_column_font_size(column_index, font_size=10)
|
|
229
|
-
xf = get_col_xf(column_index)
|
|
230
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
231
|
-
font.set_size(font_size)
|
|
232
|
-
change_column_font(column_index, Worksheet::SIZE, font_size, font, xf)
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
# Changes font color of column
|
|
236
|
-
def change_column_font_color(column_index, font_color='000000')
|
|
237
|
-
Color.validate_color(font_color)
|
|
238
|
-
|
|
239
|
-
xf = get_col_xf(column_index)
|
|
240
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
241
|
-
font.set_rgb_color(font_color)
|
|
242
|
-
change_column_font(column_index, Worksheet::COLOR, font_color, font, xf)
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
def change_column_italics(column_index, italicized = false)
|
|
246
|
-
xf = get_col_xf(column_index)
|
|
247
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
248
|
-
font.set_italic(italicized)
|
|
249
|
-
change_column_font(column_index, Worksheet::ITALICS, italicized, font, xf)
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
def change_column_bold(column_index, bolded = false)
|
|
253
|
-
xf = get_col_xf(column_index)
|
|
254
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
255
|
-
font.set_bold(bolded)
|
|
256
|
-
change_column_font(column_index, Worksheet::BOLD, bolded, font, xf)
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
def change_column_underline(column_index, underlined = false)
|
|
260
|
-
xf = get_col_xf(column_index)
|
|
261
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
262
|
-
font.set_underline(underlined)
|
|
263
|
-
change_column_font(column_index, Worksheet::UNDERLINE, underlined, font, xf)
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
def change_column_strikethrough(column_index, struckthrough=false)
|
|
267
|
-
xf = get_col_xf(column_index)
|
|
268
|
-
font = @workbook.fonts[xf.font_id].dup
|
|
269
|
-
font.set_strikethrough(struckthrough)
|
|
270
|
-
change_column_font(column_index, Worksheet::STRIKETHROUGH, struckthrough, font, xf)
|
|
271
|
-
end
|
|
272
|
-
|
|
273
102
|
# Set raw column width value
|
|
274
103
|
def change_column_width_raw(column_index, width)
|
|
275
104
|
validate_workbook
|
|
@@ -298,51 +127,6 @@ module LegacyWorksheet
|
|
|
298
127
|
}
|
|
299
128
|
end
|
|
300
129
|
|
|
301
|
-
def change_column_horizontal_alignment(column_index, alignment = 'center')
|
|
302
|
-
change_column_alignment(column_index, alignment,true)
|
|
303
|
-
end
|
|
304
|
-
|
|
305
|
-
def change_column_vertical_alignment(column_index, alignment = 'center')
|
|
306
|
-
change_column_alignment(column_index, alignment, false)
|
|
307
|
-
end
|
|
308
|
-
|
|
309
|
-
def change_column_border_top(column_index, weight = 'thin')
|
|
310
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
311
|
-
change_column_border(column_index, :top, weight)
|
|
312
|
-
end
|
|
313
|
-
|
|
314
|
-
def change_column_border_left(column_index, weight = 'thin')
|
|
315
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
316
|
-
change_column_border(column_index, :left, weight)
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
def change_column_border_right(column_index, weight = 'thin')
|
|
320
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
321
|
-
change_column_border(column_index, :right, weight)
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
def change_column_border_bottom(column_index, weight = 'thin')
|
|
325
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
326
|
-
change_column_border(column_index, :bottom, weight)
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
def change_column_border_diagonal(column_index, weight = 'thin')
|
|
330
|
-
warn "[DEPRECATION] `#{__method__}` is deprecated. Please use `change_column_border` instead."
|
|
331
|
-
change_column_border(column_index, :diagonal, weight)
|
|
332
|
-
end
|
|
333
|
-
|
|
334
|
-
def change_column_border(column_index, direction, weight)
|
|
335
|
-
validate_workbook
|
|
336
|
-
ensure_cell_exists(0, column_index)
|
|
337
|
-
|
|
338
|
-
cols.get_range(column_index).style_index = @workbook.modify_border(get_col_style(column_index), direction, weight)
|
|
339
|
-
|
|
340
|
-
sheet_data.rows.each { |row|
|
|
341
|
-
c = row.cells[column_index]
|
|
342
|
-
c.change_border(direction, weight) unless c.nil?
|
|
343
|
-
}
|
|
344
|
-
end
|
|
345
|
-
|
|
346
130
|
# merges cells within a rectangular range
|
|
347
131
|
def merge_cells(row1 = 0, col1 = 0, row2 = 0, col2 = 0)
|
|
348
132
|
validate_workbook
|
|
@@ -370,7 +154,7 @@ module LegacyWorksheet
|
|
|
370
154
|
c.datatype = RubyXL::DataType::RAW_STRING unless formula || data.is_a?(Numeric)
|
|
371
155
|
c.formula = RubyXL::Formula.new(:expression => formula) if formula
|
|
372
156
|
|
|
373
|
-
range = cols && cols.
|
|
157
|
+
range = cols && cols.locate_range(column)
|
|
374
158
|
c.style_index = sheet_data.rows[row].style_index || (range && range.style_index) || 0
|
|
375
159
|
|
|
376
160
|
sheet_data.rows[row].cells[column] = c
|
|
@@ -443,7 +227,7 @@ module LegacyWorksheet
|
|
|
443
227
|
}
|
|
444
228
|
}
|
|
445
229
|
|
|
446
|
-
cols.
|
|
230
|
+
cols.each { |range| range.delete_column(column_index) }
|
|
447
231
|
end
|
|
448
232
|
|
|
449
233
|
# Inserts column at +column_index+, pushes everything right, takes styles from column to left
|
|
@@ -524,166 +308,6 @@ module LegacyWorksheet
|
|
|
524
308
|
return cell
|
|
525
309
|
end
|
|
526
310
|
|
|
527
|
-
def get_row_fill(row = 0)
|
|
528
|
-
(row = sheet_data.rows[row]) && row.get_fill_color
|
|
529
|
-
end
|
|
530
|
-
|
|
531
|
-
def get_row_font_name(row = 0)
|
|
532
|
-
(font = row_font(row)) && font.get_name
|
|
533
|
-
end
|
|
534
|
-
|
|
535
|
-
def get_row_font_size(row = 0)
|
|
536
|
-
(font = row_font(row)) && font.get_size
|
|
537
|
-
end
|
|
538
|
-
|
|
539
|
-
def get_row_font_color(row = 0)
|
|
540
|
-
font = row_font(row)
|
|
541
|
-
color = font && font.color
|
|
542
|
-
color && (color.rgb || '000000')
|
|
543
|
-
end
|
|
544
|
-
|
|
545
|
-
def is_row_italicized(row = 0)
|
|
546
|
-
(font = row_font(row)) && font.is_italic
|
|
547
|
-
end
|
|
548
|
-
|
|
549
|
-
def is_row_bolded(row = 0)
|
|
550
|
-
(font = row_font(row)) && font.is_bold
|
|
551
|
-
end
|
|
552
|
-
|
|
553
|
-
def is_row_underlined(row = 0)
|
|
554
|
-
(font = row_font(row)) && font.is_underlined
|
|
555
|
-
end
|
|
556
|
-
|
|
557
|
-
def is_row_struckthrough(row = 0)
|
|
558
|
-
(font = row_font(row)) && font.is_strikethrough
|
|
559
|
-
end
|
|
560
|
-
|
|
561
|
-
def get_row_height(row = 0)
|
|
562
|
-
validate_workbook
|
|
563
|
-
validate_nonnegative(row)
|
|
564
|
-
return nil unless row_exists(row)
|
|
565
|
-
row = sheet_data.rows[row]
|
|
566
|
-
row && row.ht || 13
|
|
567
|
-
end
|
|
568
|
-
|
|
569
|
-
def get_row_horizontal_alignment(row = 0)
|
|
570
|
-
return get_row_alignment(row, true)
|
|
571
|
-
end
|
|
572
|
-
|
|
573
|
-
def get_row_vertical_alignment(row = 0)
|
|
574
|
-
return get_row_alignment(row, false)
|
|
575
|
-
end
|
|
576
|
-
|
|
577
|
-
def get_row_border_top(row = 0)
|
|
578
|
-
return get_row_border(row, :top)
|
|
579
|
-
end
|
|
580
|
-
|
|
581
|
-
def get_row_border_left(row = 0)
|
|
582
|
-
return get_row_border(row, :left)
|
|
583
|
-
end
|
|
584
|
-
|
|
585
|
-
def get_row_border_right(row = 0)
|
|
586
|
-
return get_row_border(row, :right)
|
|
587
|
-
end
|
|
588
|
-
|
|
589
|
-
def get_row_border_bottom(row = 0)
|
|
590
|
-
return get_row_border(row, :bottom)
|
|
591
|
-
end
|
|
592
|
-
|
|
593
|
-
def get_row_border_diagonal(row = 0)
|
|
594
|
-
return get_row_border(row, :diagonal)
|
|
595
|
-
end
|
|
596
|
-
|
|
597
|
-
def get_column_font_name(col = 0)
|
|
598
|
-
font = column_font(col)
|
|
599
|
-
font && font.get_name
|
|
600
|
-
end
|
|
601
|
-
|
|
602
|
-
def get_column_font_size(col = 0)
|
|
603
|
-
font = column_font(col)
|
|
604
|
-
font && font.get_size
|
|
605
|
-
end
|
|
606
|
-
|
|
607
|
-
def get_column_font_color(col = 0)
|
|
608
|
-
font = column_font(col)
|
|
609
|
-
font && (font.get_rgb_color || '000000')
|
|
610
|
-
end
|
|
611
|
-
|
|
612
|
-
def is_column_italicized(col = 0)
|
|
613
|
-
font = column_font(col)
|
|
614
|
-
font && font.is_italic
|
|
615
|
-
end
|
|
616
|
-
|
|
617
|
-
def is_column_bolded(col = 0)
|
|
618
|
-
font = column_font(col)
|
|
619
|
-
font && font.is_bold
|
|
620
|
-
end
|
|
621
|
-
|
|
622
|
-
def is_column_underlined(col = 0)
|
|
623
|
-
font = column_font(col)
|
|
624
|
-
font && font.is_underlined
|
|
625
|
-
end
|
|
626
|
-
|
|
627
|
-
def is_column_struckthrough(col = 0)
|
|
628
|
-
font = column_font(col)
|
|
629
|
-
font && font.is_strikethrough
|
|
630
|
-
end
|
|
631
|
-
|
|
632
|
-
# Get raw column width value as stored in the file
|
|
633
|
-
def get_column_width_raw(column_index = 0)
|
|
634
|
-
validate_workbook
|
|
635
|
-
validate_nonnegative(column_index)
|
|
636
|
-
return nil unless column_exists(column_index)
|
|
637
|
-
|
|
638
|
-
range = cols.find(column_index)
|
|
639
|
-
range && range.width
|
|
640
|
-
end
|
|
641
|
-
|
|
642
|
-
# Get column width measured in number of digits, as per
|
|
643
|
-
# http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx
|
|
644
|
-
def get_column_width(column_index = 0)
|
|
645
|
-
width = get_column_width_raw(column_index)
|
|
646
|
-
return RubyXL::ColumnRange::DEFAULT_WIDTH if width.nil?
|
|
647
|
-
(width - (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)).round
|
|
648
|
-
end
|
|
649
|
-
|
|
650
|
-
def get_column_fill(col=0)
|
|
651
|
-
validate_workbook
|
|
652
|
-
validate_nonnegative(col)
|
|
653
|
-
return nil unless column_exists(col)
|
|
654
|
-
|
|
655
|
-
@workbook.get_fill_color(get_col_xf(col))
|
|
656
|
-
end
|
|
657
|
-
|
|
658
|
-
def get_column_horizontal_alignment(col=0)
|
|
659
|
-
get_column_alignment(col, :horizontal)
|
|
660
|
-
end
|
|
661
|
-
|
|
662
|
-
def get_column_vertical_alignment(col=0)
|
|
663
|
-
get_column_alignment(col, :vertical)
|
|
664
|
-
end
|
|
665
|
-
|
|
666
|
-
def get_column_border_top(col=0)
|
|
667
|
-
get_column_border(col, :top)
|
|
668
|
-
end
|
|
669
|
-
|
|
670
|
-
def get_column_border_left(col=0)
|
|
671
|
-
get_column_border(col, :left)
|
|
672
|
-
end
|
|
673
|
-
|
|
674
|
-
def get_column_border_right(col=0)
|
|
675
|
-
get_column_border(col, :right)
|
|
676
|
-
end
|
|
677
|
-
|
|
678
|
-
def get_column_border_bottom(col=0)
|
|
679
|
-
get_column_border(col, :bottom)
|
|
680
|
-
end
|
|
681
|
-
|
|
682
|
-
def get_column_border_diagonal(col=0)
|
|
683
|
-
get_column_border(col, :diagonal)
|
|
684
|
-
end
|
|
685
|
-
|
|
686
|
-
|
|
687
311
|
private
|
|
688
312
|
|
|
689
313
|
NAME = 0
|
|
@@ -759,7 +383,7 @@ module LegacyWorksheet
|
|
|
759
383
|
end
|
|
760
384
|
|
|
761
385
|
def get_cols_style_index(column_index)
|
|
762
|
-
range = cols.
|
|
386
|
+
range = cols.locate_range(column_index)
|
|
763
387
|
(range && range.style_index) || 0
|
|
764
388
|
end
|
|
765
389
|
|
|
@@ -823,7 +447,7 @@ module LegacyWorksheet
|
|
|
823
447
|
|
|
824
448
|
# Helper method to get the style index for a column
|
|
825
449
|
def get_col_style(column_index)
|
|
826
|
-
range = cols.
|
|
450
|
+
range = cols.locate_range(column_index)
|
|
827
451
|
(range && range.style_index) || 0
|
|
828
452
|
end
|
|
829
453
|
|
|
@@ -840,47 +464,13 @@ module LegacyWorksheet
|
|
|
840
464
|
@workbook.cell_xfs[get_row_style(row)]
|
|
841
465
|
end
|
|
842
466
|
|
|
843
|
-
def change_row_alignment(row,alignment,is_horizontal)
|
|
844
|
-
validate_workbook
|
|
845
|
-
validate_nonnegative(row)
|
|
846
|
-
ensure_cell_exists(row)
|
|
847
|
-
|
|
848
|
-
sheet_data.rows[row].style_index = @workbook.modify_alignment(get_row_style(row), is_horizontal, alignment)
|
|
849
|
-
|
|
850
|
-
sheet_data[row].cells.each { |c|
|
|
851
|
-
next if c.nil?
|
|
852
|
-
if is_horizontal then c.change_horizontal_alignment(alignment)
|
|
853
|
-
else c.change_vertical_alignment(alignment)
|
|
854
|
-
end
|
|
855
|
-
}
|
|
856
|
-
end
|
|
857
|
-
|
|
858
|
-
def change_column_alignment(column_index, alignment, is_horizontal)
|
|
859
|
-
validate_workbook
|
|
860
|
-
ensure_cell_exists(0, column_index)
|
|
861
|
-
|
|
862
|
-
cols.get_range(column_index).style_index = @workbook.modify_alignment(get_col_style(column_index), is_horizontal, alignment)
|
|
863
|
-
# Excel gets confused if width is not explicitly set for a column that had alignment changes
|
|
864
|
-
change_column_width(column_index) if get_column_width_raw(column_index).nil?
|
|
865
|
-
|
|
866
|
-
sheet_data.rows.each { |row|
|
|
867
|
-
c = row[column_index]
|
|
868
|
-
next if c.nil?
|
|
869
|
-
if is_horizontal
|
|
870
|
-
c.change_horizontal_alignment(alignment)
|
|
871
|
-
else
|
|
872
|
-
c.change_vertical_alignment(alignment)
|
|
873
|
-
end
|
|
874
|
-
}
|
|
875
|
-
end
|
|
876
|
-
|
|
877
467
|
def validate_nonnegative(row_or_col)
|
|
878
468
|
raise 'Row and Column arguments must be nonnegative' if row_or_col < 0
|
|
879
469
|
end
|
|
880
470
|
private :validate_nonnegative
|
|
881
471
|
|
|
882
472
|
def column_exists(col)
|
|
883
|
-
sheet_data.rows
|
|
473
|
+
sheet_data.rows.any? { |r| r && (r.cells.size > col) }
|
|
884
474
|
end
|
|
885
475
|
|
|
886
476
|
def row_exists(row)
|
data/rdoc/README_rdoc.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
|
|
7
|
-
<title>README - rubyXL 3.2.
|
|
7
|
+
<title>README - rubyXL 3.2.7</title>
|
|
8
8
|
|
|
9
9
|
<link href="./fonts.css" rel="stylesheet">
|
|
10
10
|
<link href="./rdoc.css" rel="stylesheet">
|
|
@@ -92,7 +92,9 @@
|
|
|
92
92
|
<li><a href="#label-Delete+Column">Delete Column</a>
|
|
93
93
|
<li><a href="#label-Insert+Cell">Insert Cell</a>
|
|
94
94
|
<li><a href="#label-Delete+Cell">Delete Cell</a>
|
|
95
|
+
<li><a href="#label-I%2FO">I/O</a>
|
|
95
96
|
<li><a href="#label-Writing">Writing</a>
|
|
97
|
+
<li><a href="#label-Streaming">Streaming</a>
|
|
96
98
|
<li><a href="#label-Miscellaneous">Miscellaneous</a>
|
|
97
99
|
<li><a href="#label-For+more+information">For more information</a>
|
|
98
100
|
<li><a href="#label-Contributing+to+rubyXL">Contributing to rubyXL</a>
|
|
@@ -373,11 +375,21 @@ have been moved, as the formulas do not adapt to the shifted cells</p>
|
|
|
373
375
|
worksheet.delete_cell(0, 0, :up) # Deletes A1, shifts contents of first column up
|
|
374
376
|
worksheet.delete_cell(0, 0) # Deletes A1, does not shift cells</pre>
|
|
375
377
|
|
|
378
|
+
<h2 id="label-I%2FO">I/O<span><a href="#label-I%2FO">¶</a> <a href="#documentation">↑</a></span></h2>
|
|
379
|
+
|
|
376
380
|
<h3 id="label-Writing">Writing<span><a href="#label-Writing">¶</a> <a href="#documentation">↑</a></span></h3>
|
|
377
381
|
|
|
378
382
|
<pre>workbook.write("path/to/desired/Excel/file.xlsx")</pre>
|
|
379
383
|
|
|
380
|
-
<h3 id="label-
|
|
384
|
+
<h3 id="label-Streaming">Streaming<span><a href="#label-Streaming">¶</a> <a href="#documentation">↑</a></span></h3>
|
|
385
|
+
|
|
386
|
+
<p>The gem can provide <code>StringIO</code> object containing the resulting
|
|
387
|
+
<code>xlsx</code> file, eliminating the need to save it to disk first. This
|
|
388
|
+
capability comes in handy for web servers.</p>
|
|
389
|
+
|
|
390
|
+
<pre>workbook.stream</pre>
|
|
391
|
+
|
|
392
|
+
<h2 id="label-Miscellaneous">Miscellaneous<span><a href="#label-Miscellaneous">¶</a> <a href="#documentation">↑</a></span></h2>
|
|
381
393
|
|
|
382
394
|
<pre>Reference.ind2ref(0,0) == 'A1' # Converts row and column index to Excel-style cell reference
|
|
383
395
|
Reference.ref2ind('A1') == [0, 0] # Converts Excel-style cell reference to row and column index</pre>
|
data/rdoc/RubyXL/AExtension.html
CHANGED
data/rdoc/RubyXL/Alignment.html
CHANGED
data/rdoc/RubyXL/Authors.html
CHANGED
data/rdoc/RubyXL/AutoFilter.html
CHANGED
data/rdoc/RubyXL/Border.html
CHANGED
data/rdoc/RubyXL/BorderEdge.html
CHANGED
data/rdoc/RubyXL/Borders.html
CHANGED
data/rdoc/RubyXL/Break.html
CHANGED