rubyXL 3.4.38 → 3.4.43
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 +3 -4
- data/Rakefile +65 -29
- data/bin/console +10 -0
- data/bin/setup +3 -0
- data/lib/rubyXL/convenience_methods/cell.rb +17 -7
- data/lib/rubyXL/convenience_methods/worksheet.rb +51 -32
- data/lib/rubyXL/convenience_methods.rb +5 -5
- data/lib/rubyXL/{cell.rb → legacy_cell.rb} +2 -2
- data/lib/rubyXL/{worksheet.rb → legacy_worksheet.rb} +5 -17
- data/lib/rubyXL/objects/border.rb +11 -8
- data/lib/rubyXL/objects/calculation_chain.rb +4 -2
- data/lib/rubyXL/objects/cell_style.rb +4 -2
- data/lib/rubyXL/objects/chartsheet.rb +7 -5
- data/lib/rubyXL/objects/color.rb +5 -3
- data/lib/rubyXL/objects/column_range.rb +3 -1
- data/lib/rubyXL/objects/comments.rb +4 -2
- data/lib/rubyXL/objects/connection.rb +5 -3
- data/lib/rubyXL/objects/container_nodes.rb +4 -2
- data/lib/rubyXL/objects/content_types.rb +3 -1
- data/lib/rubyXL/objects/data_validation.rb +5 -3
- data/lib/rubyXL/objects/document_properties.rb +4 -2
- data/lib/rubyXL/objects/extensions.rb +3 -1
- data/lib/rubyXL/objects/external_links.rb +4 -0
- data/lib/rubyXL/objects/fill.rb +4 -2
- data/lib/rubyXL/objects/filters.rb +5 -3
- data/lib/rubyXL/objects/font.rb +5 -3
- data/lib/rubyXL/objects/formula.rb +4 -2
- data/lib/rubyXL/objects/ooxml_object.rb +17 -17
- data/lib/rubyXL/objects/query_table.rb +7 -5
- data/lib/rubyXL/objects/reference.rb +49 -32
- data/lib/rubyXL/objects/relationships.rb +1 -1
- data/lib/rubyXL/objects/root.rb +14 -5
- data/lib/rubyXL/objects/shared_strings.rb +5 -3
- data/lib/rubyXL/objects/sheet_common.rb +4 -2
- data/lib/rubyXL/objects/sheet_data.rb +18 -7
- data/lib/rubyXL/objects/simple_types.rb +101 -98
- data/lib/rubyXL/objects/storage.rb +4 -0
- data/lib/rubyXL/objects/stylesheet.rb +8 -6
- data/lib/rubyXL/objects/text.rb +13 -6
- data/lib/rubyXL/objects/theme.rb +2 -2
- data/lib/rubyXL/objects/workbook.rb +22 -19
- data/lib/rubyXL/objects/worksheet.rb +40 -19
- data/lib/rubyXL/parser.rb +2 -0
- data/lib/rubyXL/version.rb +3 -0
- data/lib/rubyXL.rb +3 -2
- data/rubyXL.gemspec +11 -480
- metadata +52 -427
- data/.circleci/config.yml +0 -71
- data/.codeclimate.yml +0 -3
- data/.rubocop.yml +0 -124
- data/CHANGELOG.md +0 -12
- data/Gemfile +0 -20
- data/VERSION +0 -1
- data/rdoc/README_rdoc.html +0 -871
- data/rdoc/RubyXL/AExtension.html +0 -703
- data/rdoc/RubyXL/AExtensionStorageArea.html +0 -543
- data/rdoc/RubyXL/ActiveX.html +0 -654
- data/rdoc/RubyXL/ActiveXBinary.html +0 -560
- data/rdoc/RubyXL/AdjustHandleList.html +0 -539
- data/rdoc/RubyXL/Alignment.html +0 -539
- data/rdoc/RubyXL/AlternateContent.html +0 -543
- data/rdoc/RubyXL/AlternateUrls.html +0 -539
- data/rdoc/RubyXL/Authors.html +0 -539
- data/rdoc/RubyXL/AutoFilter.html +0 -539
- data/rdoc/RubyXL/AutoFilterColumn.html +0 -539
- data/rdoc/RubyXL/BinaryImageFile.html +0 -568
- data/rdoc/RubyXL/BodyProperties.html +0 -539
- data/rdoc/RubyXL/BooleanNode.html +0 -543
- data/rdoc/RubyXL/BooleanValue.html +0 -543
- data/rdoc/RubyXL/Border.html +0 -758
- data/rdoc/RubyXL/BorderEdge.html +0 -656
- data/rdoc/RubyXL/Borders.html +0 -608
- data/rdoc/RubyXL/Break.html +0 -539
- data/rdoc/RubyXL/BreakList.html +0 -539
- data/rdoc/RubyXL/CT_AdjPoint2D.html +0 -539
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +0 -539
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +0 -539
- data/rdoc/RubyXL/CT_Backdrop.html +0 -539
- data/rdoc/RubyXL/CT_Bevel.html +0 -539
- data/rdoc/RubyXL/CT_BiLevelEffect.html +0 -539
- data/rdoc/RubyXL/CT_BlendEffect.html +0 -539
- data/rdoc/RubyXL/CT_Blip.html +0 -539
- data/rdoc/RubyXL/CT_BlipFillProperties.html +0 -539
- data/rdoc/RubyXL/CT_BlurEffect.html +0 -539
- data/rdoc/RubyXL/CT_Camera.html +0 -539
- data/rdoc/RubyXL/CT_Color.html +0 -539
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +0 -539
- data/rdoc/RubyXL/CT_ColorMapping.html +0 -539
- data/rdoc/RubyXL/CT_ColorScheme.html +0 -539
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +0 -539
- data/rdoc/RubyXL/CT_ConnectionSite.html +0 -539
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +0 -539
- data/rdoc/RubyXL/CT_DashStop.html +0 -539
- data/rdoc/RubyXL/CT_DashStopList.html +0 -539
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +0 -539
- data/rdoc/RubyXL/CT_DuotoneEffect.html +0 -539
- data/rdoc/RubyXL/CT_EffectContainer.html +0 -539
- data/rdoc/RubyXL/CT_EffectList.html +0 -539
- data/rdoc/RubyXL/CT_EffectReference.html +0 -539
- data/rdoc/RubyXL/CT_EffectStyleItem.html +0 -539
- data/rdoc/RubyXL/CT_EffectStyleList.html +0 -539
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +0 -539
- data/rdoc/RubyXL/CT_FillEffect.html +0 -539
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +0 -539
- data/rdoc/RubyXL/CT_FillStyleList.html +0 -539
- data/rdoc/RubyXL/CT_FlatText.html +0 -539
- data/rdoc/RubyXL/CT_FontCollection.html +0 -539
- data/rdoc/RubyXL/CT_FontReference.html +0 -539
- data/rdoc/RubyXL/CT_GeomGuideList.html +0 -539
- data/rdoc/RubyXL/CT_GlowEffect.html +0 -539
- data/rdoc/RubyXL/CT_GradientFillProperties.html +0 -539
- data/rdoc/RubyXL/CT_GradientStop.html +0 -539
- data/rdoc/RubyXL/CT_GradientStopList.html +0 -539
- data/rdoc/RubyXL/CT_HSLEffect.html +0 -539
- data/rdoc/RubyXL/CT_HslColor.html +0 -539
- data/rdoc/RubyXL/CT_Hyperlink.html +0 -539
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +0 -539
- data/rdoc/RubyXL/CT_LightRig.html +0 -539
- data/rdoc/RubyXL/CT_LineEndProperties.html +0 -539
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +0 -539
- data/rdoc/RubyXL/CT_LineProperties.html +0 -539
- data/rdoc/RubyXL/CT_LineStyleList.html +0 -539
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +0 -539
- data/rdoc/RubyXL/CT_LuminanceEffect.html +0 -539
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +0 -539
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +0 -539
- data/rdoc/RubyXL/CT_Path2D.html +0 -539
- data/rdoc/RubyXL/CT_Path2DArcTo.html +0 -539
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +0 -539
- data/rdoc/RubyXL/CT_Path2DList.html +0 -539
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +0 -539
- data/rdoc/RubyXL/CT_Path2DTo.html +0 -539
- data/rdoc/RubyXL/CT_PathShadeProperties.html +0 -539
- data/rdoc/RubyXL/CT_PatternFillProperties.html +0 -539
- data/rdoc/RubyXL/CT_Point3D.html +0 -539
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +0 -539
- data/rdoc/RubyXL/CT_PresetColor.html +0 -539
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +0 -539
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +0 -539
- data/rdoc/RubyXL/CT_PresetTextShape.html +0 -539
- data/rdoc/RubyXL/CT_ReflectionEffect.html +0 -539
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +0 -539
- data/rdoc/RubyXL/CT_RelativeRect.html +0 -539
- data/rdoc/RubyXL/CT_SRgbColor.html +0 -539
- data/rdoc/RubyXL/CT_ScRgbColor.html +0 -539
- data/rdoc/RubyXL/CT_Scene3D.html +0 -539
- data/rdoc/RubyXL/CT_SchemeColor.html +0 -539
- data/rdoc/RubyXL/CT_Shape3D.html +0 -539
- data/rdoc/RubyXL/CT_ShapeStyle.html +0 -539
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +0 -539
- data/rdoc/RubyXL/CT_SphereCoords.html +0 -539
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +0 -539
- data/rdoc/RubyXL/CT_StyleMatrix.html +0 -539
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +0 -539
- data/rdoc/RubyXL/CT_SupplementalFont.html +0 -539
- data/rdoc/RubyXL/CT_SystemColor.html +0 -539
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +0 -539
- data/rdoc/RubyXL/CT_TextBlipBullet.html +0 -539
- data/rdoc/RubyXL/CT_TextCharBullet.html +0 -539
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +0 -539
- data/rdoc/RubyXL/CT_TextFont.html +0 -539
- data/rdoc/RubyXL/CT_TextListStyle.html +0 -539
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +0 -539
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +0 -539
- data/rdoc/RubyXL/CT_TextSpacing.html +0 -539
- data/rdoc/RubyXL/CT_TextTabStop.html +0 -539
- data/rdoc/RubyXL/CT_TextTabStopList.html +0 -539
- data/rdoc/RubyXL/CT_TileInfoProperties.html +0 -539
- data/rdoc/RubyXL/CT_TintEffect.html +0 -539
- data/rdoc/RubyXL/CT_Transform2D.html +0 -539
- data/rdoc/RubyXL/CT_TransformEffect.html +0 -539
- data/rdoc/RubyXL/CT_Vector3D.html +0 -539
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +0 -539
- data/rdoc/RubyXL/CalculationChain.html +0 -633
- data/rdoc/RubyXL/CalculationChainCell.html +0 -539
- data/rdoc/RubyXL/CalculationProperties.html +0 -539
- data/rdoc/RubyXL/Cell.html +0 -1315
- data/rdoc/RubyXL/CellConvenienceMethods.html +0 -2290
- data/rdoc/RubyXL/CellExt.html +0 -539
- data/rdoc/RubyXL/CellSmartTag.html +0 -539
- data/rdoc/RubyXL/CellSmartTagProperty.html +0 -539
- data/rdoc/RubyXL/CellSmartTags.html +0 -539
- data/rdoc/RubyXL/CellStyle.html +0 -539
- data/rdoc/RubyXL/CellStyleXFs.html +0 -608
- data/rdoc/RubyXL/CellStyles.html +0 -608
- data/rdoc/RubyXL/CellValue.html +0 -609
- data/rdoc/RubyXL/CellWatch.html +0 -539
- data/rdoc/RubyXL/CellWatches.html +0 -539
- data/rdoc/RubyXL/CellXFs.html +0 -609
- data/rdoc/RubyXL/ChartColorsFile.html +0 -568
- data/rdoc/RubyXL/ChartFile.html +0 -664
- data/rdoc/RubyXL/ChartStyleFile.html +0 -568
- data/rdoc/RubyXL/ChartUserShapesFile.html +0 -568
- data/rdoc/RubyXL/Chartsheet.html +0 -743
- data/rdoc/RubyXL/ChartsheetPageSetup.html +0 -539
- data/rdoc/RubyXL/ChartsheetProperties.html +0 -539
- data/rdoc/RubyXL/ChartsheetProtection.html +0 -539
- data/rdoc/RubyXL/ChartsheetView.html +0 -539
- data/rdoc/RubyXL/ChartsheetViews.html +0 -539
- data/rdoc/RubyXL/Color.html +0 -629
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +0 -774
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +0 -845
- data/rdoc/RubyXL/ColorConvenienceClasses.html +0 -528
- data/rdoc/RubyXL/ColorConvenienceMethods.html +0 -606
- data/rdoc/RubyXL/ColorFilter.html +0 -539
- data/rdoc/RubyXL/ColorScale.html +0 -539
- data/rdoc/RubyXL/ColorSet.html +0 -539
- data/rdoc/RubyXL/Colors.html +0 -539
- data/rdoc/RubyXL/ColumnRange.html +0 -786
- data/rdoc/RubyXL/ColumnRanges.html +0 -773
- data/rdoc/RubyXL/Comment.html +0 -539
- data/rdoc/RubyXL/CommentList.html +0 -539
- data/rdoc/RubyXL/CommentsFile.html +0 -657
- data/rdoc/RubyXL/ConditionalFormatValue.html +0 -539
- data/rdoc/RubyXL/ConditionalFormatting.html +0 -539
- data/rdoc/RubyXL/ConditionalFormattingRule.html +0 -539
- data/rdoc/RubyXL/Connection.html +0 -539
- data/rdoc/RubyXL/ConnectionTable.html +0 -539
- data/rdoc/RubyXL/ConnectionTables.html +0 -539
- data/rdoc/RubyXL/ConnectionTextField.html +0 -539
- data/rdoc/RubyXL/ConnectionTextFields.html +0 -539
- data/rdoc/RubyXL/Connections.html +0 -633
- data/rdoc/RubyXL/ContentTypeDefault.html +0 -543
- data/rdoc/RubyXL/ContentTypeOverride.html +0 -543
- data/rdoc/RubyXL/ContentTypes.html +0 -721
- data/rdoc/RubyXL/ControlPropertiesFile.html +0 -568
- data/rdoc/RubyXL/CorePropertiesFile.html +0 -1013
- data/rdoc/RubyXL/CustomColor.html +0 -539
- data/rdoc/RubyXL/CustomColorList.html +0 -539
- data/rdoc/RubyXL/CustomFilter.html +0 -539
- data/rdoc/RubyXL/CustomFilters.html +0 -539
- data/rdoc/RubyXL/CustomGeometry.html +0 -539
- data/rdoc/RubyXL/CustomProperties.html +0 -539
- data/rdoc/RubyXL/CustomPropertiesFile.html +0 -568
- data/rdoc/RubyXL/CustomProperty.html +0 -539
- data/rdoc/RubyXL/CustomPropertyFile.html +0 -568
- data/rdoc/RubyXL/CustomSheetView.html +0 -539
- data/rdoc/RubyXL/CustomSheetViews.html +0 -539
- data/rdoc/RubyXL/CustomWorkbookView.html +0 -539
- data/rdoc/RubyXL/CustomWorkbookViews.html +0 -539
- data/rdoc/RubyXL/CustomXMLFile.html +0 -560
- data/rdoc/RubyXL/DXF.html +0 -539
- data/rdoc/RubyXL/DXFs.html +0 -539
- data/rdoc/RubyXL/DataBar.html +0 -539
- data/rdoc/RubyXL/DataConsolidate.html +0 -539
- data/rdoc/RubyXL/DataConsolidationReference.html +0 -539
- data/rdoc/RubyXL/DataConsolidationReferences.html +0 -539
- data/rdoc/RubyXL/DataType.html +0 -589
- data/rdoc/RubyXL/DataValidation.html +0 -539
- data/rdoc/RubyXL/DataValidations.html +0 -539
- data/rdoc/RubyXL/DateGroupItem.html +0 -539
- data/rdoc/RubyXL/DefinedName.html +0 -539
- data/rdoc/RubyXL/DefinedNameExt.html +0 -539
- data/rdoc/RubyXL/DefinedNames.html +0 -616
- data/rdoc/RubyXL/DefinedNamesExt.html +0 -539
- data/rdoc/RubyXL/DocumentPropertiesFile.html +0 -725
- data/rdoc/RubyXL/DrawingFile.html +0 -663
- data/rdoc/RubyXL/DynamicFilter.html +0 -539
- data/rdoc/RubyXL/EmbeddedControl.html +0 -539
- data/rdoc/RubyXL/EmbeddedControls.html +0 -539
- data/rdoc/RubyXL/Extension.html +0 -539
- data/rdoc/RubyXL/ExtensionStorageArea.html +0 -539
- data/rdoc/RubyXL/Extents.html +0 -539
- data/rdoc/RubyXL/ExternalBook.html +0 -539
- data/rdoc/RubyXL/ExternalLinksFile.html +0 -659
- data/rdoc/RubyXL/ExternalReference.html +0 -539
- data/rdoc/RubyXL/ExternalReferences.html +0 -539
- data/rdoc/RubyXL/ExtraColorSchemeList.html +0 -539
- data/rdoc/RubyXL/FieldItem.html +0 -539
- data/rdoc/RubyXL/FileRecoveryProperties.html +0 -539
- data/rdoc/RubyXL/FileSharing.html +0 -539
- data/rdoc/RubyXL/FileVersion.html +0 -539
- data/rdoc/RubyXL/Fill.html +0 -608
- data/rdoc/RubyXL/Fills.html +0 -608
- data/rdoc/RubyXL/FilterContainer.html +0 -539
- data/rdoc/RubyXL/FloatNode.html +0 -543
- data/rdoc/RubyXL/FloatValue.html +0 -543
- data/rdoc/RubyXL/Font.html +0 -626
- data/rdoc/RubyXL/FontConvenienceMethods.html +0 -1169
- data/rdoc/RubyXL/FontScheme.html +0 -539
- data/rdoc/RubyXL/Fonts.html +0 -608
- data/rdoc/RubyXL/Formula.html +0 -539
- data/rdoc/RubyXL/FunctionGroup.html +0 -539
- data/rdoc/RubyXL/FunctionGroups.html +0 -539
- data/rdoc/RubyXL/GenericStorageObject.html +0 -803
- data/rdoc/RubyXL/GradientFill.html +0 -539
- data/rdoc/RubyXL/HeaderFooterSettings.html +0 -539
- data/rdoc/RubyXL/Hyperlink.html +0 -539
- data/rdoc/RubyXL/HyperlinkRelFile.html +0 -560
- data/rdoc/RubyXL/Hyperlinks.html +0 -539
- data/rdoc/RubyXL/IconFilter.html +0 -539
- data/rdoc/RubyXL/IconSet.html +0 -539
- data/rdoc/RubyXL/IgnoredError.html +0 -539
- data/rdoc/RubyXL/IgnoredErrors.html +0 -539
- data/rdoc/RubyXL/IndexedColors.html +0 -539
- data/rdoc/RubyXL/InputCells.html +0 -539
- data/rdoc/RubyXL/IntegerNode.html +0 -543
- data/rdoc/RubyXL/IntegerValue.html +0 -543
- data/rdoc/RubyXL/LegacyCell.html +0 -597
- data/rdoc/RubyXL/LegacyWorksheet.html +0 -894
- data/rdoc/RubyXL/MRUColors.html +0 -539
- data/rdoc/RubyXL/MacrosFile.html +0 -568
- data/rdoc/RubyXL/MergedCell.html +0 -539
- data/rdoc/RubyXL/MergedCells.html +0 -539
- data/rdoc/RubyXL/NumFmt.html +0 -539
- data/rdoc/RubyXL/NumberFormat.html +0 -609
- data/rdoc/RubyXL/NumberFormats.html +0 -625
- data/rdoc/RubyXL/OLEObject.html +0 -539
- data/rdoc/RubyXL/OLEObjectFile.html +0 -568
- data/rdoc/RubyXL/OLEObjects.html +0 -539
- data/rdoc/RubyXL/OLESize.html +0 -539
- data/rdoc/RubyXL/OOXMLContainerObject.html +0 -916
- data/rdoc/RubyXL/OOXMLIgnored.html +0 -681
- data/rdoc/RubyXL/OOXMLObject.html +0 -561
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +0 -1030
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +0 -1092
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +0 -1174
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +0 -891
- data/rdoc/RubyXL/OdbcOleDbProperties.html +0 -539
- data/rdoc/RubyXL/Offset.html +0 -539
- data/rdoc/RubyXL/OlapProperties.html +0 -539
- data/rdoc/RubyXL/OleItem.html +0 -539
- data/rdoc/RubyXL/OleItems.html +0 -539
- data/rdoc/RubyXL/OleLink.html +0 -539
- data/rdoc/RubyXL/OutlineProperties.html +0 -539
- data/rdoc/RubyXL/PageMargins.html +0 -539
- data/rdoc/RubyXL/PageSetup.html +0 -539
- data/rdoc/RubyXL/PageSetupProperties.html +0 -539
- data/rdoc/RubyXL/Pane.html +0 -539
- data/rdoc/RubyXL/Parser.html +0 -670
- data/rdoc/RubyXL/PatternFill.html +0 -539
- data/rdoc/RubyXL/PersonMetadata.html +0 -568
- data/rdoc/RubyXL/PhoneticProperties.html +0 -539
- data/rdoc/RubyXL/PhoneticRun.html +0 -539
- data/rdoc/RubyXL/PivotArea.html +0 -539
- data/rdoc/RubyXL/PivotCache.html +0 -539
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +0 -590
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +0 -568
- data/rdoc/RubyXL/PivotCaches.html +0 -539
- data/rdoc/RubyXL/PivotReference.html +0 -539
- data/rdoc/RubyXL/PivotReferences.html +0 -539
- data/rdoc/RubyXL/PivotTableFile.html +0 -590
- data/rdoc/RubyXL/PivotTableSelection.html +0 -539
- data/rdoc/RubyXL/PresetGeometry.html +0 -539
- data/rdoc/RubyXL/PrintOptions.html +0 -539
- data/rdoc/RubyXL/PrinterSettingsFile.html +0 -568
- data/rdoc/RubyXL/ProtectedRange.html +0 -539
- data/rdoc/RubyXL/ProtectedRanges.html +0 -539
- data/rdoc/RubyXL/Protection.html +0 -539
- data/rdoc/RubyXL/QueryParameter.html +0 -539
- data/rdoc/RubyXL/QueryParameters.html +0 -539
- data/rdoc/RubyXL/QueryTable.html +0 -655
- data/rdoc/RubyXL/QueryTableDeletedField.html +0 -539
- data/rdoc/RubyXL/QueryTableDeletedFields.html +0 -539
- data/rdoc/RubyXL/QueryTableField.html +0 -539
- data/rdoc/RubyXL/QueryTableFields.html +0 -539
- data/rdoc/RubyXL/QueryTableRefresh.html +0 -539
- data/rdoc/RubyXL/RID.html +0 -543
- data/rdoc/RubyXL/RawOOXML.html +0 -703
- data/rdoc/RubyXL/Reference.html +0 -1376
- data/rdoc/RubyXL/Relationship.html +0 -543
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +0 -604
- data/rdoc/RubyXL/RelationshipSupport.html +0 -943
- data/rdoc/RubyXL/RevisionPointer.html +0 -539
- data/rdoc/RubyXL/RichText.html +0 -611
- data/rdoc/RubyXL/RichTextRun.html +0 -608
- data/rdoc/RubyXL/Row.html +0 -1003
- data/rdoc/RubyXL/RowExt.html +0 -539
- data/rdoc/RubyXL/RunProperties.html +0 -539
- data/rdoc/RubyXL/Scenario.html +0 -539
- data/rdoc/RubyXL/Scenarios.html +0 -539
- data/rdoc/RubyXL/Selection.html +0 -616
- data/rdoc/RubyXL/ShapeGuide.html +0 -539
- data/rdoc/RubyXL/ShapeTextRectangle.html +0 -539
- data/rdoc/RubyXL/SharedStringsTable.html +0 -952
- data/rdoc/RubyXL/Sheet.html +0 -539
- data/rdoc/RubyXL/SheetCalculationProperties.html +0 -539
- data/rdoc/RubyXL/SheetData.html +0 -652
- data/rdoc/RubyXL/SheetDataExt.html +0 -539
- data/rdoc/RubyXL/SheetDataSet.html +0 -539
- data/rdoc/RubyXL/SheetMetadata.html +0 -568
- data/rdoc/RubyXL/SheetName.html +0 -539
- data/rdoc/RubyXL/SheetNames.html +0 -539
- data/rdoc/RubyXL/Sheets.html +0 -539
- data/rdoc/RubyXL/SlicerCacheFile.html +0 -568
- data/rdoc/RubyXL/SlicerFile.html +0 -568
- data/rdoc/RubyXL/SmartTagProperties.html +0 -539
- data/rdoc/RubyXL/SmartTagType.html +0 -539
- data/rdoc/RubyXL/SmartTagTypes.html +0 -539
- data/rdoc/RubyXL/SmartTags.html +0 -539
- data/rdoc/RubyXL/SortCondition.html +0 -539
- data/rdoc/RubyXL/SortState.html +0 -539
- data/rdoc/RubyXL/Sqref.html +0 -681
- data/rdoc/RubyXL/Stop.html +0 -539
- data/rdoc/RubyXL/StringNode.html +0 -543
- data/rdoc/RubyXL/StringNodeW3C.html +0 -681
- data/rdoc/RubyXL/StringValue.html +0 -543
- data/rdoc/RubyXL/Stylesheet.html +0 -864
- data/rdoc/RubyXL/TableFile.html +0 -568
- data/rdoc/RubyXL/TableParts.html +0 -543
- data/rdoc/RubyXL/TableStyle.html +0 -539
- data/rdoc/RubyXL/TableStyles.html +0 -539
- data/rdoc/RubyXL/Text.html +0 -679
- data/rdoc/RubyXL/TextImportSettings.html +0 -539
- data/rdoc/RubyXL/Theme.html +0 -1077
- data/rdoc/RubyXL/ThemeElements.html +0 -539
- data/rdoc/RubyXL/ThumbnailFile.html +0 -568
- data/rdoc/RubyXL/Top10.html +0 -539
- data/rdoc/RubyXL/VMLDrawingFile.html +0 -590
- data/rdoc/RubyXL/Variant.html +0 -539
- data/rdoc/RubyXL/Vector.html +0 -612
- data/rdoc/RubyXL/VectorValue.html +0 -543
- data/rdoc/RubyXL/VisualProperties.html +0 -539
- data/rdoc/RubyXL/WebPublishObject.html +0 -539
- data/rdoc/RubyXL/WebPublishObjects.html +0 -539
- data/rdoc/RubyXL/WebPublishingItem.html +0 -539
- data/rdoc/RubyXL/WebPublishingItems.html +0 -539
- data/rdoc/RubyXL/WebPublishingProperties.html +0 -539
- data/rdoc/RubyXL/WebQueryProperties.html +0 -539
- data/rdoc/RubyXL/Workbook.html +0 -2085
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +0 -1407
- data/rdoc/RubyXL/WorkbookProperties.html +0 -539
- data/rdoc/RubyXL/WorkbookProtection.html +0 -539
- data/rdoc/RubyXL/WorkbookRoot.html +0 -933
- data/rdoc/RubyXL/WorkbookView.html +0 -539
- data/rdoc/RubyXL/WorkbookViews.html +0 -539
- data/rdoc/RubyXL/Worksheet.html +0 -1090
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +0 -4076
- data/rdoc/RubyXL/WorksheetDimensions.html +0 -539
- data/rdoc/RubyXL/WorksheetFormatProperties.html +0 -543
- data/rdoc/RubyXL/WorksheetProperties.html +0 -539
- data/rdoc/RubyXL/WorksheetProtection.html +0 -539
- data/rdoc/RubyXL/WorksheetView.html +0 -539
- data/rdoc/RubyXL/WorksheetViews.html +0 -539
- data/rdoc/RubyXL/XF.html +0 -539
- data/rdoc/RubyXL.html +0 -1373
- data/rdoc/created.rid +0 -45
- data/rdoc/css/rdoc.css +0 -1955
- data/rdoc/index.html +0 -455
- data/rdoc/js/aliki.js +0 -511
- data/rdoc/js/bash_highlighter.js +0 -167
- data/rdoc/js/c_highlighter.js +0 -299
- data/rdoc/js/search_controller.js +0 -129
- data/rdoc/js/search_data.js +0 -1
- data/rdoc/js/search_navigation.js +0 -105
- data/rdoc/js/search_ranker.js +0 -239
- data/rdoc/js/theme-toggle.js +0 -112
- data/spec/lib/cell_spec.rb +0 -654
- data/spec/lib/color_spec.rb +0 -21
- data/spec/lib/parser_spec.rb +0 -118
- data/spec/lib/reference_spec.rb +0 -97
- data/spec/lib/rgb_color_spec.rb +0 -29
- data/spec/lib/stylesheet_spec.rb +0 -27
- data/spec/lib/text_spec.rb +0 -27
- data/spec/lib/workbook_spec.rb +0 -197
- data/spec/lib/worksheet_spec.rb +0 -1769
- data/spec/spec_helper.rb +0 -13
- data/test/input/.gitkeep +0 -0
- data/test/output/.gitkeep +0 -0
- data/test/test_parse_write.rb +0 -15
- data/tmp/.gitignore +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c38719194f3da18925c1c37082fa50cbbfa47fa17e321168bfcdec4f5ca168cf
|
|
4
|
+
data.tar.gz: 4aefa3b8e09271c02a89b1e3d24bd90e211c67768716f4a4636a81061a5bcee7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b87639b975fae904fac5c8d389db395ee6d10b7cf58cbf15b4ca718a0bdd5ed1df6a83b90bac0b04f91798e2a59e6b90f8ce37b400f69a220e5b342a317fb1d8
|
|
7
|
+
data.tar.gz: b481c323a0a2875e768fe95a29f859cff4066c2a775e58baa1629824ec4f70ea9c6a80da81aad17b879a575926670ae841a24a0cc5faef5b932bca7803c54dfc
|
data/README.rdoc
CHANGED
|
@@ -138,17 +138,16 @@ Please note: these methods are being phased out in favor of the OOXML object mod
|
|
|
138
138
|
cell = worksheet.add_cell(1, 1, 'B2')
|
|
139
139
|
cell.change_border(:top, 'thin') # Sets the cell to have a top, thin border
|
|
140
140
|
# Note that with diagonals, you have to specify which one of the diagonals (or both) you need.
|
|
141
|
-
cell.change_border(
|
|
141
|
+
cell.change_border(:diagonal, 'thick', [ :diagonal_down ]) # Sets A1 to have a thick diagonal going from top left to bottom right
|
|
142
142
|
# You can turn on both diagonals, but then they both will share the same style and color:
|
|
143
|
-
cell.change_border(
|
|
143
|
+
cell.change_border(:diagonal, 'thick', [ :diagonal_down, :diagonal_up ])
|
|
144
144
|
|
|
145
145
|
===== Border Colors
|
|
146
146
|
# Make sure you set the border style first so there's something to color.
|
|
147
147
|
cell.change_border_color(:top, '0ba53d') # Sets top border color to green
|
|
148
|
-
cell.change_border_color(:diagonal, 'dd0000') # Sets
|
|
148
|
+
cell.change_border_color(:diagonal, 'dd0000') # Sets diagonal border color to red
|
|
149
149
|
|
|
150
150
|
===== Changing whole row or column
|
|
151
|
-
|
|
152
151
|
worksheet.change_row_border(0, :left, 'hairline') # Sets first row to have a left, hairline border
|
|
153
152
|
worksheet.change_column_border(0, :diagonal, 'medium') # Sets first column to have diagonal, medium border
|
|
154
153
|
worksheet.change_row_border_color(0, :top, '0ba53d') # Sets first row to have a green top border
|
data/Rakefile
CHANGED
|
@@ -9,20 +9,10 @@ rescue Bundler::BundlerError => e
|
|
|
9
9
|
exit e.status_code
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
require '
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
gem.name = 'rubyXL'
|
|
16
|
-
gem.homepage = 'http://github.com/gilt/rubyXL'
|
|
17
|
-
gem.license = 'MIT'
|
|
18
|
-
gem.summary = %q{rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents}
|
|
19
|
-
gem.description = %q{rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents}
|
|
20
|
-
gem.email = 'bhagwat.vivek@gmail.com'
|
|
21
|
-
gem.authors = ['Vivek Bhagwat', 'Wesha']
|
|
22
|
-
# gem.required_ruby_version = '>2.1'
|
|
23
|
-
# dependencies defined in Gemfile
|
|
12
|
+
require 'psych'
|
|
13
|
+
if defined?(Psych::ClassLoader) && defined?(Psych::ClassLoader::ALLOWED_CLASSES)
|
|
14
|
+
Psych::ClassLoader::ALLOWED_CLASSES << 'Gem::Specification'
|
|
24
15
|
end
|
|
25
|
-
Juwelier::RubygemsDotOrgTasks.new
|
|
26
16
|
|
|
27
17
|
require 'rake/testtask'
|
|
28
18
|
Rake::TestTask.new(:test) do |test|
|
|
@@ -38,22 +28,23 @@ task :default => :rspec
|
|
|
38
28
|
|
|
39
29
|
require 'rdoc/task'
|
|
40
30
|
Rake::RDocTask.new do |rdoc|
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
require_relative 'lib/rubyXL/version'
|
|
43
32
|
rdoc.rdoc_dir = 'rdoc'
|
|
44
|
-
rdoc.title = "rubyXL #{
|
|
33
|
+
rdoc.title = "rubyXL #{RubyXL::VERSION}"
|
|
45
34
|
rdoc.rdoc_files.include('README*')
|
|
46
35
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
47
36
|
end
|
|
48
37
|
|
|
38
|
+
task :preload_library do
|
|
39
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
|
|
40
|
+
require './lib/rubyXL'
|
|
41
|
+
end
|
|
42
|
+
|
|
49
43
|
desc 'Dump profiling data with stackprof'
|
|
50
|
-
task :stackprof do
|
|
44
|
+
task :stackprof => :preload_library do
|
|
51
45
|
require 'benchmark'
|
|
52
46
|
require 'stackprof'
|
|
53
47
|
|
|
54
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
|
|
55
|
-
require './lib/rubyXL'
|
|
56
|
-
|
|
57
48
|
spreadsheets = Dir.glob(File.join('test', 'input', '*.xls?')).sort!
|
|
58
49
|
|
|
59
50
|
spreadsheets.each { |input|
|
|
@@ -74,30 +65,75 @@ task :stackprof do
|
|
|
74
65
|
end
|
|
75
66
|
|
|
76
67
|
desc 'Dump profiling data with ruby-prof'
|
|
77
|
-
task :rubyprof do
|
|
78
|
-
require 'benchmark'
|
|
68
|
+
task :rubyprof => :preload_library do
|
|
79
69
|
require 'ruby-prof'
|
|
80
70
|
|
|
81
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib' # Make Ruby aware of load path
|
|
82
|
-
require './lib/rubyXL'
|
|
83
|
-
|
|
84
71
|
spreadsheets = Dir.glob(File.join('test', 'input', '*.xls?')).sort!
|
|
85
72
|
|
|
86
73
|
spreadsheets.each { |input|
|
|
87
74
|
puts "<<<--- Profiling parsing of #{input}..."
|
|
88
75
|
doc = nil
|
|
89
|
-
result = RubyProf.profile {
|
|
76
|
+
result = RubyProf::Profile.profile {
|
|
90
77
|
doc = RubyXL::Parser.parse(input)
|
|
91
78
|
}
|
|
92
79
|
printer = RubyProf::CallStackPrinter.new(result)
|
|
93
|
-
File.open("tmp/ruby-prof-parse-#{File.basename(input)}.html", 'w') { |f| printer.print(f
|
|
80
|
+
File.open("tmp/ruby-prof-parse-#{File.basename(input)}.html", 'w') { |f| printer.print(f) }
|
|
94
81
|
|
|
95
82
|
output = File.join('test', 'output', File.basename(input))
|
|
96
83
|
puts "--->>> Profiling writing of #{output}..."
|
|
97
|
-
result = RubyProf.profile {
|
|
84
|
+
result = RubyProf::Profile.profile {
|
|
98
85
|
doc.write(output)
|
|
99
86
|
}
|
|
100
87
|
printer = RubyProf::CallStackPrinter.new(result)
|
|
101
|
-
File.open("tmp/ruby-prof-write-#{File.basename(input)}.html", 'w') { |f| printer.print(f
|
|
88
|
+
File.open("tmp/ruby-prof-write-#{File.basename(input)}.html", 'w') { |f| printer.print(f) }
|
|
102
89
|
}
|
|
103
90
|
end
|
|
91
|
+
|
|
92
|
+
desc 'Start IRB with all runtime dependencies loaded'
|
|
93
|
+
task :console => :preload_library do
|
|
94
|
+
require "irb"
|
|
95
|
+
::ARGV.pop # Do not allow IRB to grab Rake's parameter
|
|
96
|
+
IRB.start
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
desc 'Build gem into pkg'
|
|
100
|
+
task :build do
|
|
101
|
+
`gem build`
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
desc 'Displays the current version'
|
|
105
|
+
task :version => :preload_library do
|
|
106
|
+
puts RubyXL::VERSION
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
desc 'Releases the current version'
|
|
110
|
+
task :release => :preload_library do
|
|
111
|
+
`gem release`
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
namespace :version do
|
|
115
|
+
namespace :bump do
|
|
116
|
+
desc 'Bump the major version by 1'
|
|
117
|
+
task :major do
|
|
118
|
+
`gem bump major --no-commit`
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
namespace :version do
|
|
124
|
+
namespace :bump do
|
|
125
|
+
desc 'Bump the minor version by 1'
|
|
126
|
+
task :minor do
|
|
127
|
+
`gem bump minor --no-commit`
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
namespace :version do
|
|
133
|
+
namespace :bump do
|
|
134
|
+
desc 'Bump the patch version by 1'
|
|
135
|
+
task :patch do
|
|
136
|
+
`gem bump patch --no-commit`
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
data/bin/console
ADDED
data/bin/setup
ADDED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
module RubyXL
|
|
2
2
|
module CellConvenienceMethods
|
|
3
|
+
# Excel has a hard limit of 65'530 hyperlinks per Worksheet
|
|
4
|
+
MAX_HYPERLINKS_PER_WORKSHEET = 65530
|
|
5
|
+
|
|
3
6
|
def change_contents(data, formula_expression = nil)
|
|
4
7
|
validate_worksheet
|
|
5
8
|
|
|
@@ -21,10 +24,10 @@ module RubyXL
|
|
|
21
24
|
def remove_formula
|
|
22
25
|
self.formula = nil
|
|
23
26
|
|
|
24
|
-
calculation_chain = workbook
|
|
25
|
-
calculation_cells = calculation_chain
|
|
26
|
-
calculation_cells
|
|
27
|
-
c.ref.
|
|
27
|
+
calculation_chain = workbook&.calculation_chain
|
|
28
|
+
calculation_cells = calculation_chain&.cells
|
|
29
|
+
calculation_cells&.reject! { |c|
|
|
30
|
+
(c.ref.first_col == self.column) && (c.ref.first_row == self.row)
|
|
28
31
|
}
|
|
29
32
|
end
|
|
30
33
|
|
|
@@ -180,7 +183,7 @@ module RubyXL
|
|
|
180
183
|
# Changes font size of cell
|
|
181
184
|
def change_font_size(font_size = 10)
|
|
182
185
|
validate_worksheet
|
|
183
|
-
raise 'Argument must be a number' unless font_size.is_a?(Integer) || font_size.is_a?(Float)
|
|
186
|
+
raise(ArgumentError, 'Argument must be a number') unless font_size.is_a?(Integer) || font_size.is_a?(Float)
|
|
184
187
|
|
|
185
188
|
font = get_cell_font.dup
|
|
186
189
|
font.set_size(font_size)
|
|
@@ -249,11 +252,19 @@ module RubyXL
|
|
|
249
252
|
when Worksheet::BOLD then change_font_bold(arg)
|
|
250
253
|
when Worksheet::UNDERLINE then change_font_underline(arg)
|
|
251
254
|
when Worksheet::STRIKETHROUGH then change_font_strikethrough(arg)
|
|
252
|
-
else raise
|
|
255
|
+
else raise ArgumentError, "Invalid change_type: #{change_type}"
|
|
253
256
|
end
|
|
254
257
|
end
|
|
255
258
|
|
|
256
259
|
def add_hyperlink(url, tooltip = nil)
|
|
260
|
+
if worksheet.hyperlinks then
|
|
261
|
+
if worksheet.hyperlinks.size >= MAX_HYPERLINKS_PER_WORKSHEET then
|
|
262
|
+
raise RuntimeError, "Maximum number of hyperlinks per worksheet (#{MAX_HYPERLINKS_PER_WORKSHEET}) reached"
|
|
263
|
+
end
|
|
264
|
+
else
|
|
265
|
+
worksheet.hyperlinks = RubyXL::Hyperlinks.new
|
|
266
|
+
end
|
|
267
|
+
|
|
257
268
|
worksheet.relationship_container ||= RubyXL::OOXMLRelationshipsFile.new
|
|
258
269
|
relationships = worksheet.relationship_container.relationships
|
|
259
270
|
r_id = "rId#{relationships.size + 1}"
|
|
@@ -262,7 +273,6 @@ module RubyXL
|
|
|
262
273
|
|
|
263
274
|
hyperlink = RubyXL::Hyperlink.new(:ref => self.r, :r_id => r_id)
|
|
264
275
|
hyperlink.tooltip = tooltip if tooltip
|
|
265
|
-
worksheet.hyperlinks ||= RubyXL::Hyperlinks.new
|
|
266
276
|
worksheet.hyperlinks << hyperlink
|
|
267
277
|
end
|
|
268
278
|
|
|
@@ -28,7 +28,7 @@ module RubyXL
|
|
|
28
28
|
end
|
|
29
29
|
}
|
|
30
30
|
else
|
|
31
|
-
raise
|
|
31
|
+
raise ArgumentError, "Invalid shift option: #{shift}"
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
return add_cell(row, col, data, formula)
|
|
@@ -62,7 +62,7 @@ module RubyXL
|
|
|
62
62
|
end
|
|
63
63
|
}
|
|
64
64
|
else
|
|
65
|
-
raise
|
|
65
|
+
raise ArgumentError, "Invalid shift option: #{shift}"
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
return old_cell
|
|
@@ -108,14 +108,14 @@ module RubyXL
|
|
|
108
108
|
# Update merged cells for all rows below
|
|
109
109
|
if self.merged_cells then
|
|
110
110
|
merged_cells.each { |mc|
|
|
111
|
-
next if mc.ref.
|
|
111
|
+
next if mc.ref.last_row < row_index
|
|
112
112
|
|
|
113
|
-
in_merged_cell = mc.ref.
|
|
113
|
+
in_merged_cell = mc.ref.first_row < row_index
|
|
114
114
|
mc.ref = RubyXL::Reference.new(
|
|
115
|
-
mc.ref.
|
|
116
|
-
mc.ref.
|
|
117
|
-
mc.ref.
|
|
118
|
-
mc.ref.
|
|
115
|
+
mc.ref.first_row + (in_merged_cell ? 0 : 1),
|
|
116
|
+
mc.ref.last_row + 1,
|
|
117
|
+
mc.ref.first_col,
|
|
118
|
+
mc.ref.last_col,
|
|
119
119
|
)
|
|
120
120
|
}
|
|
121
121
|
end
|
|
@@ -137,18 +137,24 @@ module RubyXL
|
|
|
137
137
|
|
|
138
138
|
# Update row number of merged cells
|
|
139
139
|
if self.merged_cells then
|
|
140
|
-
merged_cells.delete_if { |mc|
|
|
140
|
+
merged_cells.delete_if { |mc|
|
|
141
|
+
reference = mc.ref
|
|
142
|
+
(reference.first_row == row_index) && (reference.last_row == row_index)
|
|
143
|
+
}
|
|
144
|
+
|
|
141
145
|
merged_cells.each { |mc|
|
|
142
|
-
|
|
146
|
+
reference = mc.ref
|
|
147
|
+
next if reference.last_row < row_index
|
|
143
148
|
|
|
144
|
-
in_merged_cell =
|
|
149
|
+
in_merged_cell = reference.first_row <= row_index
|
|
145
150
|
mc.ref = RubyXL::Reference.new(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
151
|
+
reference.first_row - (in_merged_cell ? 0 : 1),
|
|
152
|
+
reference.last_row - 1,
|
|
153
|
+
reference.first_col,
|
|
154
|
+
reference.last_col,
|
|
150
155
|
)
|
|
151
156
|
}
|
|
157
|
+
|
|
152
158
|
merged_cells.delete_if { |mc| mc.ref.single_cell? }
|
|
153
159
|
end
|
|
154
160
|
|
|
@@ -186,14 +192,14 @@ module RubyXL
|
|
|
186
192
|
# Update merged cells for all rows below
|
|
187
193
|
if self.merged_cells then
|
|
188
194
|
merged_cells.each { |mc|
|
|
189
|
-
next if mc.ref.
|
|
195
|
+
next if mc.ref.last_col < column_index
|
|
190
196
|
|
|
191
|
-
in_merged_cell = mc.ref.
|
|
197
|
+
in_merged_cell = mc.ref.first_col < column_index
|
|
192
198
|
mc.ref = RubyXL::Reference.new(
|
|
193
|
-
mc.ref.
|
|
194
|
-
mc.ref.
|
|
195
|
-
mc.ref.
|
|
196
|
-
mc.ref.
|
|
199
|
+
mc.ref.first_row,
|
|
200
|
+
mc.ref.last_row,
|
|
201
|
+
mc.ref.first_col + (in_merged_cell ? 0 : 1),
|
|
202
|
+
mc.ref.last_col + 1,
|
|
197
203
|
)
|
|
198
204
|
}
|
|
199
205
|
end
|
|
@@ -221,16 +227,21 @@ module RubyXL
|
|
|
221
227
|
# Update row number of merged cells
|
|
222
228
|
return unless self.merged_cells
|
|
223
229
|
|
|
224
|
-
merged_cells.delete_if { |mc|
|
|
230
|
+
merged_cells.delete_if { |mc|
|
|
231
|
+
reference = mc.ref
|
|
232
|
+
(reference.first_col == column_index) && (reference.last_col == column_index)
|
|
233
|
+
}
|
|
234
|
+
|
|
225
235
|
merged_cells.each { |mc|
|
|
226
|
-
|
|
236
|
+
reference = mc.ref
|
|
237
|
+
next if reference.last_col < column_index
|
|
227
238
|
|
|
228
|
-
in_merged_cell =
|
|
239
|
+
in_merged_cell = reference.first_col <= column_index
|
|
229
240
|
mc.ref = RubyXL::Reference.new(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
241
|
+
reference.first_row,
|
|
242
|
+
reference.last_row,
|
|
243
|
+
reference.first_col - (in_merged_cell ? 0 : 1),
|
|
244
|
+
reference.last_col - 1,
|
|
234
245
|
)
|
|
235
246
|
}
|
|
236
247
|
|
|
@@ -704,17 +715,25 @@ module RubyXL
|
|
|
704
715
|
row_from, row_to, col_from, col_to = params.first.fetch_values(:row_from, :row_to, :col_from, :col_to)
|
|
705
716
|
when String then
|
|
706
717
|
from, to = params[0].split(':')
|
|
707
|
-
raise
|
|
718
|
+
raise(ArgumentError, "Reference for merging cells must be a range") if to.nil?
|
|
708
719
|
row_from, col_from = RubyXL::Reference.ref2ind(from)
|
|
709
720
|
row_to, col_to = RubyXL::Reference.ref2ind(to)
|
|
710
721
|
else
|
|
711
|
-
raise
|
|
722
|
+
raise(ArgumentError, "Invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
|
|
712
723
|
end
|
|
713
724
|
end
|
|
714
725
|
|
|
715
726
|
self.merged_cells ||= RubyXL::MergedCells.new
|
|
716
|
-
|
|
717
|
-
|
|
727
|
+
new_merged_cell = RubyXL::Reference.new(row_from, row_to, col_from, col_to)
|
|
728
|
+
|
|
729
|
+
colliding_cell = merged_cells.find { |mc| mc.ref.intersect?(new_merged_cell) ||
|
|
730
|
+
mc.ref.cover?(new_merged_cell) || new_merged_cell.cover?(mc.ref) }
|
|
731
|
+
|
|
732
|
+
raise ArgumentError, "New merged cell (#{new_merged_cell}} intersects with existing merged cell (#{colliding_cell.ref})" if colliding_cell
|
|
733
|
+
|
|
734
|
+
merged_cells << RubyXL::MergedCell.new(:ref => new_merged_cell)
|
|
735
|
+
|
|
736
|
+
# TODO: copy the style from the top left cell of the ramge to the rest
|
|
718
737
|
end
|
|
719
738
|
|
|
720
739
|
def add_validation_list(ref, list_arr)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
require_relative 'convenience_methods/workbook'
|
|
2
|
+
require_relative 'convenience_methods/worksheet'
|
|
3
|
+
require_relative 'convenience_methods/cell'
|
|
4
|
+
require_relative 'convenience_methods/font'
|
|
5
|
+
require_relative 'convenience_methods/color'
|
|
@@ -16,12 +16,12 @@ module RubyXL
|
|
|
16
16
|
end
|
|
17
17
|
}
|
|
18
18
|
end
|
|
19
|
-
raise "
|
|
19
|
+
raise RuntimeError, "Cell #{self} is not in workbook #{workbook}"
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def validate_worksheet
|
|
23
23
|
return if @worksheet && @worksheet[row] && @worksheet[row][column].equal?(self)
|
|
24
|
-
raise "Cell #{self} is not in worksheet #{worksheet}"
|
|
24
|
+
raise RuntimeError, "Cell #{self} is not in worksheet #{worksheet}"
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
end
|
|
@@ -16,21 +16,6 @@ module RubyXL
|
|
|
16
16
|
@generic_storage = []
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
# allows for easier access to sheet_data
|
|
20
|
-
def [](row = 0)
|
|
21
|
-
sheet_data[row]
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def each
|
|
25
|
-
sheet_data.rows.each { |row| yield(row) }
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def add_row(row_index = 0, params = {})
|
|
29
|
-
new_row = RubyXL::Row.new(params)
|
|
30
|
-
new_row.worksheet = self
|
|
31
|
-
sheet_data.rows[row_index] = new_row
|
|
32
|
-
end
|
|
33
|
-
|
|
34
19
|
def add_cell(row_index = 0, column_index = 0, data = '', formula = nil, overwrite = true)
|
|
35
20
|
validate_workbook
|
|
36
21
|
validate_nonnegative(row_index)
|
|
@@ -65,6 +50,9 @@ module RubyXL
|
|
|
65
50
|
c.datatype = RubyXL::DataType::INLINE_STRING
|
|
66
51
|
when Time, Date, DateTime then
|
|
67
52
|
c.raw_value = workbook.date_to_num(data)
|
|
53
|
+
when TrueClass, FalseClass then
|
|
54
|
+
c.raw_value = data ? 1 : 0
|
|
55
|
+
c.datatype = RubyXL::DataType::BOOLEAN
|
|
68
56
|
when NilClass then nil
|
|
69
57
|
end
|
|
70
58
|
end
|
|
@@ -85,7 +73,7 @@ module RubyXL
|
|
|
85
73
|
return if @workbook.worksheets.any? { |sheet| sheet.equal?(self) }
|
|
86
74
|
end
|
|
87
75
|
|
|
88
|
-
raise "
|
|
76
|
+
raise RuntimeError, "Worksheet #{self} is not in workbook #{@workbook}"
|
|
89
77
|
end
|
|
90
78
|
|
|
91
79
|
# Ensures that storage space for a cell with +row_index+ and +column_index+
|
|
@@ -98,7 +86,7 @@ module RubyXL
|
|
|
98
86
|
end
|
|
99
87
|
|
|
100
88
|
def validate_nonnegative(row_or_col)
|
|
101
|
-
raise 'Row and Column arguments must be nonnegative' if row_or_col < 0
|
|
89
|
+
raise(ArgumentError, 'Row and Column arguments must be nonnegative') if row_or_col < 0
|
|
102
90
|
end
|
|
103
91
|
private :validate_nonnegative
|
|
104
92
|
end
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'simple_types'
|
|
3
5
|
|
|
4
6
|
module RubyXL
|
|
5
7
|
class BorderEdge < OOXMLObject
|
|
6
8
|
define_attribute(:style, RubyXL::ST_BorderStyle, :default => 'none')
|
|
7
9
|
define_child_node(RubyXL::Color)
|
|
8
10
|
|
|
9
|
-
def set_rgb_color(
|
|
10
|
-
self.color = RubyXL::Color.new(:rgb =>
|
|
11
|
+
def set_rgb_color(edge_color)
|
|
12
|
+
self.color = RubyXL::Color.new(:rgb => edge_color.to_s)
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
def get_rgb_color
|
|
@@ -43,8 +45,8 @@ module RubyXL
|
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
if diagonals then
|
|
46
|
-
self.diagonal_up = true if diagonals.
|
|
47
|
-
self.diagonal_down = true if diagonals.
|
|
48
|
+
self.diagonal_up = true if diagonals.include?(:diagonal_up)
|
|
49
|
+
self.diagonal_down = true if diagonals.include?(:diagonal_down)
|
|
48
50
|
end
|
|
49
51
|
end
|
|
50
52
|
|
|
@@ -58,8 +60,9 @@ module RubyXL
|
|
|
58
60
|
if edge
|
|
59
61
|
edge.set_rgb_color(color)
|
|
60
62
|
else
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
edge = RubyXL::BorderEdge.new
|
|
64
|
+
edge.set_rgb_color(color)
|
|
65
|
+
self.send("#{direction}=", edge)
|
|
63
66
|
end
|
|
64
67
|
end
|
|
65
68
|
end
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'simple_types'
|
|
5
|
+
require_relative 'extensions'
|
|
6
|
+
require_relative 'relationships'
|
|
7
|
+
require_relative 'sheet_common'
|
|
6
8
|
|
|
7
9
|
module RubyXL
|
|
8
10
|
# http://www.datypic.com/sc/ooxml/e-ssml_sheetProtection-4.html
|
data/lib/rubyXL/objects/color.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'simple_types'
|
|
3
5
|
|
|
4
6
|
module RubyXL
|
|
5
7
|
# http://www.datypic.com/sc/ooxml/e-ssml_color-4.html
|
|
@@ -18,7 +20,7 @@ module RubyXL
|
|
|
18
20
|
if color =~ COLOR_REGEXP
|
|
19
21
|
return true
|
|
20
22
|
else
|
|
21
|
-
raise
|
|
23
|
+
raise ArgumentError, "Invalid color value: #{color}"
|
|
22
24
|
end
|
|
23
25
|
end
|
|
24
26
|
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'simple_types'
|
|
5
|
+
require_relative 'extensions'
|
|
4
6
|
|
|
5
7
|
# Connections
|
|
6
8
|
# https://msdn.microsoft.com/en-us/library/dd908547(v=office.12).aspx
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'simple_types'
|
|
5
|
+
require_relative 'formula'
|
|
4
6
|
|
|
5
7
|
module RubyXL
|
|
6
8
|
# http://www.datypic.com/sc/ooxml/e-ssml_dataValidation-1.html
|