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
data/lib/rubyXL/objects/fill.rb
CHANGED
|
@@ -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
|
module RubyXL
|
|
6
8
|
# http://www.datypic.com/sc/ooxml/e-ssml_dateGroupItem-1.html
|
data/lib/rubyXL/objects/font.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'container_nodes'
|
|
5
|
+
require_relative 'color'
|
|
4
6
|
|
|
5
7
|
module RubyXL
|
|
6
8
|
# http://www.datypic.com/sc/ooxml/e-ssml_font-1.html
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'nokogiri'
|
|
2
2
|
require 'pathname'
|
|
3
|
-
|
|
3
|
+
require_relative 'reference'
|
|
4
4
|
|
|
5
5
|
module RubyXL
|
|
6
6
|
module OOXMLObjectClassMethods
|
|
@@ -34,7 +34,7 @@ module RubyXL
|
|
|
34
34
|
# * +:bool+ - <tt>Boolean</tt> ("1" and "true" convert to +true+, others to +false+)
|
|
35
35
|
# * one of +simple_types+ - <tt>String</tt>, plus the list of acceptable values is saved for future validation (not used yet).
|
|
36
36
|
# * +extra_parameters+ - Hash of optional parameters as follows:
|
|
37
|
-
# * +:accessor+ - Name of the accessor for this attribute to be defined on the object. If not provided, defaults to
|
|
37
|
+
# * +:accessor+ - Name of the accessor for this attribute to be defined on the object. If not provided, defaults to snakecased +attribute_name+.
|
|
38
38
|
# * +:default+ - Value this attribute defaults to if not explicitly provided.
|
|
39
39
|
# * +:required+ - Whether this attribute is required when writing XML. If the value of the attrinute is not explicitly provided, +:default+ is written instead.
|
|
40
40
|
# * +:computed+ - Do not store this attribute on +parse+, but do call the object-provided read accessor on +write_xml+.
|
|
@@ -52,6 +52,8 @@ module RubyXL
|
|
|
52
52
|
attr_hash = { :attr_type => attr_type }
|
|
53
53
|
attr_hash.merge!(extra_params) if extra_params
|
|
54
54
|
attr_hash[:accessor] ||= accessorize(attr_name)
|
|
55
|
+
attr_hash[:instance_var] ||= "@#{attr_hash[:accessor]}".to_sym
|
|
56
|
+
attr_hash[:setter] ||= "#{attr_hash[:accessor]}=".to_sym
|
|
55
57
|
attrs[attr_name.to_s] = attr_hash
|
|
56
58
|
self.send(:attr_accessor, attr_hash[:accessor]) unless attr_hash[:computed]
|
|
57
59
|
end
|
|
@@ -89,7 +91,9 @@ module RubyXL
|
|
|
89
91
|
child_nodes[child_node_name] = {
|
|
90
92
|
:class => klass,
|
|
91
93
|
:is_array => extra_params[:collection],
|
|
92
|
-
:accessor => accessor
|
|
94
|
+
:accessor => accessor,
|
|
95
|
+
:setter => "#{accessor}=".to_sym,
|
|
96
|
+
:instance_var => "@#{accessor}".to_sym
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
define_count_attribute if extra_params[:collection] == :with_count
|
|
@@ -164,7 +168,7 @@ module RubyXL
|
|
|
164
168
|
end
|
|
165
169
|
|
|
166
170
|
child_node_params = known_child_nodes[child_node_name]
|
|
167
|
-
raise "Unknown child node [#{child_node_name}] for element [#{node.name}]" if child_node_params.nil?
|
|
171
|
+
raise(RuntimeError, "Unknown child node [#{child_node_name}] for element [#{node.name}]") if child_node_params.nil?
|
|
168
172
|
parsed_object = child_node_params[:class].parse(child_node, known_namespaces)
|
|
169
173
|
if child_node_params[:is_array] then
|
|
170
174
|
index = parsed_object.index_in_collection
|
|
@@ -179,7 +183,7 @@ module RubyXL
|
|
|
179
183
|
collection[index] = parsed_object
|
|
180
184
|
end
|
|
181
185
|
else
|
|
182
|
-
obj.send(
|
|
186
|
+
obj.send(child_node_params[:setter], parsed_object)
|
|
183
187
|
end
|
|
184
188
|
}
|
|
185
189
|
end
|
|
@@ -208,10 +212,10 @@ module RubyXL
|
|
|
208
212
|
when :int then Integer(raw_value)
|
|
209
213
|
when :uint then
|
|
210
214
|
v = Integer(raw_value)
|
|
211
|
-
raise
|
|
215
|
+
raise(ArgumentError, "Invalid value for unsigned Integer(): \"#{raw_value}\"") if v < 0
|
|
212
216
|
v
|
|
213
217
|
end
|
|
214
|
-
obj.send(
|
|
218
|
+
obj.send(params[:setter], val)
|
|
215
219
|
end
|
|
216
220
|
end
|
|
217
221
|
|
|
@@ -230,10 +234,9 @@ module RubyXL
|
|
|
230
234
|
|
|
231
235
|
def initialize(params = nil)
|
|
232
236
|
@local_namespaces = nil
|
|
233
|
-
params ||= {}
|
|
234
237
|
|
|
235
238
|
obtain_class_variable(:@@ooxml_attributes).each_value { |v|
|
|
236
|
-
instance_variable_set(
|
|
239
|
+
instance_variable_set(v[:instance_var], params&.[](v[:accessor])) unless v[:computed]
|
|
237
240
|
}
|
|
238
241
|
|
|
239
242
|
init_child_nodes(params)
|
|
@@ -242,15 +245,14 @@ module RubyXL
|
|
|
242
245
|
def init_child_nodes(params)
|
|
243
246
|
obtain_class_variable(:@@ooxml_child_nodes).each_value { |v|
|
|
244
247
|
initial_value =
|
|
245
|
-
if params
|
|
248
|
+
if params&.has_key?(v[:accessor]) then params[v[:accessor]]
|
|
246
249
|
elsif v[:is_array] then []
|
|
247
250
|
else nil
|
|
248
251
|
end
|
|
249
252
|
|
|
250
|
-
instance_variable_set(
|
|
253
|
+
instance_variable_set(v[:instance_var], initial_value)
|
|
251
254
|
}
|
|
252
255
|
end
|
|
253
|
-
private :init_child_nodes
|
|
254
256
|
|
|
255
257
|
def preserve_whitespace
|
|
256
258
|
self.xml_space = (value.is_a?(String) && ((value =~ /\A\s/) || (value =~ /\s\Z/) || value.include?("\n"))) ? 'preserve' : nil
|
|
@@ -395,7 +397,7 @@ module RubyXL
|
|
|
395
397
|
def init_child_nodes(params)
|
|
396
398
|
obtain_class_variable(:@@ooxml_child_nodes).each_value { |v|
|
|
397
399
|
next if v[:is_array] # Only one collection node allowed per OOXMLContainerObject, and it is contained in itself.
|
|
398
|
-
instance_variable_set(
|
|
400
|
+
instance_variable_set(v[:instance_var], params[v[:accessor]])
|
|
399
401
|
}
|
|
400
402
|
end
|
|
401
403
|
protected :init_child_nodes
|
|
@@ -405,9 +407,7 @@ module RubyXL
|
|
|
405
407
|
end
|
|
406
408
|
|
|
407
409
|
def inspect
|
|
408
|
-
|
|
409
|
-
vars = self.instance_variables.each { |v| vars << "#{v}=#{instance_variable_get(v).inspect}" }
|
|
410
|
-
"<#{self.class}: #{super} #{vars.join(", ")}>"
|
|
410
|
+
"<#{self.class}: #{super} #{self.instance_variables.collect{ |v| "#{v}=#{instance_variable_get(v).inspect}" }.join(', ')}>"
|
|
411
411
|
end
|
|
412
412
|
|
|
413
413
|
class << self
|
|
@@ -430,7 +430,7 @@ module RubyXL
|
|
|
430
430
|
# Prototype method. For top-level OOXML object, returns the path at which the current object's XML file
|
|
431
431
|
# is located within the <tt>.xlsx</tt> zip container.
|
|
432
432
|
def xlsx_path
|
|
433
|
-
raise 'Subclass responsebility'
|
|
433
|
+
raise RuntimeError, 'Subclass responsebility'
|
|
434
434
|
end
|
|
435
435
|
|
|
436
436
|
# Sets the list of namespaces on this object to be added when writing out XML. Valid only on top-level objects.
|
|
@@ -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
|
# Query Tables
|
|
8
10
|
# https://msdn.microsoft.com/en-us/library/hh643563(v=office.12).aspx
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
require_relative 'ooxml_object'
|
|
2
|
+
|
|
1
3
|
module RubyXL
|
|
2
4
|
class Reference
|
|
3
5
|
ROW_MAX = 1024 * 1024
|
|
4
6
|
COL_MAX = 16393
|
|
5
7
|
|
|
6
|
-
attr_reader :
|
|
8
|
+
attr_reader :first_row, :last_row, :first_col, :last_col
|
|
7
9
|
attr_reader :row_from_absolute, :row_to_absolute, :col_from_absolute, :col_to_absolute
|
|
10
|
+
attr_reader :sheet_name
|
|
8
11
|
|
|
9
12
|
# RubyXL::Reference.new(row, col)
|
|
10
13
|
# RubyXL::Reference.new(row_from, row_to, col_from, col_to)
|
|
@@ -33,56 +36,70 @@ module RubyXL
|
|
|
33
36
|
row_from, col_from, @row_from_absolute, @col_from_absolute = self.class.ref2ind(from)
|
|
34
37
|
row_to, col_to, @row_to_absolute, @col_to_absolute = self.class.ref2ind(to) unless to.nil?
|
|
35
38
|
else
|
|
36
|
-
raise
|
|
39
|
+
raise(ArgumentError, "Invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
|
|
37
40
|
end
|
|
38
41
|
end
|
|
39
42
|
|
|
40
|
-
@
|
|
41
|
-
@
|
|
43
|
+
@first_row = row_from || 0
|
|
44
|
+
@last_row = row_to || row_from || ROW_MAX
|
|
45
|
+
@first_col = col_from || 0
|
|
46
|
+
@last_col = col_to || col_from || COL_MAX
|
|
42
47
|
end
|
|
43
48
|
|
|
44
|
-
def
|
|
45
|
-
|
|
49
|
+
def row_range
|
|
50
|
+
warn "[DEPRECATION] `row_range` is deprecated. Please use `first_row` and `last_row` instead."
|
|
51
|
+
@row_range ||= Range.new(@first_row, @last_row)
|
|
46
52
|
end
|
|
47
53
|
|
|
48
|
-
def
|
|
49
|
-
|
|
54
|
+
def col_range
|
|
55
|
+
warn "[DEPRECATION] `col_range` is deprecated. Please use `first_col` and `last_col` instead."
|
|
56
|
+
@col_range ||= Range.new(@first_col, @last_col)
|
|
50
57
|
end
|
|
51
58
|
|
|
52
|
-
def
|
|
53
|
-
@
|
|
59
|
+
def single_cell?
|
|
60
|
+
(@first_row == @last_row) && (@first_col == @last_col)
|
|
54
61
|
end
|
|
55
62
|
|
|
56
|
-
def
|
|
57
|
-
@
|
|
63
|
+
def valid?
|
|
64
|
+
!(@first_row.negative? || @first_col.negative?)
|
|
58
65
|
end
|
|
59
66
|
|
|
60
|
-
def
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
def ==(other)
|
|
68
|
+
return false unless other.is_a?(RubyXL::Reference)
|
|
69
|
+
return false unless @sheet_name == other.sheet_name
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
(@first_row == other.first_row) &&
|
|
72
|
+
(@last_row == other.last_row) &&
|
|
73
|
+
(@first_col == other.first_col) &&
|
|
74
|
+
(@last_col == other.last_col)
|
|
66
75
|
end
|
|
67
76
|
|
|
68
|
-
def
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
def cover?(other)
|
|
78
|
+
return false unless other.is_a?(RubyXL::Reference)
|
|
79
|
+
return false if @sheet_name != other.sheet_name
|
|
80
|
+
|
|
81
|
+
(@first_row <= other.first_row) &&
|
|
82
|
+
(@last_row >= other.last_row) &&
|
|
83
|
+
(@first_col <= other.first_col) &&
|
|
84
|
+
(@last_col >= other.last_col)
|
|
71
85
|
end
|
|
72
86
|
|
|
73
|
-
def
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
87
|
+
def intersect?(other)
|
|
88
|
+
return false unless other.is_a?(RubyXL::Reference)
|
|
89
|
+
return false if @sheet_name != other.sheet_name
|
|
90
|
+
|
|
91
|
+
(((@first_row <= other.first_row) && (@last_row >= other.first_row)) ||
|
|
92
|
+
((@first_row <= other.last_row) && (@last_row >= other.last_row))) &&
|
|
93
|
+
(((@first_col <= other.first_col) && (@last_col >= other.first_col)) ||
|
|
94
|
+
((@first_col <= other.last_col) && (@last_col >= other.last_col)))
|
|
78
95
|
end
|
|
79
96
|
|
|
80
97
|
def to_s
|
|
81
98
|
result = +''
|
|
82
99
|
|
|
83
100
|
if @sheet_name then
|
|
84
|
-
if @sheet_name.
|
|
85
|
-
result << "'
|
|
101
|
+
if @sheet_name.include?(' ') then
|
|
102
|
+
result << "'" << @sheet_name << "'"
|
|
86
103
|
else
|
|
87
104
|
result << @sheet_name
|
|
88
105
|
end
|
|
@@ -90,19 +107,19 @@ module RubyXL
|
|
|
90
107
|
end
|
|
91
108
|
|
|
92
109
|
if single_cell? then
|
|
93
|
-
result << self.class.ind2ref(@
|
|
110
|
+
result << self.class.ind2ref(@first_row, @first_col, @row_from_absolute, @col_from_absolute)
|
|
94
111
|
else
|
|
95
|
-
result << self.class.ind2ref(@
|
|
112
|
+
result << self.class.ind2ref(@first_row, @first_col, @row_from_absolute, @col_from_absolute)
|
|
96
113
|
result << ':'
|
|
97
|
-
result << self.class.ind2ref(@
|
|
114
|
+
result << self.class.ind2ref(@last_row, @last_col, @row_to_absolute, @col_to_absolute)
|
|
98
115
|
end
|
|
99
116
|
end
|
|
100
117
|
|
|
101
118
|
def inspect
|
|
102
119
|
if single_cell? then
|
|
103
|
-
"#<#{self.class} @sheet_name=#{@sheet_name} @row=#{@
|
|
120
|
+
"#<#{self.class} @sheet_name=#{@sheet_name} @row=#{@first_row} @col=#{@first_col}>"
|
|
104
121
|
else
|
|
105
|
-
"#<#{self.class} @sheet_name=#{@sheet_name}
|
|
122
|
+
"#<#{self.class} @sheet_name=#{@sheet_name} rows=#{@first_row}..#{@last_row} cols=#{@first_col}..#{@last_col}>"
|
|
106
123
|
end
|
|
107
124
|
end
|
|
108
125
|
|
data/lib/rubyXL/objects/root.rb
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'zip'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
require_relative 'relationships'
|
|
5
|
+
require_relative 'document_properties'
|
|
6
|
+
require_relative 'content_types'
|
|
7
|
+
require_relative 'workbook'
|
|
6
8
|
|
|
7
9
|
module RubyXL
|
|
8
10
|
class WorkbookRoot
|
|
@@ -45,7 +47,14 @@ module RubyXL
|
|
|
45
47
|
|
|
46
48
|
self.rels_hash.keys.sort_by{ |c| c::SAVE_ORDER }.each { |klass|
|
|
47
49
|
puts "<-- DEBUG: saving related #{klass} files" if @@debug
|
|
48
|
-
|
|
50
|
+
# This is a hack.
|
|
51
|
+
# Technically, MS Excel allows one file to be shared amongst multiple sheets in the XLS document.
|
|
52
|
+
# That file exists in the archive structure only once, and all sheets refer to the same file by path.
|
|
53
|
+
# RubyXL uses a tree structure, where each sheet has its own "branches" (related objects),
|
|
54
|
+
# and loops in the relationship graph are not allowed (a child node can have onle one parent).
|
|
55
|
+
# This needs to be fixed in the future. Thankfully, files like that seem to be rare, and this
|
|
56
|
+
# situation can be avoided simply by not saving a node if it already exists in the zipfile.
|
|
57
|
+
self.rels_hash[klass].uniq{ |item| item.xlsx_path }.select! { |obj|
|
|
49
58
|
puts "<-- DEBUG: > #{obj.xlsx_path}" if @@debug
|
|
50
59
|
obj.add_to_zip(zipstream)
|
|
51
60
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'text'
|
|
5
|
+
require_relative 'extensions'
|
|
4
6
|
|
|
5
7
|
module RubyXL
|
|
6
8
|
# http://www.datypic.com/sc/ooxml/e-ssml_sst.html
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'ooxml_object'
|
|
4
|
+
require_relative 'simple_types'
|
|
5
|
+
require_relative 'text'
|
|
6
|
+
require_relative 'formula'
|
|
7
|
+
|
|
8
|
+
require_relative '../legacy_cell'
|
|
6
9
|
|
|
7
10
|
module RubyXL
|
|
8
11
|
# http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.cellvalues(v=office.14).aspx
|
|
@@ -23,6 +26,8 @@ module RubyXL
|
|
|
23
26
|
define_element_name 'v'
|
|
24
27
|
|
|
25
28
|
def before_write_xml
|
|
29
|
+
return false if (value.nil? || value == '')
|
|
30
|
+
self.value = RubyXL::Text.escape_bad_xml_chars(value)
|
|
26
31
|
preserve_whitespace
|
|
27
32
|
true
|
|
28
33
|
end
|
|
@@ -46,7 +51,7 @@ module RubyXL
|
|
|
46
51
|
attr_accessor :worksheet
|
|
47
52
|
|
|
48
53
|
def index_in_collection
|
|
49
|
-
r.
|
|
54
|
+
r.first_col
|
|
50
55
|
end
|
|
51
56
|
|
|
52
57
|
def row
|
|
@@ -109,7 +114,8 @@ module RubyXL
|
|
|
109
114
|
case datatype
|
|
110
115
|
when RubyXL::DataType::SHARED_STRING then workbook.shared_strings_container[r.to_i].to_s
|
|
111
116
|
when RubyXL::DataType::INLINE_STRING then is.to_s
|
|
112
|
-
when RubyXL::DataType::RAW_STRING then
|
|
117
|
+
when RubyXL::DataType::RAW_STRING then
|
|
118
|
+
raw_value&.gsub(RubyXL::Text::ESCAPED_UNICODE) { Regexp.last_match(1).hex.chr(::Encoding::UTF_8) }
|
|
113
119
|
when RubyXL::DataType::DATE then raw_value && DateTime.parse(raw_value)
|
|
114
120
|
when RubyXL::DataType::ERROR then nil
|
|
115
121
|
else
|
|
@@ -143,6 +149,11 @@ module RubyXL
|
|
|
143
149
|
# http://www.datypic.com/sc/ooxml/e-ssml_row-1.html
|
|
144
150
|
class Row < OOXMLObject
|
|
145
151
|
define_attribute(:r, :int)
|
|
152
|
+
# http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.row%28v=office.14%29.aspx
|
|
153
|
+
# "Optimization only, and not required. Specifies the range of non-empty columns (in the format X:Y)
|
|
154
|
+
# for the block of rows to which the current row belongs. To achieve the optimization, span attribute
|
|
155
|
+
# values in a single block should be the same.
|
|
156
|
+
# There are 16 rows per block, beginning with the first row."
|
|
146
157
|
define_attribute(:spans, :string)
|
|
147
158
|
define_attribute(:s, :int, :default => 0, :accessor => :style_index)
|
|
148
159
|
define_attribute(:customFormat, :bool, :default => false)
|