rubyXL 3.4.25 → 3.4.38
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 +24 -13
- data/.rubocop.yml +124 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +4 -2
- data/README.rdoc +24 -8
- data/VERSION +1 -1
- data/lib/rubyXL/convenience_methods/cell.rb +8 -7
- data/lib/rubyXL/convenience_methods/color.rb +6 -6
- data/lib/rubyXL/convenience_methods/workbook.rb +7 -7
- data/lib/rubyXL/convenience_methods/worksheet.rb +26 -6
- data/lib/rubyXL/objects/border.rb +6 -1
- data/lib/rubyXL/objects/cell_style.rb +1 -0
- data/lib/rubyXL/objects/color.rb +1 -1
- data/lib/rubyXL/objects/column_range.rb +16 -12
- data/lib/rubyXL/objects/document_properties.rb +1 -0
- data/lib/rubyXL/objects/external_links.rb +8 -0
- data/lib/rubyXL/objects/ooxml_object.rb +21 -17
- data/lib/rubyXL/objects/query_table.rb +4 -2
- data/lib/rubyXL/objects/reference.rb +56 -20
- data/lib/rubyXL/objects/relationships.rb +1 -1
- data/lib/rubyXL/objects/root.rb +1 -1
- data/lib/rubyXL/objects/shared_strings.rb +1 -1
- data/lib/rubyXL/objects/sheet_data.rb +11 -6
- data/lib/rubyXL/objects/storage.rb +6 -1
- data/lib/rubyXL/objects/stylesheet.rb +2 -3
- data/lib/rubyXL/objects/text.rb +3 -3
- data/lib/rubyXL/objects/theme.rb +15 -17
- data/lib/rubyXL/objects/workbook.rb +17 -9
- data/lib/rubyXL/objects/worksheet.rb +2 -2
- data/lib/rubyXL/worksheet.rb +11 -3
- data/rdoc/README_rdoc.html +536 -147
- data/rdoc/RubyXL/AExtension.html +605 -85
- data/rdoc/RubyXL/AExtensionStorageArea.html +493 -47
- data/rdoc/RubyXL/ActiveX.html +574 -74
- data/rdoc/RubyXL/ActiveXBinary.html +503 -49
- data/rdoc/RubyXL/AdjustHandleList.html +487 -47
- data/rdoc/RubyXL/Alignment.html +487 -47
- data/rdoc/RubyXL/AlternateContent.html +493 -47
- data/rdoc/RubyXL/AlternateUrls.html +539 -0
- data/rdoc/RubyXL/Authors.html +487 -47
- data/rdoc/RubyXL/AutoFilter.html +487 -47
- data/rdoc/RubyXL/AutoFilterColumn.html +487 -47
- data/rdoc/RubyXL/BinaryImageFile.html +510 -50
- data/rdoc/RubyXL/BodyProperties.html +487 -47
- data/rdoc/RubyXL/BooleanNode.html +493 -47
- data/rdoc/RubyXL/BooleanValue.html +493 -47
- data/rdoc/RubyXL/Border.html +640 -97
- data/rdoc/RubyXL/BorderEdge.html +578 -78
- data/rdoc/RubyXL/Borders.html +540 -68
- data/rdoc/RubyXL/Break.html +487 -47
- data/rdoc/RubyXL/BreakList.html +487 -47
- data/rdoc/RubyXL/CT_AdjPoint2D.html +487 -47
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +487 -47
- data/rdoc/RubyXL/CT_Backdrop.html +487 -47
- data/rdoc/RubyXL/CT_Bevel.html +487 -47
- data/rdoc/RubyXL/CT_BiLevelEffect.html +487 -47
- data/rdoc/RubyXL/CT_BlendEffect.html +487 -47
- data/rdoc/RubyXL/CT_Blip.html +487 -47
- data/rdoc/RubyXL/CT_BlipFillProperties.html +487 -47
- data/rdoc/RubyXL/CT_BlurEffect.html +487 -47
- data/rdoc/RubyXL/CT_Camera.html +487 -47
- data/rdoc/RubyXL/CT_Color.html +487 -47
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +487 -47
- data/rdoc/RubyXL/CT_ColorMapping.html +487 -47
- data/rdoc/RubyXL/CT_ColorScheme.html +487 -47
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +487 -47
- data/rdoc/RubyXL/CT_ConnectionSite.html +487 -47
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +487 -47
- data/rdoc/RubyXL/CT_DashStop.html +487 -47
- data/rdoc/RubyXL/CT_DashStopList.html +487 -47
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +487 -47
- data/rdoc/RubyXL/CT_DuotoneEffect.html +487 -47
- data/rdoc/RubyXL/CT_EffectContainer.html +487 -47
- data/rdoc/RubyXL/CT_EffectList.html +487 -47
- data/rdoc/RubyXL/CT_EffectReference.html +487 -47
- data/rdoc/RubyXL/CT_EffectStyleItem.html +487 -47
- data/rdoc/RubyXL/CT_EffectStyleList.html +487 -47
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +487 -47
- data/rdoc/RubyXL/CT_FillEffect.html +487 -47
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +487 -47
- data/rdoc/RubyXL/CT_FillStyleList.html +487 -47
- data/rdoc/RubyXL/CT_FlatText.html +487 -47
- data/rdoc/RubyXL/CT_FontCollection.html +487 -47
- data/rdoc/RubyXL/CT_FontReference.html +487 -47
- data/rdoc/RubyXL/CT_GeomGuideList.html +487 -47
- data/rdoc/RubyXL/CT_GlowEffect.html +487 -47
- data/rdoc/RubyXL/CT_GradientFillProperties.html +487 -47
- data/rdoc/RubyXL/CT_GradientStop.html +487 -47
- data/rdoc/RubyXL/CT_GradientStopList.html +487 -47
- data/rdoc/RubyXL/CT_HSLEffect.html +487 -47
- data/rdoc/RubyXL/CT_HslColor.html +487 -47
- data/rdoc/RubyXL/CT_Hyperlink.html +487 -47
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +487 -47
- data/rdoc/RubyXL/CT_LightRig.html +487 -47
- data/rdoc/RubyXL/CT_LineEndProperties.html +487 -47
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +487 -47
- data/rdoc/RubyXL/CT_LineProperties.html +487 -47
- data/rdoc/RubyXL/CT_LineStyleList.html +487 -47
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +487 -47
- data/rdoc/RubyXL/CT_LuminanceEffect.html +487 -47
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +487 -47
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +487 -47
- data/rdoc/RubyXL/CT_Path2D.html +487 -47
- data/rdoc/RubyXL/CT_Path2DArcTo.html +487 -47
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +487 -47
- data/rdoc/RubyXL/CT_Path2DList.html +487 -47
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +487 -47
- data/rdoc/RubyXL/CT_Path2DTo.html +487 -47
- data/rdoc/RubyXL/CT_PathShadeProperties.html +487 -47
- data/rdoc/RubyXL/CT_PatternFillProperties.html +487 -47
- data/rdoc/RubyXL/CT_Point3D.html +487 -47
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +487 -47
- data/rdoc/RubyXL/CT_PresetColor.html +487 -47
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +487 -47
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +487 -47
- data/rdoc/RubyXL/CT_PresetTextShape.html +487 -47
- data/rdoc/RubyXL/CT_ReflectionEffect.html +487 -47
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +487 -47
- data/rdoc/RubyXL/CT_RelativeRect.html +487 -47
- data/rdoc/RubyXL/CT_SRgbColor.html +487 -47
- data/rdoc/RubyXL/CT_ScRgbColor.html +487 -47
- data/rdoc/RubyXL/CT_Scene3D.html +487 -47
- data/rdoc/RubyXL/CT_SchemeColor.html +487 -47
- data/rdoc/RubyXL/CT_Shape3D.html +487 -47
- data/rdoc/RubyXL/CT_ShapeStyle.html +487 -47
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +487 -47
- data/rdoc/RubyXL/CT_SphereCoords.html +487 -47
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +487 -47
- data/rdoc/RubyXL/CT_StyleMatrix.html +487 -47
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +487 -47
- data/rdoc/RubyXL/CT_SupplementalFont.html +487 -47
- data/rdoc/RubyXL/CT_SystemColor.html +487 -47
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +487 -47
- data/rdoc/RubyXL/CT_TextBlipBullet.html +487 -47
- data/rdoc/RubyXL/CT_TextCharBullet.html +487 -47
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +487 -47
- data/rdoc/RubyXL/CT_TextFont.html +487 -47
- data/rdoc/RubyXL/CT_TextListStyle.html +487 -47
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +487 -47
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +487 -47
- data/rdoc/RubyXL/CT_TextSpacing.html +487 -47
- data/rdoc/RubyXL/CT_TextTabStop.html +487 -47
- data/rdoc/RubyXL/CT_TextTabStopList.html +487 -47
- data/rdoc/RubyXL/CT_TileInfoProperties.html +487 -47
- data/rdoc/RubyXL/CT_TintEffect.html +487 -47
- data/rdoc/RubyXL/CT_Transform2D.html +487 -47
- data/rdoc/RubyXL/CT_TransformEffect.html +487 -47
- data/rdoc/RubyXL/CT_Vector3D.html +487 -47
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +487 -47
- data/rdoc/RubyXL/CalculationChain.html +557 -71
- data/rdoc/RubyXL/CalculationChainCell.html +487 -47
- data/rdoc/RubyXL/CalculationProperties.html +487 -47
- data/rdoc/RubyXL/Cell.html +1033 -200
- data/rdoc/RubyXL/CellConvenienceMethods.html +1667 -382
- data/rdoc/RubyXL/CellExt.html +487 -47
- data/rdoc/RubyXL/CellSmartTag.html +487 -47
- data/rdoc/RubyXL/CellSmartTagProperty.html +487 -47
- data/rdoc/RubyXL/CellSmartTags.html +487 -47
- data/rdoc/RubyXL/CellStyle.html +487 -47
- data/rdoc/RubyXL/CellStyleXFs.html +540 -68
- data/rdoc/RubyXL/CellStyles.html +540 -68
- data/rdoc/RubyXL/CellValue.html +540 -68
- data/rdoc/RubyXL/CellWatch.html +487 -47
- data/rdoc/RubyXL/CellWatches.html +487 -47
- data/rdoc/RubyXL/CellXFs.html +542 -71
- data/rdoc/RubyXL/ChartColorsFile.html +510 -50
- data/rdoc/RubyXL/ChartFile.html +581 -75
- data/rdoc/RubyXL/ChartStyleFile.html +510 -50
- data/rdoc/RubyXL/ChartUserShapesFile.html +510 -50
- data/rdoc/RubyXL/Chartsheet.html +624 -92
- data/rdoc/RubyXL/ChartsheetPageSetup.html +487 -47
- data/rdoc/RubyXL/ChartsheetProperties.html +487 -47
- data/rdoc/RubyXL/ChartsheetProtection.html +487 -47
- data/rdoc/RubyXL/ChartsheetView.html +487 -47
- data/rdoc/RubyXL/ChartsheetViews.html +487 -47
- data/rdoc/RubyXL/Color.html +550 -70
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +626 -94
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +671 -105
- data/rdoc/RubyXL/ColorConvenienceClasses.html +482 -45
- data/rdoc/RubyXL/ColorConvenienceMethods.html +534 -65
- data/rdoc/RubyXL/ColorFilter.html +487 -47
- data/rdoc/RubyXL/ColorScale.html +487 -47
- data/rdoc/RubyXL/ColorSet.html +487 -47
- data/rdoc/RubyXL/Colors.html +487 -47
- data/rdoc/RubyXL/ColumnRange.html +685 -92
- data/rdoc/RubyXL/ColumnRanges.html +646 -102
- data/rdoc/RubyXL/Comment.html +487 -47
- data/rdoc/RubyXL/CommentList.html +487 -47
- data/rdoc/RubyXL/CommentsFile.html +570 -76
- data/rdoc/RubyXL/ConditionalFormatValue.html +487 -47
- data/rdoc/RubyXL/ConditionalFormatting.html +487 -47
- data/rdoc/RubyXL/ConditionalFormattingRule.html +487 -47
- data/rdoc/RubyXL/Connection.html +487 -47
- data/rdoc/RubyXL/ConnectionTable.html +487 -47
- data/rdoc/RubyXL/ConnectionTables.html +487 -47
- data/rdoc/RubyXL/ConnectionTextField.html +487 -47
- data/rdoc/RubyXL/ConnectionTextFields.html +487 -47
- data/rdoc/RubyXL/Connections.html +557 -71
- data/rdoc/RubyXL/ContentTypeDefault.html +493 -47
- data/rdoc/RubyXL/ContentTypeOverride.html +493 -47
- data/rdoc/RubyXL/ContentTypes.html +595 -81
- data/rdoc/RubyXL/ControlPropertiesFile.html +510 -50
- data/rdoc/RubyXL/CorePropertiesFile.html +825 -149
- data/rdoc/RubyXL/CustomColor.html +487 -47
- data/rdoc/RubyXL/CustomColorList.html +487 -47
- data/rdoc/RubyXL/CustomFilter.html +487 -47
- data/rdoc/RubyXL/CustomFilters.html +487 -47
- data/rdoc/RubyXL/CustomGeometry.html +487 -47
- data/rdoc/RubyXL/CustomProperties.html +487 -47
- data/rdoc/RubyXL/CustomPropertiesFile.html +510 -50
- data/rdoc/RubyXL/CustomProperty.html +487 -47
- data/rdoc/RubyXL/CustomPropertyFile.html +510 -50
- data/rdoc/RubyXL/CustomSheetView.html +487 -47
- data/rdoc/RubyXL/CustomSheetViews.html +487 -47
- data/rdoc/RubyXL/CustomWorkbookView.html +487 -47
- data/rdoc/RubyXL/CustomWorkbookViews.html +487 -47
- data/rdoc/RubyXL/CustomXMLFile.html +503 -49
- data/rdoc/RubyXL/DXF.html +487 -47
- data/rdoc/RubyXL/DXFs.html +487 -47
- data/rdoc/RubyXL/DataBar.html +487 -47
- data/rdoc/RubyXL/DataConsolidate.html +487 -47
- data/rdoc/RubyXL/DataConsolidationReference.html +487 -47
- data/rdoc/RubyXL/DataConsolidationReferences.html +487 -47
- data/rdoc/RubyXL/DataType.html +528 -53
- data/rdoc/RubyXL/DataValidation.html +487 -47
- data/rdoc/RubyXL/DataValidations.html +487 -47
- data/rdoc/RubyXL/DateGroupItem.html +487 -47
- data/rdoc/RubyXL/DefinedName.html +487 -47
- data/rdoc/RubyXL/DefinedNameExt.html +487 -47
- data/rdoc/RubyXL/DefinedNames.html +564 -47
- data/rdoc/RubyXL/DefinedNamesExt.html +487 -47
- data/rdoc/RubyXL/DocumentPropertiesFile.html +603 -86
- data/rdoc/RubyXL/DrawingFile.html +581 -75
- data/rdoc/RubyXL/DynamicFilter.html +487 -47
- data/rdoc/RubyXL/EmbeddedControl.html +487 -47
- data/rdoc/RubyXL/EmbeddedControls.html +487 -47
- data/rdoc/RubyXL/Extension.html +487 -47
- data/rdoc/RubyXL/ExtensionStorageArea.html +487 -47
- data/rdoc/RubyXL/Extents.html +487 -47
- data/rdoc/RubyXL/ExternalBook.html +487 -47
- data/rdoc/RubyXL/ExternalLinksFile.html +581 -75
- data/rdoc/RubyXL/ExternalReference.html +487 -47
- data/rdoc/RubyXL/ExternalReferences.html +487 -47
- data/rdoc/RubyXL/ExtraColorSchemeList.html +487 -47
- data/rdoc/RubyXL/FieldItem.html +487 -47
- data/rdoc/RubyXL/FileRecoveryProperties.html +487 -47
- data/rdoc/RubyXL/FileSharing.html +487 -47
- data/rdoc/RubyXL/FileVersion.html +487 -47
- data/rdoc/RubyXL/Fill.html +540 -68
- data/rdoc/RubyXL/Fills.html +540 -68
- data/rdoc/RubyXL/FilterContainer.html +487 -47
- data/rdoc/RubyXL/FloatNode.html +493 -47
- data/rdoc/RubyXL/FloatValue.html +493 -47
- data/rdoc/RubyXL/Font.html +551 -71
- data/rdoc/RubyXL/FontConvenienceMethods.html +938 -183
- data/rdoc/RubyXL/FontScheme.html +487 -47
- data/rdoc/RubyXL/Fonts.html +540 -68
- data/rdoc/RubyXL/Formula.html +487 -47
- data/rdoc/RubyXL/FunctionGroup.html +487 -47
- data/rdoc/RubyXL/FunctionGroups.html +487 -47
- data/rdoc/RubyXL/GenericStorageObject.html +671 -103
- data/rdoc/RubyXL/GradientFill.html +487 -47
- data/rdoc/RubyXL/HeaderFooterSettings.html +487 -47
- data/rdoc/RubyXL/Hyperlink.html +487 -47
- data/rdoc/RubyXL/HyperlinkRelFile.html +503 -49
- data/rdoc/RubyXL/Hyperlinks.html +487 -47
- data/rdoc/RubyXL/IconFilter.html +487 -47
- data/rdoc/RubyXL/IconSet.html +487 -47
- data/rdoc/RubyXL/IgnoredError.html +487 -47
- data/rdoc/RubyXL/IgnoredErrors.html +487 -47
- data/rdoc/RubyXL/IndexedColors.html +487 -47
- data/rdoc/RubyXL/InputCells.html +487 -47
- data/rdoc/RubyXL/IntegerNode.html +493 -47
- data/rdoc/RubyXL/IntegerValue.html +493 -47
- data/rdoc/RubyXL/LegacyCell.html +534 -65
- data/rdoc/RubyXL/LegacyWorksheet.html +727 -114
- data/rdoc/RubyXL/MRUColors.html +487 -47
- data/rdoc/RubyXL/MacrosFile.html +510 -50
- data/rdoc/RubyXL/MergedCell.html +487 -47
- data/rdoc/RubyXL/MergedCells.html +487 -47
- data/rdoc/RubyXL/NumFmt.html +487 -47
- data/rdoc/RubyXL/NumberFormat.html +540 -68
- data/rdoc/RubyXL/NumberFormats.html +551 -71
- data/rdoc/RubyXL/OLEObject.html +487 -47
- data/rdoc/RubyXL/OLEObjectFile.html +510 -50
- data/rdoc/RubyXL/OLEObjects.html +487 -47
- data/rdoc/RubyXL/OLESize.html +487 -47
- data/rdoc/RubyXL/OOXMLContainerObject.html +756 -137
- data/rdoc/RubyXL/OOXMLIgnored.html +598 -80
- data/rdoc/RubyXL/OOXMLObject.html +506 -52
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +741 -151
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +834 -169
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +894 -170
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +735 -131
- data/rdoc/RubyXL/OdbcOleDbProperties.html +487 -47
- data/rdoc/RubyXL/Offset.html +487 -47
- data/rdoc/RubyXL/OlapProperties.html +487 -47
- data/rdoc/RubyXL/OleItem.html +487 -47
- data/rdoc/RubyXL/OleItems.html +487 -47
- data/rdoc/RubyXL/OleLink.html +487 -47
- data/rdoc/RubyXL/OutlineProperties.html +487 -47
- data/rdoc/RubyXL/PageMargins.html +487 -47
- data/rdoc/RubyXL/PageSetup.html +487 -47
- data/rdoc/RubyXL/PageSetupProperties.html +487 -47
- data/rdoc/RubyXL/Pane.html +487 -47
- data/rdoc/RubyXL/Parser.html +578 -78
- data/rdoc/RubyXL/PatternFill.html +487 -47
- data/rdoc/RubyXL/PersonMetadata.html +568 -0
- data/rdoc/RubyXL/PhoneticProperties.html +487 -47
- data/rdoc/RubyXL/PhoneticRun.html +487 -47
- data/rdoc/RubyXL/PivotArea.html +487 -47
- data/rdoc/RubyXL/PivotCache.html +487 -47
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +529 -55
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +510 -50
- data/rdoc/RubyXL/PivotCaches.html +487 -47
- data/rdoc/RubyXL/PivotReference.html +487 -47
- data/rdoc/RubyXL/PivotReferences.html +487 -47
- data/rdoc/RubyXL/PivotTableFile.html +529 -55
- data/rdoc/RubyXL/PivotTableSelection.html +487 -47
- data/rdoc/RubyXL/PresetGeometry.html +487 -47
- data/rdoc/RubyXL/PrintOptions.html +487 -47
- data/rdoc/RubyXL/PrinterSettingsFile.html +510 -50
- data/rdoc/RubyXL/ProtectedRange.html +487 -47
- data/rdoc/RubyXL/ProtectedRanges.html +487 -47
- data/rdoc/RubyXL/Protection.html +487 -47
- data/rdoc/RubyXL/QueryParameter.html +487 -47
- data/rdoc/RubyXL/QueryParameters.html +487 -47
- data/rdoc/RubyXL/QueryTable.html +575 -75
- data/rdoc/RubyXL/QueryTableDeletedField.html +487 -47
- data/rdoc/RubyXL/QueryTableDeletedFields.html +487 -47
- data/rdoc/RubyXL/QueryTableField.html +487 -47
- data/rdoc/RubyXL/QueryTableFields.html +487 -47
- data/rdoc/RubyXL/QueryTableRefresh.html +487 -47
- data/rdoc/RubyXL/RID.html +493 -47
- data/rdoc/RubyXL/RawOOXML.html +605 -85
- data/rdoc/RubyXL/Reference.html +1109 -207
- data/rdoc/RubyXL/Relationship.html +493 -47
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +540 -65
- data/rdoc/RubyXL/RelationshipSupport.html +745 -126
- data/rdoc/RubyXL/RevisionPointer.html +487 -47
- data/rdoc/RubyXL/RichText.html +542 -70
- data/rdoc/RubyXL/RichTextRun.html +540 -68
- data/rdoc/RubyXL/Row.html +812 -148
- data/rdoc/RubyXL/RowExt.html +487 -47
- data/rdoc/RubyXL/RunProperties.html +487 -47
- data/rdoc/RubyXL/Scenario.html +487 -47
- data/rdoc/RubyXL/Scenarios.html +487 -47
- data/rdoc/RubyXL/Selection.html +540 -68
- data/rdoc/RubyXL/ShapeGuide.html +487 -47
- data/rdoc/RubyXL/ShapeTextRectangle.html +487 -47
- data/rdoc/RubyXL/SharedStringsTable.html +775 -137
- data/rdoc/RubyXL/Sheet.html +487 -47
- data/rdoc/RubyXL/SheetCalculationProperties.html +487 -47
- data/rdoc/RubyXL/SheetData.html +572 -78
- data/rdoc/RubyXL/SheetDataExt.html +487 -47
- data/rdoc/RubyXL/SheetDataSet.html +487 -47
- data/rdoc/RubyXL/SheetMetadata.html +510 -50
- data/rdoc/RubyXL/SheetName.html +487 -47
- data/rdoc/RubyXL/SheetNames.html +487 -47
- data/rdoc/RubyXL/Sheets.html +487 -47
- data/rdoc/RubyXL/SlicerCacheFile.html +510 -50
- data/rdoc/RubyXL/SlicerFile.html +510 -50
- data/rdoc/RubyXL/SmartTagProperties.html +487 -47
- data/rdoc/RubyXL/SmartTagType.html +487 -47
- data/rdoc/RubyXL/SmartTagTypes.html +487 -47
- data/rdoc/RubyXL/SmartTags.html +487 -47
- data/rdoc/RubyXL/SortCondition.html +487 -47
- data/rdoc/RubyXL/SortState.html +487 -47
- data/rdoc/RubyXL/Sqref.html +599 -81
- data/rdoc/RubyXL/Stop.html +487 -47
- data/rdoc/RubyXL/StringNode.html +493 -47
- data/rdoc/RubyXL/StringNodeW3C.html +598 -80
- data/rdoc/RubyXL/StringValue.html +493 -47
- data/rdoc/RubyXL/Stylesheet.html +707 -114
- data/rdoc/RubyXL/TableFile.html +510 -50
- data/rdoc/RubyXL/TableParts.html +493 -47
- data/rdoc/RubyXL/TableStyle.html +487 -47
- data/rdoc/RubyXL/TableStyles.html +487 -47
- data/rdoc/RubyXL/Text.html +591 -83
- data/rdoc/RubyXL/TextImportSettings.html +487 -47
- data/rdoc/RubyXL/Theme.html +651 -103
- data/rdoc/RubyXL/ThemeElements.html +487 -47
- data/rdoc/RubyXL/ThumbnailFile.html +510 -50
- data/rdoc/RubyXL/Top10.html +487 -47
- data/rdoc/RubyXL/VMLDrawingFile.html +530 -56
- data/rdoc/RubyXL/Variant.html +487 -47
- data/rdoc/RubyXL/Vector.html +540 -68
- data/rdoc/RubyXL/VectorValue.html +493 -47
- data/rdoc/RubyXL/VisualProperties.html +487 -47
- data/rdoc/RubyXL/WebPublishObject.html +487 -47
- data/rdoc/RubyXL/WebPublishObjects.html +487 -47
- data/rdoc/RubyXL/WebPublishingItem.html +487 -47
- data/rdoc/RubyXL/WebPublishingItems.html +487 -47
- data/rdoc/RubyXL/WebPublishingProperties.html +487 -47
- data/rdoc/RubyXL/WebQueryProperties.html +487 -47
- data/rdoc/RubyXL/Workbook.html +1560 -367
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1069 -226
- data/rdoc/RubyXL/WorkbookProperties.html +487 -47
- data/rdoc/RubyXL/WorkbookProtection.html +487 -47
- data/rdoc/RubyXL/WorkbookRoot.html +741 -123
- data/rdoc/RubyXL/WorkbookView.html +487 -47
- data/rdoc/RubyXL/WorkbookViews.html +487 -47
- data/rdoc/RubyXL/Worksheet.html +840 -154
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2725 -699
- data/rdoc/RubyXL/WorksheetDimensions.html +487 -47
- data/rdoc/RubyXL/WorksheetFormatProperties.html +493 -47
- data/rdoc/RubyXL/WorksheetProperties.html +487 -47
- data/rdoc/RubyXL/WorksheetProtection.html +487 -47
- data/rdoc/RubyXL/WorksheetView.html +487 -47
- data/rdoc/RubyXL/WorksheetViews.html +487 -47
- data/rdoc/RubyXL/XF.html +487 -47
- data/rdoc/RubyXL.html +1200 -163
- data/rdoc/created.rid +38 -38
- data/rdoc/css/rdoc.css +1670 -354
- data/rdoc/index.html +418 -433
- data/rdoc/js/aliki.js +511 -0
- data/rdoc/js/bash_highlighter.js +167 -0
- data/rdoc/js/c_highlighter.js +299 -0
- data/rdoc/js/{search.js → search_controller.js} +31 -12
- data/rdoc/js/search_data.js +1 -0
- data/rdoc/js/{navigation.js → search_navigation.js} +10 -10
- data/rdoc/js/search_ranker.js +239 -0
- data/rdoc/js/theme-toggle.js +112 -0
- data/rubyXL.gemspec +27 -70
- data/spec/lib/cell_spec.rb +56 -4
- data/spec/lib/color_spec.rb +7 -0
- data/spec/lib/parser_spec.rb +8 -5
- data/spec/lib/reference_spec.rb +69 -6
- data/spec/lib/rgb_color_spec.rb +2 -0
- data/spec/lib/stylesheet_spec.rb +2 -0
- data/spec/lib/text_spec.rb +3 -1
- data/spec/lib/workbook_spec.rb +6 -4
- data/spec/lib/worksheet_spec.rb +29 -17
- metadata +31 -47
- data/Gemfile.lock +0 -124
- data/rdoc/css/fonts.css +0 -167
- data/rdoc/fonts/Lato-Light.ttf +0 -0
- data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/js/darkfish.js +0 -84
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search_index.js +0 -1
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +0 -229
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +0 -3010
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 653d773015a0aca3439878d0e16a4e91517cf07cf3c3a0ff62d72c56ebd307b6
|
|
4
|
+
data.tar.gz: 7c58595e70a5be7e8ae8f9ecb5ced1eea4721a78f62653bd494b82ef5957d19f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 216a635924307eb9180227ecda2b3817786985b40987826a74f031e7b99a4dba045d9fb97e6e5fedb5ffb87544c75852d82300f2a652627ecae7ad5f224f0802
|
|
7
|
+
data.tar.gz: f7ec19093979640748284eda348c6bf49de9543003ef63e6454fc8e04c4fdcf06ef8a52ce45c09d8dbb60f7b00435884351412f98e83de7c1538829842756fc7
|
data/.circleci/config.yml
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
|
4
4
|
#
|
|
5
|
-
version: 2
|
|
5
|
+
version: 2.1
|
|
6
|
+
|
|
6
7
|
jobs:
|
|
7
8
|
build:
|
|
9
|
+
parameters:
|
|
10
|
+
ruby-version:
|
|
11
|
+
type: string
|
|
8
12
|
docker:
|
|
9
|
-
|
|
10
|
-
- image: circleci/ruby:2.6.6-buster
|
|
13
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
|
11
14
|
|
|
12
15
|
# Specify service dependencies here if necessary
|
|
13
16
|
# CircleCI maintains a library of pre-built images
|
|
@@ -20,22 +23,22 @@ jobs:
|
|
|
20
23
|
- checkout
|
|
21
24
|
|
|
22
25
|
# Download and cache dependencies
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
#- restore_cache:
|
|
27
|
+
# keys:
|
|
28
|
+
# - v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
29
|
+
# # fallback to using the latest cache if no exact match is found
|
|
30
|
+
# - v1-dependencies-
|
|
28
31
|
|
|
29
32
|
- run:
|
|
30
33
|
name: install dependencies
|
|
31
34
|
command: |
|
|
32
35
|
gem install bundler
|
|
33
|
-
bundle install --jobs=4 --retry=3
|
|
36
|
+
bundle install --jobs=4 --retry=3
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
#- save_cache:
|
|
39
|
+
# paths:
|
|
40
|
+
# - ./vendor/bundle
|
|
41
|
+
# key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
39
42
|
|
|
40
43
|
# run tests!
|
|
41
44
|
- run:
|
|
@@ -58,3 +61,11 @@ jobs:
|
|
|
58
61
|
- store_artifacts:
|
|
59
62
|
path: /tmp/test-results
|
|
60
63
|
destination: test-results
|
|
64
|
+
|
|
65
|
+
workflows:
|
|
66
|
+
test:
|
|
67
|
+
jobs:
|
|
68
|
+
- build:
|
|
69
|
+
matrix:
|
|
70
|
+
parameters:
|
|
71
|
+
ruby-version: ["3.0", "3.1", "3.2", "3.3", "3.4", "4.0"]
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#inherit_from: .rubocop_todo.yml
|
|
2
|
+
|
|
3
|
+
#require:
|
|
4
|
+
# - rubocop-rspec
|
|
5
|
+
|
|
6
|
+
AllCops:
|
|
7
|
+
NewCops: enable
|
|
8
|
+
SuggestExtensions: false
|
|
9
|
+
TargetRubyVersion: 2.6
|
|
10
|
+
DisplayCopNames: true
|
|
11
|
+
DisplayStyleGuide: true
|
|
12
|
+
Exclude:
|
|
13
|
+
- test/**/*
|
|
14
|
+
- tmp/*
|
|
15
|
+
- vendor/**/*
|
|
16
|
+
- Gemfile
|
|
17
|
+
- rubyXL.gemspec
|
|
18
|
+
|
|
19
|
+
# "Excessive" parentheses are your friend. You will understand it in time, Luke.
|
|
20
|
+
Style/TernaryParentheses:
|
|
21
|
+
Enabled: false
|
|
22
|
+
|
|
23
|
+
# Implicity is evil. Unwilingness to type a couple extra characters is laziness.
|
|
24
|
+
Style/RedundantConstantBase:
|
|
25
|
+
Enabled: false
|
|
26
|
+
|
|
27
|
+
# I don't see a good reason in this. Unless you are paid per line.
|
|
28
|
+
Style/CommentedKeyword:
|
|
29
|
+
Enabled: false
|
|
30
|
+
|
|
31
|
+
# Yes, some things are "redundant" but they are there exactly to drive home some point...
|
|
32
|
+
Style/RedundantSelf:
|
|
33
|
+
Enabled: false
|
|
34
|
+
|
|
35
|
+
Naming/AccessorMethodName:
|
|
36
|
+
Enabled: false
|
|
37
|
+
|
|
38
|
+
Layout/FirstArrayElementIndentation:
|
|
39
|
+
Enabled: false
|
|
40
|
+
|
|
41
|
+
Style/Documentation:
|
|
42
|
+
Enabled: false
|
|
43
|
+
|
|
44
|
+
Layout/LeadingCommentSpace:
|
|
45
|
+
Enabled: false
|
|
46
|
+
|
|
47
|
+
Style/BlockDelimiters:
|
|
48
|
+
Enabled: false
|
|
49
|
+
|
|
50
|
+
Style/HashSyntax:
|
|
51
|
+
Enabled: false
|
|
52
|
+
|
|
53
|
+
Style/MultilineIfThen:
|
|
54
|
+
Enabled: false
|
|
55
|
+
|
|
56
|
+
Style/ParenthesesAroundCondition:
|
|
57
|
+
Enabled: false
|
|
58
|
+
|
|
59
|
+
Style/MultilineWhenThen:
|
|
60
|
+
Enabled: false
|
|
61
|
+
|
|
62
|
+
Style/RedundantPercentQ:
|
|
63
|
+
Enabled: false
|
|
64
|
+
|
|
65
|
+
Style/PercentLiteralDelimiters:
|
|
66
|
+
Enabled: false
|
|
67
|
+
|
|
68
|
+
Style/NumericLiterals:
|
|
69
|
+
Enabled: false
|
|
70
|
+
|
|
71
|
+
Style/ExponentialNotation:
|
|
72
|
+
Enabled: false
|
|
73
|
+
|
|
74
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
|
75
|
+
EnforcedStyle: space
|
|
76
|
+
Enabled: false
|
|
77
|
+
|
|
78
|
+
Layout/SpaceBeforeBlockBraces:
|
|
79
|
+
Enabled: false
|
|
80
|
+
|
|
81
|
+
Layout/EmptyLineAfterGuardClause:
|
|
82
|
+
Enabled: false
|
|
83
|
+
|
|
84
|
+
Naming/MethodParameterName:
|
|
85
|
+
Enabled: false
|
|
86
|
+
|
|
87
|
+
Naming/ClassAndModuleCamelCase:
|
|
88
|
+
Enabled: false
|
|
89
|
+
|
|
90
|
+
Naming/ConstantName:
|
|
91
|
+
Enabled: false
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Layout/HashAlignment:
|
|
96
|
+
EnforcedHashRocketStyle: table
|
|
97
|
+
|
|
98
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
|
99
|
+
Enabled: false
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
Metrics/BlockLength:
|
|
104
|
+
Enabled: false
|
|
105
|
+
|
|
106
|
+
Metrics/ClassLength:
|
|
107
|
+
Enabled: false
|
|
108
|
+
|
|
109
|
+
Metrics/MethodLength:
|
|
110
|
+
Enabled: false
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Metrics/PerceivedComplexity:
|
|
115
|
+
Enabled: false
|
|
116
|
+
|
|
117
|
+
Metrics/ParameterLists:
|
|
118
|
+
Enabled: false
|
|
119
|
+
|
|
120
|
+
Metrics/CyclomaticComplexity:
|
|
121
|
+
Enabled: false
|
|
122
|
+
|
|
123
|
+
Metrics/ModuleLength:
|
|
124
|
+
Enabled: false
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# v3.4.25 (May 19, 2022)
|
|
2
|
+
|
|
3
|
+
* Improve code style and consistently (@weshatheleopard)
|
|
4
|
+
* Update `Gemfile.lock`, dependency versions used when developing the gem (@weshatheleopard)
|
|
5
|
+
|
|
6
|
+
# v3.4.24 (May 16, 2022)
|
|
7
|
+
|
|
8
|
+
* Add `Cell#add_hyperlink` for adding a hyperlink to a cell (@weshatheleopard)
|
|
9
|
+
* Add `Reference#valid?` for checking if a cell reference is valid (@weshatheleopard)
|
|
10
|
+
* Add `Worksheet#cell_at` for finding a cell by its Excel-style reference (@weshatheleopard)
|
|
11
|
+
* Prevent creation of sheets with reserved names (specifically, `History`) (@weshatheleopard)
|
|
12
|
+
* Update `Gemfile.lock`, dependency versions used when developing the gem (@weshatheleopard)
|
data/Gemfile
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
source '
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
3
|
# Dependencies required to run this gem.
|
|
4
4
|
gem 'nokogiri', '>= 1.10.8'
|
|
5
|
-
gem 'rubyzip', '>=
|
|
5
|
+
gem 'rubyzip', '>= 3.2.2', require: 'zip'
|
|
6
6
|
|
|
7
7
|
# Development dependencies.
|
|
8
8
|
group :development, :test do
|
|
@@ -15,4 +15,6 @@ group :development, :test do
|
|
|
15
15
|
# gem 'stackprof'
|
|
16
16
|
gem 'ruby-prof'
|
|
17
17
|
gem 'rspec_junit_formatter'
|
|
18
|
+
|
|
19
|
+
gem 'rubocop'
|
|
18
20
|
end
|
data/README.rdoc
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
= rubyXL
|
|
2
|
-
{
|
|
3
|
-
{
|
|
4
|
-
{<img src="https://circleci.com/gh/weshatheleopard/rubyXL.svg?style=svg" alt="CircleCI" />}[https://circleci.com/gh/weshatheleopard/rubyXL]
|
|
2
|
+
{rdoc-image:https://badge.fury.io/rb/rubyXL.svg}[http://badge.fury.io/rb/rubyXL]
|
|
3
|
+
{rdoc-image:https://circleci.com/gh/weshatheleopard/rubyXL.svg?style=svg}[https://circleci.com/gh/weshatheleopard/rubyXL]
|
|
5
4
|
|
|
6
5
|
This gem supports operating on +xlsx+ files (Open XML format). While it is capable
|
|
7
6
|
of properly parsing the entire OOXML structure, its current main emphasis is on
|
|
@@ -119,6 +118,9 @@ Please note: these methods are being phased out in favor of the OOXML object mod
|
|
|
119
118
|
==== Changing Cells
|
|
120
119
|
worksheet[0][0].change_contents("", worksheet[0][0].formula) # Sets value of cell A1 to empty string, preserves formula
|
|
121
120
|
|
|
121
|
+
worksheet[0][0].add_shared_string('some text') # Creates a new Shared String and adds it to the cell.
|
|
122
|
+
# Later, the same Shared String can be added to other cells.
|
|
123
|
+
|
|
122
124
|
==== Changing Fonts
|
|
123
125
|
worksheet.sheet_data[0][0].change_font_bold(true) # Makes A1 bold
|
|
124
126
|
worksheet.change_row_italics(0,true) # Makes first row italicized
|
|
@@ -130,13 +132,25 @@ Please note: these methods are being phased out in favor of the OOXML object mod
|
|
|
130
132
|
worksheet.change_column_fill(0, '0ba53d') # Sets first column to have fill #0ba53d
|
|
131
133
|
|
|
132
134
|
==== Changing Borders
|
|
135
|
+
===== Border Styles
|
|
133
136
|
# Possible weights: hairline, thin, medium, thick
|
|
134
137
|
# Possible "directions": top, bottom, left, right, diagonal
|
|
135
|
-
worksheet.
|
|
138
|
+
cell = worksheet.add_cell(1, 1, 'B2')
|
|
139
|
+
cell.change_border(:top, 'thin') # Sets the cell to have a top, thin border
|
|
140
|
+
# Note that with diagonals, you have to specify which one of the diagonals (or both) you need.
|
|
141
|
+
cell.change_border( :diagonal, 'thick', [ :diagonal_down ]) # Sets A1 to have a thin diagonal going from top left to bottom right
|
|
142
|
+
# You can turn on both diagonals, but then they both will share the same style and color:
|
|
143
|
+
cell.change_border( :diagonal, 'thick', [ :diagonal_down, :diagonal_up ])
|
|
144
|
+
|
|
145
|
+
===== Border Colors
|
|
146
|
+
# Make sure you set the border style first so there's something to color.
|
|
147
|
+
cell.change_border_color(:top, '0ba53d') # Sets top border color to green
|
|
148
|
+
cell.change_border_color(:diagonal, 'dd0000') # Sets diaginal border color to red
|
|
149
|
+
|
|
150
|
+
===== Changing whole row or column
|
|
151
|
+
|
|
136
152
|
worksheet.change_row_border(0, :left, 'hairline') # Sets first row to have a left, hairline border
|
|
137
153
|
worksheet.change_column_border(0, :diagonal, 'medium') # Sets first column to have diagonal, medium border
|
|
138
|
-
|
|
139
|
-
# Set the border style first so there's something to color.
|
|
140
154
|
worksheet.change_row_border_color(0, :top, '0ba53d') # Sets first row to have a green top border
|
|
141
155
|
worksheet.change_column_border_color(0, :top, '0ba53d') # Sets first column to have a green top border
|
|
142
156
|
|
|
@@ -168,7 +182,9 @@ Please note: these methods are being phased out in favor of the OOXML object mod
|
|
|
168
182
|
worksheet.change_column_width(0, 30) # Sets first column width to 30
|
|
169
183
|
|
|
170
184
|
==== Merging Cells
|
|
171
|
-
worksheet.merge_cells(0,
|
|
185
|
+
worksheet.merge_cells(0, 1, 2, 3) # Merges B1:D3
|
|
186
|
+
worksheet.merge_cells('A2:C4') # Merges A2:C4
|
|
187
|
+
worksheet.merge_cells(row_from: 0, row_to: 1, col_from: 2, col_to: 3) # Merges C1:D2
|
|
172
188
|
|
|
173
189
|
==== Insert Row
|
|
174
190
|
This method will insert a row at specified index, pushing all rows below it down. It also copies styles from row above.
|
|
@@ -261,5 +277,5 @@ Take a look at the files in spec/lib/ for rspecs on most methods
|
|
|
261
277
|
|
|
262
278
|
== Copyright
|
|
263
279
|
|
|
264
|
-
Copyright (c) 2011 Vivek Bhagwat, 2013-
|
|
280
|
+
Copyright (c) 2011 Vivek Bhagwat, 2013-2026 Wesha.
|
|
265
281
|
See LICENSE.txt for further details.
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.4.
|
|
1
|
+
3.4.38
|
|
@@ -68,9 +68,9 @@ module RubyXL
|
|
|
68
68
|
self.style_index = workbook.modify_alignment(self.style_index) { |a| a.indent = indent }
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
def change_border(direction, weight)
|
|
71
|
+
def change_border(direction, weight, diagonals = nil)
|
|
72
72
|
validate_worksheet
|
|
73
|
-
self.style_index = workbook.modify_border(self.style_index, direction, weight)
|
|
73
|
+
self.style_index = workbook.modify_border(self.style_index, direction, weight, diagonals)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def change_border_color(direction, color)
|
|
@@ -116,7 +116,7 @@ module RubyXL
|
|
|
116
116
|
|
|
117
117
|
def fill_color
|
|
118
118
|
validate_worksheet
|
|
119
|
-
|
|
119
|
+
workbook.get_fill_color(get_cell_xf)
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
def horizontal_alignment
|
|
@@ -266,10 +266,11 @@ module RubyXL
|
|
|
266
266
|
worksheet.hyperlinks << hyperlink
|
|
267
267
|
end
|
|
268
268
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
def add_shared_string(str)
|
|
270
|
+
self.datatype = RubyXL::DataType::SHARED_STRING
|
|
271
|
+
workbook.shared_strings_container ||= RubyXL::SharedStringsTable.new
|
|
272
|
+
self.raw_value = workbook.shared_strings_container.add(str)
|
|
273
|
+
end
|
|
273
274
|
end
|
|
274
275
|
|
|
275
276
|
RubyXL::Cell.send(:include, RubyXL::CellConvenienceMethods) # ruby 2.1 compat
|
|
@@ -48,8 +48,8 @@ module RubyXL
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
hls_color.h = (g - b) / delta if (r == max)
|
|
51
|
-
hls_color.h = 2.0 + (b - r) / delta if (g == max)
|
|
52
|
-
hls_color.h = 4.0 + (r - g) / delta if (b == max)
|
|
51
|
+
hls_color.h = 2.0 + ((b - r) / delta) if (g == max)
|
|
52
|
+
hls_color.h = 4.0 + ((r - g) / delta) if (b == max)
|
|
53
53
|
|
|
54
54
|
hls_color.h *= 60;
|
|
55
55
|
hls_color.h += 360 if hls_color.h < 0
|
|
@@ -95,7 +95,7 @@ module RubyXL
|
|
|
95
95
|
t1 = l + s - (l * s)
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
t2 = 2.0 * l - t1;
|
|
98
|
+
t2 = (2.0 * l) - t1;
|
|
99
99
|
h = self.h / 360.0
|
|
100
100
|
|
|
101
101
|
t_r = h + (1.0 / 3.0)
|
|
@@ -124,11 +124,11 @@ module RubyXL
|
|
|
124
124
|
t3 -= 1.0 if (t3 > 1)
|
|
125
125
|
|
|
126
126
|
if (6.0 * t3 < 1) then
|
|
127
|
-
color = t2 + (t1 - t2) * 6.0 * t3;
|
|
127
|
+
color = t2 + ((t1 - t2) * 6.0 * t3);
|
|
128
128
|
elsif (2.0 * t3 < 1) then
|
|
129
129
|
color = t1;
|
|
130
130
|
elsif (3.0 * t3 < 2) then
|
|
131
|
-
color = t2 + (t1 - t2) * ((2.0 / 3.0) - t3) * 6.0;
|
|
131
|
+
color = t2 + ((t1 - t2) * ((2.0 / 3.0) - t3) * 6.0);
|
|
132
132
|
else
|
|
133
133
|
color = t2;
|
|
134
134
|
end
|
|
@@ -143,7 +143,7 @@ module RubyXL
|
|
|
143
143
|
if tint < 0 then
|
|
144
144
|
self.l = l * (1.0 + tint);
|
|
145
145
|
else
|
|
146
|
-
self.l = l * (1.0 - tint) + tint;
|
|
146
|
+
self.l = (l * (1.0 - tint)) + tint;
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
self
|
|
@@ -21,11 +21,7 @@ module RubyXL
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def get_fill_color(xf)
|
|
24
|
-
|
|
25
|
-
pattern = fill && fill.pattern_fill
|
|
26
|
-
color = pattern && pattern.fg_color
|
|
27
|
-
color = color && color.get_rgb(self)
|
|
28
|
-
color && color.to_s || 'ffffff'
|
|
24
|
+
fills[xf.fill_id]&.pattern_fill&.fg_color&.get_rgb(self)&.to_s || 'ffffff'
|
|
29
25
|
end
|
|
30
26
|
|
|
31
27
|
def register_new_fill(new_fill, old_xf)
|
|
@@ -76,14 +72,14 @@ module RubyXL
|
|
|
76
72
|
register_new_xf(register_new_fill(new_fill, xf))
|
|
77
73
|
end
|
|
78
74
|
|
|
79
|
-
def modify_border(style_index, direction, weight)
|
|
75
|
+
def modify_border(style_index, direction, weight, diagonals = nil)
|
|
80
76
|
xf = cell_xfs[style_index || 0].dup
|
|
81
77
|
new_border = borders[xf.border_id || 0].dup
|
|
82
78
|
|
|
83
79
|
edge = new_border.send(direction)
|
|
84
80
|
new_border.send("#{direction}=", edge.dup) if edge
|
|
85
81
|
|
|
86
|
-
new_border.set_edge_style(direction, weight)
|
|
82
|
+
new_border.set_edge_style(direction, weight, diagonals)
|
|
87
83
|
|
|
88
84
|
xf.border_id = borders.find_index { |x| x == new_border } # Reuse existing border, if it exists
|
|
89
85
|
xf.border_id ||= borders.size # If this border has never existed before, add it to collection.
|
|
@@ -96,6 +92,10 @@ module RubyXL
|
|
|
96
92
|
def modify_border_color(style_index, direction, color)
|
|
97
93
|
xf = cell_xfs[style_index || 0].dup
|
|
98
94
|
new_border = borders[xf.border_id || 0].dup
|
|
95
|
+
|
|
96
|
+
edge = new_border.send(direction)
|
|
97
|
+
new_border.send("#{direction}=", edge.dup) if edge
|
|
98
|
+
|
|
99
99
|
new_border.set_edge_color(direction, color)
|
|
100
100
|
|
|
101
101
|
xf.border_id = borders.find_index { |x| x == new_border } # Reuse existing border, if it exists
|
|
@@ -206,10 +206,10 @@ module RubyXL
|
|
|
206
206
|
validate_nonnegative(column_index)
|
|
207
207
|
|
|
208
208
|
# Delete column
|
|
209
|
-
sheet_data.rows.each { |row| row
|
|
209
|
+
sheet_data.rows.each { |row| row&.cells&.delete_at(column_index) }
|
|
210
210
|
|
|
211
211
|
# Update column numbers for cells to the right of the deleted column
|
|
212
|
-
sheet_data.rows.
|
|
212
|
+
sheet_data.rows.each { |row|
|
|
213
213
|
next if row.nil?
|
|
214
214
|
row.cells.each_with_index { |c, ci|
|
|
215
215
|
c.column = ci if c.is_a?(Cell)
|
|
@@ -280,7 +280,7 @@ module RubyXL
|
|
|
280
280
|
validate_workbook
|
|
281
281
|
validate_nonnegative(row)
|
|
282
282
|
row = sheet_data.rows[row]
|
|
283
|
-
row && row.ht || RubyXL::Row::DEFAULT_HEIGHT
|
|
283
|
+
(row && row.ht) || RubyXL::Row::DEFAULT_HEIGHT
|
|
284
284
|
end
|
|
285
285
|
|
|
286
286
|
def get_row_border(row, border_direction)
|
|
@@ -382,7 +382,7 @@ module RubyXL
|
|
|
382
382
|
# Get column width measured in number of digits, as per
|
|
383
383
|
# http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx
|
|
384
384
|
def change_column_width(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)
|
|
385
|
-
change_column_width_raw(column_index,
|
|
385
|
+
change_column_width_raw(column_index, RubyXL::ColumnRange::chars2raw(width_in_chars))
|
|
386
386
|
end
|
|
387
387
|
|
|
388
388
|
# Helper method to get the style index for a column
|
|
@@ -689,12 +689,32 @@ module RubyXL
|
|
|
689
689
|
end
|
|
690
690
|
|
|
691
691
|
# Merges cells within a rectangular area
|
|
692
|
-
|
|
692
|
+
# #merge_cells(row_from, col_from, row_to, col_to)
|
|
693
|
+
# #merge_cells(reference_string)
|
|
694
|
+
# #merge_cells(row_from:, row_to:, col_from:, col_to:)
|
|
695
|
+
def merge_cells(*params)
|
|
693
696
|
validate_workbook
|
|
694
697
|
|
|
698
|
+
row_from = col_from = row_to = col_to = nil
|
|
699
|
+
case params.size
|
|
700
|
+
when 4 then row_from, col_from, row_to, col_to = params
|
|
701
|
+
when 1 then
|
|
702
|
+
case params.first
|
|
703
|
+
when Hash then
|
|
704
|
+
row_from, row_to, col_from, col_to = params.first.fetch_values(:row_from, :row_to, :col_from, :col_to)
|
|
705
|
+
when String then
|
|
706
|
+
from, to = params[0].split(':')
|
|
707
|
+
raise ArgumentError.new("reference for merging cells must be a range") if to.nil?
|
|
708
|
+
row_from, col_from = RubyXL::Reference.ref2ind(from)
|
|
709
|
+
row_to, col_to = RubyXL::Reference.ref2ind(to)
|
|
710
|
+
else
|
|
711
|
+
raise ArgumentError.new("invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
|
|
712
|
+
end
|
|
713
|
+
end
|
|
714
|
+
|
|
695
715
|
self.merged_cells ||= RubyXL::MergedCells.new
|
|
696
716
|
# TODO: add validation to make sure ranges are not intersecting with existing ones
|
|
697
|
-
merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(
|
|
717
|
+
merged_cells << RubyXL::MergedCell.new(:ref => RubyXL::Reference.new(row_from, row_to, col_from, col_to))
|
|
698
718
|
end
|
|
699
719
|
|
|
700
720
|
def add_validation_list(ref, list_arr)
|
|
@@ -34,13 +34,18 @@ module RubyXL
|
|
|
34
34
|
edge && edge.style
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def set_edge_style(direction, style)
|
|
37
|
+
def set_edge_style(direction, style, diagonals = nil)
|
|
38
38
|
edge = self.send(direction)
|
|
39
39
|
if edge
|
|
40
40
|
edge.style = style
|
|
41
41
|
else
|
|
42
42
|
self.send("#{direction}=", RubyXL::BorderEdge.new(:style => style))
|
|
43
43
|
end
|
|
44
|
+
|
|
45
|
+
if diagonals then
|
|
46
|
+
self.diagonal_up = true if diagonals.index(:diagonal_up)
|
|
47
|
+
self.diagonal_down = true if diagonals.index(:diagonal_down)
|
|
48
|
+
end
|
|
44
49
|
end
|
|
45
50
|
|
|
46
51
|
def get_edge_color(direction)
|
data/lib/rubyXL/objects/color.rb
CHANGED
|
@@ -4,7 +4,7 @@ require 'rubyXL/objects/simple_types'
|
|
|
4
4
|
module RubyXL
|
|
5
5
|
# http://www.datypic.com/sc/ooxml/e-ssml_color-4.html
|
|
6
6
|
class Color < OOXMLObject
|
|
7
|
-
COLOR_REGEXP = /\A([a-
|
|
7
|
+
COLOR_REGEXP = /\A(?:[a-f0-9]{6}|[a-f0-9]{8})\Z/i
|
|
8
8
|
|
|
9
9
|
define_attribute(:auto, :bool)
|
|
10
10
|
define_attribute(:indexed, :uint)
|
|
@@ -17,21 +17,25 @@ module RubyXL
|
|
|
17
17
|
|
|
18
18
|
def delete_column(col_index)
|
|
19
19
|
col = col_index + 1
|
|
20
|
-
self.min -=1 if min >= col
|
|
21
|
-
self.max -=1 if max >= col
|
|
20
|
+
self.min -= 1 if min >= col
|
|
21
|
+
self.max -= 1 if max >= col
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def insert_column(col_index)
|
|
25
25
|
col = col_index + 1
|
|
26
|
-
self.min +=1 if min >= col
|
|
27
|
-
self.max +=1 if max >= col - 1
|
|
26
|
+
self.min += 1 if min >= col
|
|
27
|
+
self.max += 1 if max >= col - 1
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def include?(col_index)
|
|
31
|
-
((min-1)..(max-1)).include?(col_index)
|
|
31
|
+
((min - 1)..(max - 1)).include?(col_index)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
def self.chars2raw(width_in_chars)
|
|
35
|
+
((width_in_chars + (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)) * 256).to_i / 256.0
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
DEFAULT_WIDTH = 8
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
class ColumnRanges < OOXMLContainerObject
|
|
@@ -47,7 +51,7 @@ module RubyXL
|
|
|
47
51
|
old_range = self.locate_range(col_index)
|
|
48
52
|
|
|
49
53
|
if old_range.nil? then
|
|
50
|
-
new_range = RubyXL::ColumnRange.new
|
|
54
|
+
new_range = RubyXL::ColumnRange.new(width: RubyXL::ColumnRange.chars2raw(RubyXL::ColumnRange::DEFAULT_WIDTH))
|
|
51
55
|
else
|
|
52
56
|
if old_range.min == col_num && old_range.max == col_num then
|
|
53
57
|
return old_range # Single column range, OK to change in place
|
|
@@ -58,9 +62,9 @@ module RubyXL
|
|
|
58
62
|
new_range = old_range.dup
|
|
59
63
|
old_range.max -= 1
|
|
60
64
|
else
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
self <<
|
|
65
|
+
prior_range = old_range.dup
|
|
66
|
+
prior_range.max = col_index # col_num - 1
|
|
67
|
+
self << prior_range
|
|
64
68
|
|
|
65
69
|
old_range.min = col_num + 1
|
|
66
70
|
|
|
@@ -82,8 +86,8 @@ module RubyXL
|
|
|
82
86
|
end
|
|
83
87
|
|
|
84
88
|
def before_write_xml
|
|
85
|
-
self.sort_by!
|
|
86
|
-
!
|
|
89
|
+
self.sort_by!(&:min)
|
|
90
|
+
!self.empty?
|
|
87
91
|
end
|
|
88
92
|
end
|
|
89
93
|
end
|
|
@@ -55,11 +55,19 @@ module RubyXL
|
|
|
55
55
|
define_element_name 'sheetDataSet'
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/452524b4-b22f-45a9-aac1-81fdd1f1db6c
|
|
59
|
+
class AlternateUrls < OOXMLObject
|
|
60
|
+
define_attribute(:absoluteUrl, :string, :required => false)
|
|
61
|
+
define_attribute(:relativeUrl, :string, :required => false)
|
|
62
|
+
define_element_name 'xxl21:alternateUrls'
|
|
63
|
+
end
|
|
64
|
+
|
|
58
65
|
# http://www.datypic.com/sc/ooxml/e-ssml_externalBook-1.html
|
|
59
66
|
class ExternalBook < OOXMLObject
|
|
60
67
|
define_child_node(RubyXL::SheetNames)
|
|
61
68
|
define_child_node(RubyXL::DefinedNamesExt)
|
|
62
69
|
define_child_node(RubyXL::SheetDataSet)
|
|
70
|
+
define_child_node(RubyXL::AlternateUrls)
|
|
63
71
|
define_relationship(:required => true)
|
|
64
72
|
define_element_name 'externalBook'
|
|
65
73
|
end
|