rubyXL 3.4.39 → 3.4.40
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/Rakefile +107 -14
- data/VERSION +1 -1
- data/bin/console +10 -0
- data/bin/setup +3 -0
- data/lib/rubyXL/convenience_methods/cell.rb +6 -3
- data/lib/rubyXL/version.rb +3 -0
- data/lib/rubyXL.rb +1 -0
- data/rubyXL.gemspec +10 -482
- metadata +27 -430
- data/.circleci/config.yml +0 -71
- data/.codeclimate.yml +0 -3
- data/.rubocop.yml +0 -124
- data/CHANGELOG.md +0 -12
- data/Gemfile +0 -23
- 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 -759
- 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 -2311
- 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 -760
- 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 -909
- data/rdoc/RubyXL/OOXMLIgnored.html +0 -681
- data/rdoc/RubyXL/OOXMLObject.html +0 -561
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +0 -1034
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +0 -1091
- 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/PivotSelection.html +0 -539
- data/rdoc/RubyXL/PivotTableFile.html +0 -590
- 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 -1332
- 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 -940
- data/rdoc/RubyXL/WorkbookView.html +0 -539
- data/rdoc/RubyXL/WorkbookViews.html +0 -539
- data/rdoc/RubyXL/Worksheet.html +0 -1224
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +0 -4087
- 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 -1381
- 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 -694
- data/spec/lib/color_spec.rb +0 -21
- data/spec/lib/parser_spec.rb +0 -118
- data/spec/lib/reference_spec.rb +0 -122
- 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_root_spec.rb +0 -43
- data/spec/lib/workbook_spec.rb +0 -197
- data/spec/lib/worksheet_spec.rb +0 -1777
- 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
data/spec/lib/cell_spec.rb
DELETED
|
@@ -1,694 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'spec_helper'
|
|
4
|
-
require 'bigdecimal'
|
|
5
|
-
require 'rubyXL/convenience_methods/font'
|
|
6
|
-
require 'rubyXL/convenience_methods/cell'
|
|
7
|
-
|
|
8
|
-
describe RubyXL::Cell do
|
|
9
|
-
before do
|
|
10
|
-
@workbook = RubyXL::Workbook.new
|
|
11
|
-
@worksheet = @workbook.add_worksheet('Test Worksheet')
|
|
12
|
-
@workbook.worksheets << @worksheet
|
|
13
|
-
11.times do |i|
|
|
14
|
-
11.times do |j|
|
|
15
|
-
@worksheet.add_cell(i, j, "#{i}:#{j}")
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
@cell = @worksheet[0][0]
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
describe '.add_cell' do
|
|
22
|
-
it 'should properly assign data types' do
|
|
23
|
-
r = 4
|
|
24
|
-
c = 4
|
|
25
|
-
|
|
26
|
-
cell = @worksheet.add_cell(r, c, 123)
|
|
27
|
-
expect(cell.datatype).to be_nil
|
|
28
|
-
|
|
29
|
-
cell = @worksheet.add_cell(r, c, "#{r}:#{c}")
|
|
30
|
-
expect(cell.datatype).to eq(RubyXL::DataType::RAW_STRING)
|
|
31
|
-
|
|
32
|
-
cell = @worksheet.add_cell(r, c, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => 'Hello')))
|
|
33
|
-
expect(cell.datatype).to eq(RubyXL::DataType::INLINE_STRING)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
it 'should properly handle dates' do
|
|
37
|
-
r = 3
|
|
38
|
-
c = 3
|
|
39
|
-
|
|
40
|
-
dt = Date.today
|
|
41
|
-
cell = @worksheet.add_cell(r, c, dt)
|
|
42
|
-
cell.set_number_format('ddd mmm dd, yyyy')
|
|
43
|
-
expect(cell.value).to eq(dt)
|
|
44
|
-
|
|
45
|
-
tm = DateTime.now
|
|
46
|
-
cell = @worksheet.add_cell(r, c, tm)
|
|
47
|
-
cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
|
|
48
|
-
|
|
49
|
-
# Due to rounding errors, we allow microsecond precision on DateTime.
|
|
50
|
-
expect((cell.value - tm).to_f).to be_within(1.0 / 86400e6).of(0)
|
|
51
|
-
|
|
52
|
-
tm = Time.now
|
|
53
|
-
cell = @worksheet.add_cell(r, c, tm)
|
|
54
|
-
cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
|
|
55
|
-
|
|
56
|
-
# Due to rounding errors, we allow microsecond precision on Time.
|
|
57
|
-
expect(cell.value - tm.to_datetime).to be_within(1.0 / 86400e6).of(0)
|
|
58
|
-
|
|
59
|
-
expected_date = '2020-10-15T14:00:00Z'
|
|
60
|
-
expected_datetime = Time.parse(expected_date).utc
|
|
61
|
-
raw_value = '44119.583333333328' # Obtained from parsing a xlsx file with the expected date
|
|
62
|
-
cell = @worksheet.add_cell(r, c, Time.now) # Force a date cell type
|
|
63
|
-
cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
|
|
64
|
-
cell.raw_value = raw_value
|
|
65
|
-
expect(cell.raw_value).to eq(raw_value), 'Wrong raw value'
|
|
66
|
-
cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
|
|
67
|
-
|
|
68
|
-
# We expect exactly the same date
|
|
69
|
-
expect(cell.value.to_time.utc.iso8601).to eq(expected_datetime.iso8601)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
it 'should raise against too long String' do
|
|
73
|
-
ok_data = 'A' * 32767 # The limit is 32767
|
|
74
|
-
|
|
75
|
-
expect {
|
|
76
|
-
@worksheet.add_cell(0, 1, ok_data) # 32767 -> OK
|
|
77
|
-
}.not_to raise_error
|
|
78
|
-
expect {
|
|
79
|
-
# 1 longer than the limit, so an exception must be thrown.
|
|
80
|
-
@worksheet.add_cell(0, 2, "#{ok_data}x")
|
|
81
|
-
}.to raise_error(ArgumentError)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
it 'should raise against too long RichText' do
|
|
85
|
-
ok_data = 'A' * 32767 # The limit is 32767
|
|
86
|
-
|
|
87
|
-
expect {
|
|
88
|
-
@worksheet.add_cell(0, 1, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => ok_data))) # 32767 -> OK
|
|
89
|
-
}.not_to raise_error
|
|
90
|
-
expect {
|
|
91
|
-
# 1 longer than the limit, so an exception must be thrown.
|
|
92
|
-
@worksheet.add_cell(0, 2, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => "#{ok_data}x")))
|
|
93
|
-
}.to raise_error(ArgumentError)
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
describe '.change_fill' do
|
|
98
|
-
it 'should cause an error if hex color code not passed' do
|
|
99
|
-
expect {
|
|
100
|
-
@cell.change_fill('G')
|
|
101
|
-
}.to raise_error(ArgumentError)
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
it 'should make cell fill color equal to hex color code passed' do
|
|
105
|
-
@cell.change_fill('0f0f0f')
|
|
106
|
-
expect(@cell.fill_color).to eq('0f0f0f')
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
it 'should cause an error if hex color code includes # character' do
|
|
110
|
-
expect {
|
|
111
|
-
@cell.change_fill('#0f0f0f')
|
|
112
|
-
}.to raise_error(ArgumentError)
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
describe '.change_font_name' do
|
|
117
|
-
it 'should make font name match font name passed' do
|
|
118
|
-
@cell.change_font_name('Arial')
|
|
119
|
-
expect(@cell.font_name).to eq('Arial')
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
describe '.change_font_size' do
|
|
124
|
-
it 'should make font size match number passed' do
|
|
125
|
-
@cell.change_font_size(30)
|
|
126
|
-
expect(@cell.font_size).to eq(30)
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
it 'should cause an error if a string passed' do
|
|
130
|
-
expect {
|
|
131
|
-
@cell.change_font_size('20')
|
|
132
|
-
}.to raise_error(ArgumentError)
|
|
133
|
-
end
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
describe '.change_font_color' do
|
|
137
|
-
it 'should cause an error if hex color code not passed' do
|
|
138
|
-
expect {
|
|
139
|
-
@cell.change_font_color('G')
|
|
140
|
-
}.to raise_error(ArgumentError)
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
it 'should make cell font color equal to hex color code passed' do
|
|
144
|
-
@cell.change_font_color('0f0f0f')
|
|
145
|
-
expect(@cell.font_color).to eq('0f0f0f')
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
it 'should cause an error if hex color code includes # character' do
|
|
149
|
-
expect {
|
|
150
|
-
@cell.change_font_color('#0f0f0f')
|
|
151
|
-
}.to raise_error(ArgumentError)
|
|
152
|
-
end
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
describe '.change_font_italics' do
|
|
156
|
-
it 'should make cell font italicized when true is passed' do
|
|
157
|
-
expect(@cell.is_italicized).to be_nil
|
|
158
|
-
@cell.change_font_italics(true)
|
|
159
|
-
expect(@cell.is_italicized).to eq(true)
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
describe '.change_font_bold' do
|
|
164
|
-
it 'should make cell font bolded when true is passed' do
|
|
165
|
-
expect(@cell.is_bolded).to be_nil
|
|
166
|
-
@cell.change_font_bold(true)
|
|
167
|
-
expect(@cell.is_bolded).to eq(true)
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
describe '.change_font_underline' do
|
|
172
|
-
it 'should make cell font underlined when true is passed' do
|
|
173
|
-
expect(@cell.is_underlined).to be_nil
|
|
174
|
-
@cell.change_font_underline(true)
|
|
175
|
-
expect(@cell.is_underlined).to eq(true)
|
|
176
|
-
end
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
describe '.change_font_strikethrough' do
|
|
180
|
-
it 'should make cell font struckthrough when true is passed' do
|
|
181
|
-
expect(@cell.is_struckthrough).to be_nil
|
|
182
|
-
@cell.change_font_strikethrough(true)
|
|
183
|
-
expect(@cell.is_struckthrough).to eq(true)
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
describe '.change_horizontal_alignment' do
|
|
188
|
-
it 'should cause cell to horizontally align as specified by the passed in string' do
|
|
189
|
-
expect(@cell.horizontal_alignment).to be_nil
|
|
190
|
-
@cell.change_horizontal_alignment('center')
|
|
191
|
-
expect(@cell.horizontal_alignment).to eq('center')
|
|
192
|
-
end
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
describe '.change_vertical_alignment' do
|
|
196
|
-
it 'should cause cell to vertically align as specified by the passed in string' do
|
|
197
|
-
expect(@cell.vertical_alignment).to be_nil
|
|
198
|
-
@cell.change_vertical_alignment('center')
|
|
199
|
-
expect(@cell.vertical_alignment).to eq('center')
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
describe '.change_wrap' do
|
|
204
|
-
it 'should cause cell to wrap align as specified by the passed in value' do
|
|
205
|
-
expect(@cell.text_wrap).to be_nil
|
|
206
|
-
@cell.change_text_wrap(true)
|
|
207
|
-
expect(@cell.text_wrap).to eq(true)
|
|
208
|
-
end
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
describe '.change_text_indent' do
|
|
212
|
-
it 'should cause the cell to have the corresponding text indent' do
|
|
213
|
-
expect(@cell.text_indent).to be_nil
|
|
214
|
-
@cell.change_text_indent(2)
|
|
215
|
-
expect(@cell.text_indent).to eq(2)
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
it 'should not cause other cells with the same style to have text indent' do
|
|
219
|
-
another_cell = @worksheet[1][0]
|
|
220
|
-
another_cell.style_index = @cell.style_index
|
|
221
|
-
expect(another_cell.text_indent).to be_nil
|
|
222
|
-
@cell.change_text_indent(2)
|
|
223
|
-
expect(another_cell.text_indent).to be_nil
|
|
224
|
-
end
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
describe '.change_border_color' do
|
|
228
|
-
it 'should cause cell to have a colored top border' do
|
|
229
|
-
expect(@cell.get_border_color(:top)).to be_nil
|
|
230
|
-
@cell.change_border_color(:top, 'FF0000')
|
|
231
|
-
expect(@cell.get_border_color(:top)).to eq('FF0000')
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
it 'should cause cell to have a colored bottom border' do
|
|
235
|
-
expect(@cell.get_border_color(:bottom)).to be_nil
|
|
236
|
-
@cell.change_border_color(:bottom, 'FF0000')
|
|
237
|
-
expect(@cell.get_border_color(:bottom)).to eq('FF0000')
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
it 'should cause cell to have a colored left border' do
|
|
241
|
-
expect(@cell.get_border_color(:left)).to be_nil
|
|
242
|
-
@cell.change_border_color(:left, 'FF0000')
|
|
243
|
-
expect(@cell.get_border_color(:left)).to eq('FF0000')
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
it 'should cause cell to have a colored right border' do
|
|
247
|
-
expect(@cell.get_border_color(:right)).to be_nil
|
|
248
|
-
@cell.change_border_color(:right, 'FF0000')
|
|
249
|
-
expect(@cell.get_border_color(:right)).to eq('FF0000')
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
it 'should cause cell to have a colored diagonal border' do
|
|
253
|
-
expect(@cell.get_border_color(:diagonal)).to be_nil
|
|
254
|
-
@cell.change_border_color(:diagonal, 'FF0000')
|
|
255
|
-
expect(@cell.get_border_color(:diagonal)).to eq('FF0000')
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
it 'is not overridden if the border style is set afterwards' do
|
|
259
|
-
expect(@cell.get_border_color(:top)).to be_nil
|
|
260
|
-
expect(@cell.get_border(:top)).to be_nil
|
|
261
|
-
@cell.change_border_color(:top, 'FF0000')
|
|
262
|
-
@cell.change_border(:top, 'thin')
|
|
263
|
-
expect(@cell.get_border_color(:top)).to eq('FF0000')
|
|
264
|
-
expect(@cell.get_border(:top)).to eq('thin')
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
it 'should not change the border color of another cell with the same style' do
|
|
268
|
-
another_cell = @worksheet[0][1]
|
|
269
|
-
@cell.change_border(:right, 'medium')
|
|
270
|
-
another_cell.change_border(:right, 'medium')
|
|
271
|
-
@cell.change_border_color(:right, 'FF0000')
|
|
272
|
-
another_cell.change_border_color(:right, '008000')
|
|
273
|
-
expect(@cell.get_border_color(:right)).to eq('FF0000')
|
|
274
|
-
expect(another_cell.get_border_color(:right)).to eq('008000')
|
|
275
|
-
end
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
describe '.change_border' do
|
|
279
|
-
it 'should cause cell to have border at top with specified weight' do
|
|
280
|
-
expect(@cell.get_border(:top)).to be_nil
|
|
281
|
-
@cell.change_border(:top, 'thin')
|
|
282
|
-
expect(@cell.get_border(:top)).to eq('thin')
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
it 'should cause cell to have border at right with specified weight' do
|
|
286
|
-
expect(@cell.get_border(:right)).to be_nil
|
|
287
|
-
@cell.change_border(:right, 'thin')
|
|
288
|
-
expect(@cell.get_border(:right)).to eq('thin')
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
it 'should cause cell to have border at left with specified weight' do
|
|
292
|
-
expect(@cell.get_border(:left)).to be_nil
|
|
293
|
-
@cell.change_border(:left, 'thin')
|
|
294
|
-
expect(@cell.get_border(:left)).to eq('thin')
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
it 'should cause cell to have border at bottom with specified weight' do
|
|
298
|
-
expect(@cell.get_border(:bottom)).to be_nil
|
|
299
|
-
@cell.change_border(:bottom, 'thin')
|
|
300
|
-
expect(@cell.get_border(:bottom)).to eq('thin')
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
it 'should cause cell to have border at diagonal with specified weight' do
|
|
304
|
-
expect(@cell.get_border(:diagonal)).to be_nil
|
|
305
|
-
@cell.change_border(:diagonal, 'thin')
|
|
306
|
-
expect(@cell.get_border(:diagonal)).to eq('thin')
|
|
307
|
-
end
|
|
308
|
-
end
|
|
309
|
-
|
|
310
|
-
describe '.value' do
|
|
311
|
-
it 'should return the value of a date' do
|
|
312
|
-
date = Date.parse('January 1, 2011')
|
|
313
|
-
@cell.change_contents(date)
|
|
314
|
-
expect(@cell).to receive(:is_date?).at_least(1).and_return(true)
|
|
315
|
-
expect(@cell.value).to eq(date)
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
it 'should properly return value of inlineStr' do
|
|
319
|
-
cell = @worksheet.add_cell(5, 5, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => 'Hello')))
|
|
320
|
-
expect(cell.value).to eq('Hello')
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
it 'should properly handle numeric values' do
|
|
324
|
-
@cell.datatype = nil
|
|
325
|
-
@cell.raw_value = '1'
|
|
326
|
-
expect(@cell.value).to eq(1)
|
|
327
|
-
|
|
328
|
-
@cell.raw_value = '10000000'
|
|
329
|
-
expect(@cell.value).to eq(10000000)
|
|
330
|
-
|
|
331
|
-
@cell.raw_value = '-10'
|
|
332
|
-
expect(@cell.value).to eq(-10)
|
|
333
|
-
|
|
334
|
-
@cell.raw_value = '0'
|
|
335
|
-
expect(@cell.value).to eq(0)
|
|
336
|
-
|
|
337
|
-
@cell.raw_value = '0.001'
|
|
338
|
-
expect(@cell.value).to eq(0.001)
|
|
339
|
-
|
|
340
|
-
@cell.raw_value = '-0.00000000001'
|
|
341
|
-
expect(@cell.value).to eq(-0.00000000001)
|
|
342
|
-
|
|
343
|
-
@cell.raw_value = '1E5'
|
|
344
|
-
expect(@cell.value).to eq(100000.0)
|
|
345
|
-
|
|
346
|
-
@cell.raw_value = '1E0'
|
|
347
|
-
expect(@cell.value).to eq(1.0)
|
|
348
|
-
|
|
349
|
-
@cell.raw_value = '1E-5'
|
|
350
|
-
expect(@cell.value).to eq(0.00001)
|
|
351
|
-
|
|
352
|
-
@cell.raw_value = '-1E5'
|
|
353
|
-
expect(@cell.value).to eq(-100000.0)
|
|
354
|
-
|
|
355
|
-
@cell.raw_value = '-1E0'
|
|
356
|
-
expect(@cell.value).to eq(-1.0)
|
|
357
|
-
|
|
358
|
-
@cell.raw_value = '-1E-5'
|
|
359
|
-
expect(@cell.value).to eq(-0.00001)
|
|
360
|
-
|
|
361
|
-
@cell.raw_value = '1DE-5'
|
|
362
|
-
expect(@cell.value).to eq('1DE-5')
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
context '1900-based dates' do
|
|
366
|
-
before(:each) { @workbook.date1904 = false }
|
|
367
|
-
it 'should convert date numbers correctly' do
|
|
368
|
-
date = 41019
|
|
369
|
-
@cell.change_contents(date)
|
|
370
|
-
expect(@cell).to receive(:is_date?).at_least(1).and_return(true)
|
|
371
|
-
expect(@cell.value).to eq(Date.parse('April 20, 2012'))
|
|
372
|
-
@cell.change_contents(35981)
|
|
373
|
-
expect(@cell.value).to eq(Date.parse('July 5, 1998'))
|
|
374
|
-
@cell.change_contents(0.019467592592592595)
|
|
375
|
-
expect(@cell.value).to eq(DateTime.parse('1899-12-31T00:28:02+00:00'))
|
|
376
|
-
@cell.change_contents(1)
|
|
377
|
-
expect(@cell.value).to eq(Date.parse('January 1, 1900'))
|
|
378
|
-
@cell.change_contents(59)
|
|
379
|
-
expect(@cell.value).to eq(Date.parse('February 28, 1900'))
|
|
380
|
-
@cell.change_contents(60)
|
|
381
|
-
# There's no way Ruby can return the nonexistent February 29th, so it has to be March 1st:
|
|
382
|
-
expect(@cell.value).to eq(Date.parse('March 1, 1900'))
|
|
383
|
-
@cell.change_contents(61)
|
|
384
|
-
expect(@cell.value).to eq(Date.parse('March 1, 1900'))
|
|
385
|
-
end
|
|
386
|
-
end
|
|
387
|
-
|
|
388
|
-
context '1904-based dates' do
|
|
389
|
-
before(:each) { @workbook.date1904 = true }
|
|
390
|
-
it 'should convert date numbers correctly' do
|
|
391
|
-
date = 39557
|
|
392
|
-
@cell.change_contents(date)
|
|
393
|
-
expect(@cell).to receive(:is_date?).at_least(1).and_return(true)
|
|
394
|
-
expect(@cell.value).to eq(Date.parse('April 20, 2012'))
|
|
395
|
-
@cell.change_contents(34519)
|
|
396
|
-
expect(@cell.value).to eq(Date.parse('July 5, 1998'))
|
|
397
|
-
end
|
|
398
|
-
end
|
|
399
|
-
|
|
400
|
-
context 'date before January 1, 1900' do
|
|
401
|
-
it 'should parse as date' do
|
|
402
|
-
@cell.set_number_format('h:mm:ss')
|
|
403
|
-
@cell.datatype = nil
|
|
404
|
-
|
|
405
|
-
@cell.raw_value = '0.97726851851851848'
|
|
406
|
-
expect(@cell.is_date?).to be(true)
|
|
407
|
-
expect(@cell.value).to eq(DateTime.parse('1899-12-31 23:27:16'))
|
|
408
|
-
@cell.raw_value = '1.9467592592592595E-2'
|
|
409
|
-
expect(@cell.is_date?).to be(true)
|
|
410
|
-
expect(@cell.value).to eq(DateTime.parse('1899-12-31 00:28:02'))
|
|
411
|
-
end
|
|
412
|
-
end
|
|
413
|
-
|
|
414
|
-
context 'with RichText' do
|
|
415
|
-
it 'returns the value of the RichText' do
|
|
416
|
-
cell = RubyXL::Cell.new(is: RubyXL::RichText.new(t: RubyXL::Text.new(value: 'test')))
|
|
417
|
-
expect(cell.value).to eq('test')
|
|
418
|
-
end
|
|
419
|
-
end
|
|
420
|
-
end
|
|
421
|
-
|
|
422
|
-
describe '.change_contents' do
|
|
423
|
-
it 'should cause cell value to match string or number that is passed in' do
|
|
424
|
-
@cell.change_contents('TEST')
|
|
425
|
-
expect(@cell.value).to eq('TEST')
|
|
426
|
-
expect(@cell.formula).to be_nil
|
|
427
|
-
end
|
|
428
|
-
|
|
429
|
-
it 'should cause cell value to match a date that is passed in' do
|
|
430
|
-
date = Date.parse('January 1, 2011')
|
|
431
|
-
@cell.change_contents(date)
|
|
432
|
-
expect(@cell).to receive(:is_date?).at_least(1).and_return(true)
|
|
433
|
-
expect(@cell.value).to eq(date)
|
|
434
|
-
expect(@cell.datatype).to be_nil
|
|
435
|
-
expect(@cell.formula).to be_nil
|
|
436
|
-
end
|
|
437
|
-
|
|
438
|
-
it 'should cause cell value to match a time that is passed in' do
|
|
439
|
-
time = Time.parse('January 1, 2011')
|
|
440
|
-
@cell.change_contents(time)
|
|
441
|
-
expect(@cell).to receive(:is_date?).at_least(1).and_return(true)
|
|
442
|
-
expect(@cell.value).to eq(time.to_datetime)
|
|
443
|
-
expect(@cell.datatype).to be_nil
|
|
444
|
-
expect(@cell.formula).to be_nil
|
|
445
|
-
end
|
|
446
|
-
|
|
447
|
-
it 'should case cell value to match a Float that is passed in' do
|
|
448
|
-
number = 1.25
|
|
449
|
-
@cell.change_contents(number)
|
|
450
|
-
expect(@cell.value).to eq(number)
|
|
451
|
-
expect(@cell.datatype).to be_nil
|
|
452
|
-
expect(@cell.formula).to be_nil
|
|
453
|
-
end
|
|
454
|
-
|
|
455
|
-
it 'should case cell value to match an Integer that is passed in' do
|
|
456
|
-
number = 1234567
|
|
457
|
-
@cell.change_contents(number)
|
|
458
|
-
expect(@cell.value).to eq(number)
|
|
459
|
-
expect(@cell.datatype).to be_nil
|
|
460
|
-
expect(@cell.formula).to be_nil
|
|
461
|
-
end
|
|
462
|
-
|
|
463
|
-
it 'should cause cell value to match a BigDecimal that is passed in' do
|
|
464
|
-
number = BigDecimal('1234.5678')
|
|
465
|
-
@cell.change_contents(number)
|
|
466
|
-
expect(@cell.value).to eq(number)
|
|
467
|
-
expect(@cell.datatype).to be_nil
|
|
468
|
-
expect(@cell.formula).to be_nil
|
|
469
|
-
end
|
|
470
|
-
|
|
471
|
-
it 'should cause cell value and formula to match what is passed in' do
|
|
472
|
-
@cell.change_contents(nil, 'SUM(A2:A4)')
|
|
473
|
-
expect(@cell.value).to be_nil
|
|
474
|
-
expect(@cell.formula.expression).to eq('SUM(A2:A4)')
|
|
475
|
-
end
|
|
476
|
-
end
|
|
477
|
-
|
|
478
|
-
describe '.is_italicized' do
|
|
479
|
-
it 'should correctly return whether or not the cell\'s font is italicized' do
|
|
480
|
-
@cell.change_font_italics(true)
|
|
481
|
-
expect(@cell.is_italicized).to eq(true)
|
|
482
|
-
end
|
|
483
|
-
end
|
|
484
|
-
|
|
485
|
-
describe '.is_bolded' do
|
|
486
|
-
it 'should correctly return whether or not the cell\'s font is bolded' do
|
|
487
|
-
@cell.change_font_bold(true)
|
|
488
|
-
expect(@cell.is_bolded).to eq(true)
|
|
489
|
-
end
|
|
490
|
-
end
|
|
491
|
-
|
|
492
|
-
describe '.is_underlined' do
|
|
493
|
-
it 'should correctly return whether or not the cell\'s font is underlined' do
|
|
494
|
-
@cell.change_font_underline(true)
|
|
495
|
-
expect(@cell.is_underlined).to eq(true)
|
|
496
|
-
end
|
|
497
|
-
end
|
|
498
|
-
|
|
499
|
-
describe '.is_struckthrough' do
|
|
500
|
-
it 'should correctly return whether or not the cell\'s font is struckthrough' do
|
|
501
|
-
@cell.change_font_strikethrough(true)
|
|
502
|
-
expect(@cell.is_struckthrough).to eq(true)
|
|
503
|
-
end
|
|
504
|
-
end
|
|
505
|
-
|
|
506
|
-
describe '.font_name' do
|
|
507
|
-
it 'should correctly return the name of the cell\'s font' do
|
|
508
|
-
@cell.change_font_name('Verdana')
|
|
509
|
-
expect(@cell.font_name).to eq('Verdana')
|
|
510
|
-
end
|
|
511
|
-
end
|
|
512
|
-
|
|
513
|
-
describe '.font_size' do
|
|
514
|
-
it 'should correctly return the size of the cell\'s font' do
|
|
515
|
-
@cell.change_font_size(20)
|
|
516
|
-
expect(@cell.font_size).to eq(20)
|
|
517
|
-
end
|
|
518
|
-
end
|
|
519
|
-
|
|
520
|
-
describe '.font_color' do
|
|
521
|
-
it 'should correctly return the color of the cell\'s font' do
|
|
522
|
-
@cell.change_font_color('0f0f0f')
|
|
523
|
-
expect(@cell.font_color).to eq('0f0f0f')
|
|
524
|
-
end
|
|
525
|
-
|
|
526
|
-
it 'should return 000000 (black) if no font color has been specified for this cell' do
|
|
527
|
-
expect(@cell.font_color).to eq('000000')
|
|
528
|
-
end
|
|
529
|
-
end
|
|
530
|
-
|
|
531
|
-
describe '.fill_color' do
|
|
532
|
-
it 'should correctly return the color of the cell\'s fill' do
|
|
533
|
-
@cell.change_fill('000000')
|
|
534
|
-
expect(@cell.fill_color).to eq('000000')
|
|
535
|
-
end
|
|
536
|
-
|
|
537
|
-
it 'should return ffffff (white) if no fill color has been specified for this cell' do
|
|
538
|
-
expect(@cell.fill_color).to eq('ffffff')
|
|
539
|
-
end
|
|
540
|
-
end
|
|
541
|
-
|
|
542
|
-
describe '.horizontal_alignment' do
|
|
543
|
-
it 'should correctly return the type of horizontal alignment of this cell' do
|
|
544
|
-
@cell.change_horizontal_alignment('center')
|
|
545
|
-
expect(@cell.horizontal_alignment).to eq('center')
|
|
546
|
-
end
|
|
547
|
-
|
|
548
|
-
it 'should return nil if no horizontal alignment has been specified for this cell' do
|
|
549
|
-
expect(@cell.horizontal_alignment).to be_nil
|
|
550
|
-
end
|
|
551
|
-
|
|
552
|
-
it 'should not create new XFs when changing alignment to already existing values' do
|
|
553
|
-
@cell.change_horizontal_alignment('left')
|
|
554
|
-
style_xf1 = @cell.style_index
|
|
555
|
-
@cell.change_horizontal_alignment('right')
|
|
556
|
-
expect(@cell.style_index).not_to eq(style_xf1)
|
|
557
|
-
style_xf2 = @cell.style_index
|
|
558
|
-
@cell.change_horizontal_alignment('left')
|
|
559
|
-
expect(@cell.style_index).to eq(style_xf1)
|
|
560
|
-
@cell.change_horizontal_alignment('right')
|
|
561
|
-
expect(@cell.style_index).to eq(style_xf2)
|
|
562
|
-
end
|
|
563
|
-
end
|
|
564
|
-
|
|
565
|
-
describe '.vertical_alignment' do
|
|
566
|
-
it 'should correctly return the type of vertical alignment of this cell' do
|
|
567
|
-
@cell.change_vertical_alignment('center')
|
|
568
|
-
expect(@cell.vertical_alignment).to eq('center')
|
|
569
|
-
end
|
|
570
|
-
|
|
571
|
-
it 'should return nil if no vertical alignment has been specified for this cell' do
|
|
572
|
-
expect(@cell.vertical_alignment).to be_nil
|
|
573
|
-
end
|
|
574
|
-
end
|
|
575
|
-
|
|
576
|
-
describe '.border_top' do
|
|
577
|
-
it 'should correctly return the weight of the border on top for this cell' do
|
|
578
|
-
@cell.change_border(:top, 'thin')
|
|
579
|
-
expect(@cell.get_border(:top)).to eq('thin')
|
|
580
|
-
end
|
|
581
|
-
|
|
582
|
-
it 'should return nil if no top border has been specified for this cell' do
|
|
583
|
-
expect(@cell.get_border(:top)).to be_nil
|
|
584
|
-
end
|
|
585
|
-
end
|
|
586
|
-
|
|
587
|
-
describe '.border_left' do
|
|
588
|
-
it 'should correctly return the weight of the border on left for this cell' do
|
|
589
|
-
@cell.change_border(:left, 'thin')
|
|
590
|
-
expect(@cell.get_border(:left)).to eq('thin')
|
|
591
|
-
end
|
|
592
|
-
|
|
593
|
-
it 'should return nil if no left border has been specified for this cell' do
|
|
594
|
-
expect(@cell.get_border(:left)).to be_nil
|
|
595
|
-
end
|
|
596
|
-
end
|
|
597
|
-
|
|
598
|
-
describe '.border_right' do
|
|
599
|
-
it 'should correctly return the weight of the border on right for this cell' do
|
|
600
|
-
@cell.change_border(:right, 'thin')
|
|
601
|
-
expect(@cell.get_border(:right)).to eq('thin')
|
|
602
|
-
end
|
|
603
|
-
|
|
604
|
-
it 'should return nil if no right border has been specified for this cell' do
|
|
605
|
-
expect(@cell.get_border(:right)).to be_nil
|
|
606
|
-
end
|
|
607
|
-
end
|
|
608
|
-
|
|
609
|
-
describe '.border_bottom' do
|
|
610
|
-
it 'should correctly return the weight of the border on bottom for this cell' do
|
|
611
|
-
@cell.change_border(:bottom, 'thin')
|
|
612
|
-
expect(@cell.get_border(:bottom)).to eq('thin')
|
|
613
|
-
end
|
|
614
|
-
|
|
615
|
-
it 'should return nil if no bottom border has been specified for this cell' do
|
|
616
|
-
expect(@cell.get_border(:bottom)).to be_nil
|
|
617
|
-
end
|
|
618
|
-
end
|
|
619
|
-
|
|
620
|
-
describe '.border_diagonal' do
|
|
621
|
-
it 'should correctly return the weight of the diagonal border for this cell' do
|
|
622
|
-
@cell.change_border(:diagonal, 'thin')
|
|
623
|
-
expect(@cell.get_border(:diagonal)).to eq('thin')
|
|
624
|
-
end
|
|
625
|
-
|
|
626
|
-
it 'should return nil if no diagonal border has been specified for this cell' do
|
|
627
|
-
expect(@cell.get_border(:diagonal)).to be_nil
|
|
628
|
-
end
|
|
629
|
-
end
|
|
630
|
-
|
|
631
|
-
describe '.text_rotation' do
|
|
632
|
-
it 'should correctly return the rotation for this cell' do
|
|
633
|
-
expect(@cell.text_rotation).to be_nil
|
|
634
|
-
@cell.change_text_rotation(45)
|
|
635
|
-
expect(@cell.text_rotation).to eq(45)
|
|
636
|
-
end
|
|
637
|
-
end
|
|
638
|
-
|
|
639
|
-
describe '.add_shared_string' do
|
|
640
|
-
let(:add_shared_string) { Article.create(title: 'test', description: 'test') }
|
|
641
|
-
|
|
642
|
-
it 'should correctly add a new shared string to the list' do
|
|
643
|
-
@cell = @worksheet.add_cell(7, 0, 1)
|
|
644
|
-
expect(@cell.datatype).to be_nil
|
|
645
|
-
|
|
646
|
-
prior_strings = @workbook.shared_strings_container.strings.dup
|
|
647
|
-
@cell.add_shared_string('testTEST')
|
|
648
|
-
expect(@workbook.shared_strings_container.strings.size).to eq(prior_strings.size + 1)
|
|
649
|
-
expect(@cell.datatype).to eq(RubyXL::DataType::SHARED_STRING)
|
|
650
|
-
expect(@cell.value).to eq('testTEST')
|
|
651
|
-
end
|
|
652
|
-
end
|
|
653
|
-
|
|
654
|
-
describe '.remove_formula' do
|
|
655
|
-
it 'should removes formula and update calculation chain' do
|
|
656
|
-
cell = @worksheet.add_cell(0, 0, 10, 'A2+1')
|
|
657
|
-
@workbook.calculation_chain = RubyXL::CalculationChain.new({
|
|
658
|
-
cells: [
|
|
659
|
-
RubyXL::CalculationChainCell.new(ref: RubyXL::Reference.new(0, 0)),
|
|
660
|
-
RubyXL::CalculationChainCell.new(ref: RubyXL::Reference.new(1, 0))
|
|
661
|
-
]
|
|
662
|
-
})
|
|
663
|
-
|
|
664
|
-
expect(cell.formula).to_not be_nil
|
|
665
|
-
|
|
666
|
-
cell.remove_formula
|
|
667
|
-
|
|
668
|
-
expect(cell.formula).to be_nil
|
|
669
|
-
expect(@workbook.calculation_chain.cells.size).to eq(1)
|
|
670
|
-
expect(@workbook.calculation_chain.cells.first.ref.first_row).to eq(1)
|
|
671
|
-
end
|
|
672
|
-
end
|
|
673
|
-
|
|
674
|
-
describe '#write_xml' do
|
|
675
|
-
it 'properly serializes the Cell with value' do
|
|
676
|
-
cell = @worksheet.add_cell(101, 101, 123)
|
|
677
|
-
xml_str = cell.write_xml.split("\n").last
|
|
678
|
-
expect(xml_str).to eq('<c r="CX102" s="0"><v>123</v></c>')
|
|
679
|
-
end
|
|
680
|
-
|
|
681
|
-
it 'properly serializes the Cell with a Formula' do
|
|
682
|
-
cell = @worksheet.add_cell(102, 102, nil, 'SUM(A1:A10)')
|
|
683
|
-
xml_str = cell.write_xml.split("\n").last
|
|
684
|
-
expect(xml_str).to eq('<c r="CY103" s="0"><f>SUM(A1:A10)</f></c>')
|
|
685
|
-
end
|
|
686
|
-
|
|
687
|
-
it 'properly serializes the Cell with inline string' do
|
|
688
|
-
cell = @worksheet.add_cell(103, 103)
|
|
689
|
-
cell.is = RubyXL::RichText.new(t: RubyXL::Text.new(value: 'Inline text'))
|
|
690
|
-
xml_str = cell.write_xml.split("\n").last
|
|
691
|
-
expect(xml_str).to eq('<c r="CZ104" s="0" t="str"><is><t>Inline text</t></is></c>')
|
|
692
|
-
end
|
|
693
|
-
end
|
|
694
|
-
end
|