rubyXL 3.4.14 → 3.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -1
- data/.rubocop.yml +124 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +10 -8
- data/README.rdoc +32 -13
- data/Rakefile +26 -27
- data/VERSION +1 -1
- data/lib/rubyXL/cell.rb +2 -4
- data/lib/rubyXL/convenience_methods/cell.rb +36 -32
- data/lib/rubyXL/convenience_methods/color.rb +9 -13
- data/lib/rubyXL/convenience_methods/workbook.rb +10 -9
- data/lib/rubyXL/convenience_methods/worksheet.rb +103 -7
- data/lib/rubyXL/objects/border.rb +0 -3
- data/lib/rubyXL/objects/calculation_chain.rb +2 -2
- data/lib/rubyXL/objects/cell_style.rb +1 -3
- data/lib/rubyXL/objects/chartsheet.rb +6 -10
- data/lib/rubyXL/objects/color.rb +2 -4
- data/lib/rubyXL/objects/column_range.rb +16 -15
- data/lib/rubyXL/objects/comments.rb +1 -4
- data/lib/rubyXL/objects/connection.rb +11 -11
- data/lib/rubyXL/objects/container_nodes.rb +1 -5
- data/lib/rubyXL/objects/content_types.rb +3 -6
- data/lib/rubyXL/objects/data_validation.rb +2 -2
- data/lib/rubyXL/objects/document_properties.rb +10 -13
- data/lib/rubyXL/objects/extensions.rb +0 -2
- data/lib/rubyXL/objects/external_links.rb +37 -7
- data/lib/rubyXL/objects/fill.rb +2 -5
- data/lib/rubyXL/objects/filters.rb +5 -7
- data/lib/rubyXL/objects/font.rb +2 -4
- data/lib/rubyXL/objects/formula.rb +3 -5
- data/lib/rubyXL/objects/ooxml_object.rb +34 -32
- data/lib/rubyXL/objects/query_table.rb +7 -5
- data/lib/rubyXL/objects/reference.rb +26 -17
- data/lib/rubyXL/objects/relationships.rb +7 -12
- data/lib/rubyXL/objects/root.rb +0 -2
- data/lib/rubyXL/objects/shared_strings.rb +4 -7
- data/lib/rubyXL/objects/sheet_common.rb +1 -3
- data/lib/rubyXL/objects/sheet_data.rb +12 -14
- data/lib/rubyXL/objects/simple_types.rb +3 -1
- data/lib/rubyXL/objects/storage.rb +57 -51
- data/lib/rubyXL/objects/stylesheet.rb +9 -17
- data/lib/rubyXL/objects/text.rb +6 -8
- data/lib/rubyXL/objects/theme.rb +19 -24
- data/lib/rubyXL/objects/workbook.rb +43 -38
- data/lib/rubyXL/objects/worksheet.rb +35 -31
- data/lib/rubyXL/parser.rb +1 -3
- data/lib/rubyXL/worksheet.rb +86 -79
- data/lib/rubyXL.rb +0 -1
- data/rdoc/README_rdoc.html +139 -73
- data/rdoc/RubyXL/AExtension.html +24 -60
- data/rdoc/RubyXL/AExtensionStorageArea.html +6 -13
- data/rdoc/RubyXL/ActiveX.html +19 -46
- data/rdoc/RubyXL/ActiveXBinary.html +6 -18
- data/rdoc/RubyXL/AdjustHandleList.html +6 -13
- data/rdoc/RubyXL/Alignment.html +6 -13
- data/rdoc/RubyXL/AlternateContent.html +6 -13
- data/rdoc/RubyXL/AlternateUrls.html +99 -0
- data/rdoc/RubyXL/Authors.html +6 -13
- data/rdoc/RubyXL/AutoFilter.html +6 -13
- data/rdoc/RubyXL/AutoFilterColumn.html +6 -13
- data/rdoc/RubyXL/BinaryImageFile.html +6 -21
- data/rdoc/RubyXL/BodyProperties.html +6 -13
- data/rdoc/RubyXL/BooleanNode.html +6 -13
- data/rdoc/RubyXL/BooleanValue.html +6 -13
- data/rdoc/RubyXL/Border.html +37 -89
- data/rdoc/RubyXL/BorderEdge.html +23 -53
- data/rdoc/RubyXL/Borders.html +16 -35
- data/rdoc/RubyXL/Break.html +6 -13
- data/rdoc/RubyXL/BreakList.html +6 -13
- data/rdoc/RubyXL/CT_AdjPoint2D.html +6 -13
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +6 -13
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +6 -13
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +6 -13
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +6 -13
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +6 -13
- data/rdoc/RubyXL/CT_Backdrop.html +6 -13
- data/rdoc/RubyXL/CT_Bevel.html +6 -13
- data/rdoc/RubyXL/CT_BiLevelEffect.html +6 -13
- data/rdoc/RubyXL/CT_BlendEffect.html +6 -13
- data/rdoc/RubyXL/CT_Blip.html +6 -13
- data/rdoc/RubyXL/CT_BlipFillProperties.html +6 -13
- data/rdoc/RubyXL/CT_BlurEffect.html +6 -13
- data/rdoc/RubyXL/CT_Camera.html +6 -13
- data/rdoc/RubyXL/CT_Color.html +6 -13
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +6 -13
- data/rdoc/RubyXL/CT_ColorMapping.html +6 -13
- data/rdoc/RubyXL/CT_ColorScheme.html +6 -13
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +6 -13
- data/rdoc/RubyXL/CT_ConnectionSite.html +6 -13
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +6 -13
- data/rdoc/RubyXL/CT_DashStop.html +6 -13
- data/rdoc/RubyXL/CT_DashStopList.html +6 -13
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +6 -13
- data/rdoc/RubyXL/CT_DuotoneEffect.html +6 -13
- data/rdoc/RubyXL/CT_EffectContainer.html +6 -13
- data/rdoc/RubyXL/CT_EffectList.html +6 -13
- data/rdoc/RubyXL/CT_EffectReference.html +6 -13
- data/rdoc/RubyXL/CT_EffectStyleItem.html +6 -13
- data/rdoc/RubyXL/CT_EffectStyleList.html +6 -13
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +6 -13
- data/rdoc/RubyXL/CT_FillEffect.html +6 -13
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +6 -13
- data/rdoc/RubyXL/CT_FillStyleList.html +6 -13
- data/rdoc/RubyXL/CT_FlatText.html +6 -13
- data/rdoc/RubyXL/CT_FontCollection.html +6 -13
- data/rdoc/RubyXL/CT_FontReference.html +6 -13
- data/rdoc/RubyXL/CT_GeomGuideList.html +6 -13
- data/rdoc/RubyXL/CT_GlowEffect.html +6 -13
- data/rdoc/RubyXL/CT_GradientFillProperties.html +6 -13
- data/rdoc/RubyXL/CT_GradientStop.html +6 -13
- data/rdoc/RubyXL/CT_GradientStopList.html +6 -13
- data/rdoc/RubyXL/CT_HSLEffect.html +6 -13
- data/rdoc/RubyXL/CT_HslColor.html +6 -13
- data/rdoc/RubyXL/CT_Hyperlink.html +6 -13
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +6 -13
- data/rdoc/RubyXL/CT_LightRig.html +6 -13
- data/rdoc/RubyXL/CT_LineEndProperties.html +6 -13
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +6 -13
- data/rdoc/RubyXL/CT_LineProperties.html +6 -13
- data/rdoc/RubyXL/CT_LineStyleList.html +6 -13
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +6 -13
- data/rdoc/RubyXL/CT_LuminanceEffect.html +6 -13
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +6 -13
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +6 -13
- data/rdoc/RubyXL/CT_Path2D.html +6 -13
- data/rdoc/RubyXL/CT_Path2DArcTo.html +6 -13
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +6 -13
- data/rdoc/RubyXL/CT_Path2DList.html +6 -13
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +6 -13
- data/rdoc/RubyXL/CT_Path2DTo.html +6 -13
- data/rdoc/RubyXL/CT_PathShadeProperties.html +6 -13
- data/rdoc/RubyXL/CT_PatternFillProperties.html +6 -13
- data/rdoc/RubyXL/CT_Point3D.html +6 -13
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +6 -13
- data/rdoc/RubyXL/CT_PresetColor.html +6 -13
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +6 -13
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +6 -13
- data/rdoc/RubyXL/CT_PresetTextShape.html +6 -13
- data/rdoc/RubyXL/CT_ReflectionEffect.html +6 -13
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +6 -13
- data/rdoc/RubyXL/CT_RelativeRect.html +6 -13
- data/rdoc/RubyXL/CT_SRgbColor.html +6 -13
- data/rdoc/RubyXL/CT_ScRgbColor.html +6 -13
- data/rdoc/RubyXL/CT_Scene3D.html +6 -13
- data/rdoc/RubyXL/CT_SchemeColor.html +6 -13
- data/rdoc/RubyXL/CT_Shape3D.html +6 -13
- data/rdoc/RubyXL/CT_ShapeStyle.html +6 -13
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +6 -13
- data/rdoc/RubyXL/CT_SphereCoords.html +6 -13
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +6 -13
- data/rdoc/RubyXL/CT_StyleMatrix.html +6 -13
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +6 -13
- data/rdoc/RubyXL/CT_SupplementalFont.html +6 -13
- data/rdoc/RubyXL/CT_SystemColor.html +6 -13
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +6 -13
- data/rdoc/RubyXL/CT_TextBlipBullet.html +6 -13
- data/rdoc/RubyXL/CT_TextCharBullet.html +6 -13
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +6 -13
- data/rdoc/RubyXL/CT_TextFont.html +6 -13
- data/rdoc/RubyXL/CT_TextListStyle.html +6 -13
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +6 -13
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +6 -13
- data/rdoc/RubyXL/CT_TextSpacing.html +6 -13
- data/rdoc/RubyXL/CT_TextTabStop.html +6 -13
- data/rdoc/RubyXL/CT_TextTabStopList.html +6 -13
- data/rdoc/RubyXL/CT_TileInfoProperties.html +6 -13
- data/rdoc/RubyXL/CT_TintEffect.html +6 -13
- data/rdoc/RubyXL/CT_Transform2D.html +6 -13
- data/rdoc/RubyXL/CT_TransformEffect.html +6 -13
- data/rdoc/RubyXL/CT_Vector3D.html +6 -13
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +6 -13
- data/rdoc/RubyXL/CalculationChain.html +15 -42
- data/rdoc/RubyXL/CalculationChainCell.html +6 -13
- data/rdoc/RubyXL/CalculationProperties.html +6 -13
- data/rdoc/RubyXL/Cell.html +116 -290
- data/rdoc/RubyXL/CellConvenienceMethods.html +318 -641
- data/rdoc/RubyXL/CellExt.html +6 -13
- data/rdoc/RubyXL/CellSmartTag.html +6 -13
- data/rdoc/RubyXL/CellSmartTagProperty.html +6 -13
- data/rdoc/RubyXL/CellSmartTags.html +6 -13
- data/rdoc/RubyXL/CellStyle.html +6 -13
- data/rdoc/RubyXL/CellStyleXFs.html +16 -35
- data/rdoc/RubyXL/CellStyles.html +16 -35
- data/rdoc/RubyXL/CellValue.html +16 -35
- data/rdoc/RubyXL/CellWatch.html +6 -13
- data/rdoc/RubyXL/CellWatches.html +6 -13
- data/rdoc/RubyXL/CellXFs.html +18 -40
- data/rdoc/RubyXL/ChartColorsFile.html +6 -21
- data/rdoc/RubyXL/ChartFile.html +18 -48
- data/rdoc/RubyXL/ChartStyleFile.html +6 -21
- data/rdoc/RubyXL/ChartUserShapesFile.html +6 -21
- data/rdoc/RubyXL/Chartsheet.html +18 -65
- data/rdoc/RubyXL/ChartsheetPageSetup.html +6 -13
- data/rdoc/RubyXL/ChartsheetProperties.html +6 -13
- data/rdoc/RubyXL/ChartsheetProtection.html +6 -13
- data/rdoc/RubyXL/ChartsheetView.html +6 -13
- data/rdoc/RubyXL/ChartsheetViews.html +6 -13
- data/rdoc/RubyXL/Color.html +17 -41
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +25 -69
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +36 -92
- data/rdoc/RubyXL/ColorConvenienceClasses.html +4 -10
- data/rdoc/RubyXL/ColorConvenienceMethods.html +14 -32
- data/rdoc/RubyXL/ColorFilter.html +6 -13
- data/rdoc/RubyXL/ColorScale.html +6 -13
- data/rdoc/RubyXL/ColorSet.html +6 -13
- data/rdoc/RubyXL/Colors.html +6 -13
- data/rdoc/RubyXL/ColumnRange.html +66 -81
- data/rdoc/RubyXL/ColumnRanges.html +43 -95
- data/rdoc/RubyXL/Comment.html +6 -13
- data/rdoc/RubyXL/CommentList.html +6 -13
- data/rdoc/RubyXL/CommentsFile.html +16 -48
- data/rdoc/RubyXL/ConditionalFormatValue.html +6 -13
- data/rdoc/RubyXL/ConditionalFormatting.html +6 -13
- data/rdoc/RubyXL/ConditionalFormattingRule.html +6 -13
- data/rdoc/RubyXL/Connection.html +6 -13
- data/rdoc/RubyXL/ConnectionTable.html +6 -13
- data/rdoc/RubyXL/ConnectionTables.html +6 -13
- data/rdoc/RubyXL/ConnectionTextField.html +6 -13
- data/rdoc/RubyXL/ConnectionTextFields.html +6 -13
- data/rdoc/RubyXL/Connections.html +15 -42
- data/rdoc/RubyXL/ContentTypeDefault.html +6 -13
- data/rdoc/RubyXL/ContentTypeOverride.html +6 -13
- data/rdoc/RubyXL/ContentTypes.html +25 -63
- data/rdoc/RubyXL/ControlPropertiesFile.html +8 -18
- data/rdoc/RubyXL/CorePropertiesFile.html +72 -192
- data/rdoc/RubyXL/CustomColor.html +6 -13
- data/rdoc/RubyXL/CustomColorList.html +6 -13
- data/rdoc/RubyXL/CustomFilter.html +6 -13
- data/rdoc/RubyXL/CustomFilters.html +6 -13
- data/rdoc/RubyXL/CustomGeometry.html +6 -13
- data/rdoc/RubyXL/CustomProperties.html +6 -13
- data/rdoc/RubyXL/CustomPropertiesFile.html +6 -21
- data/rdoc/RubyXL/CustomProperty.html +6 -13
- data/rdoc/RubyXL/CustomPropertyFile.html +6 -21
- data/rdoc/RubyXL/CustomSheetView.html +6 -13
- data/rdoc/RubyXL/CustomSheetViews.html +6 -13
- data/rdoc/RubyXL/CustomWorkbookView.html +6 -13
- data/rdoc/RubyXL/CustomWorkbookViews.html +6 -13
- data/rdoc/RubyXL/CustomXMLFile.html +6 -18
- data/rdoc/RubyXL/DXF.html +6 -13
- data/rdoc/RubyXL/DXFs.html +6 -13
- data/rdoc/RubyXL/DataBar.html +6 -13
- data/rdoc/RubyXL/DataConsolidate.html +6 -13
- data/rdoc/RubyXL/DataConsolidationReference.html +6 -13
- data/rdoc/RubyXL/DataConsolidationReferences.html +6 -13
- data/rdoc/RubyXL/DataType.html +4 -33
- data/rdoc/RubyXL/DataValidation.html +6 -13
- data/rdoc/RubyXL/DataValidations.html +6 -13
- data/rdoc/RubyXL/DateGroupItem.html +6 -13
- data/rdoc/RubyXL/DefinedName.html +6 -13
- data/rdoc/RubyXL/DefinedNameExt.html +6 -13
- data/rdoc/RubyXL/DefinedNames.html +6 -13
- data/rdoc/RubyXL/DefinedNamesExt.html +6 -13
- data/rdoc/RubyXL/DocumentPropertiesFile.html +23 -65
- data/rdoc/RubyXL/DrawingFile.html +18 -48
- data/rdoc/RubyXL/DynamicFilter.html +6 -13
- data/rdoc/RubyXL/EmbeddedControl.html +6 -13
- data/rdoc/RubyXL/EmbeddedControls.html +6 -13
- data/rdoc/RubyXL/Extension.html +6 -13
- data/rdoc/RubyXL/ExtensionStorageArea.html +6 -13
- data/rdoc/RubyXL/Extents.html +6 -13
- data/rdoc/RubyXL/ExternalBook.html +6 -13
- data/rdoc/RubyXL/ExternalLinksFile.html +18 -48
- data/rdoc/RubyXL/ExternalReference.html +6 -13
- data/rdoc/RubyXL/ExternalReferences.html +6 -13
- data/rdoc/RubyXL/ExtraColorSchemeList.html +6 -13
- data/rdoc/RubyXL/FieldItem.html +6 -13
- data/rdoc/RubyXL/FileRecoveryProperties.html +6 -13
- data/rdoc/RubyXL/FileSharing.html +6 -13
- data/rdoc/RubyXL/FileVersion.html +6 -13
- data/rdoc/RubyXL/Fill.html +16 -35
- data/rdoc/RubyXL/Fills.html +16 -35
- data/rdoc/RubyXL/FilterContainer.html +6 -13
- data/rdoc/RubyXL/FloatNode.html +6 -13
- data/rdoc/RubyXL/FloatValue.html +6 -13
- data/rdoc/RubyXL/Font.html +18 -42
- data/rdoc/RubyXL/FontConvenienceMethods.html +92 -253
- data/rdoc/RubyXL/FontScheme.html +6 -13
- data/rdoc/RubyXL/Fonts.html +16 -35
- data/rdoc/RubyXL/Formula.html +6 -13
- data/rdoc/RubyXL/FunctionGroup.html +6 -13
- data/rdoc/RubyXL/FunctionGroups.html +6 -13
- data/rdoc/RubyXL/GenericStorageObject.html +32 -90
- data/rdoc/RubyXL/GradientFill.html +6 -13
- data/rdoc/RubyXL/HeaderFooterSettings.html +6 -13
- data/rdoc/RubyXL/Hyperlink.html +6 -13
- data/rdoc/RubyXL/HyperlinkRelFile.html +6 -18
- data/rdoc/RubyXL/Hyperlinks.html +6 -13
- data/rdoc/RubyXL/IconFilter.html +6 -13
- data/rdoc/RubyXL/IconSet.html +6 -13
- data/rdoc/RubyXL/IgnoredError.html +6 -13
- data/rdoc/RubyXL/IgnoredErrors.html +6 -13
- data/rdoc/RubyXL/IndexedColors.html +6 -13
- data/rdoc/RubyXL/InputCells.html +6 -13
- data/rdoc/RubyXL/IntegerNode.html +6 -13
- data/rdoc/RubyXL/IntegerValue.html +6 -13
- data/rdoc/RubyXL/LegacyCell.html +14 -32
- data/rdoc/RubyXL/LegacyWorksheet.html +64 -116
- data/rdoc/RubyXL/MRUColors.html +6 -13
- data/rdoc/RubyXL/MacrosFile.html +6 -21
- data/rdoc/RubyXL/MergedCell.html +6 -13
- data/rdoc/RubyXL/MergedCells.html +6 -13
- data/rdoc/RubyXL/NumFmt.html +6 -13
- data/rdoc/RubyXL/NumberFormat.html +17 -36
- data/rdoc/RubyXL/NumberFormats.html +16 -40
- data/rdoc/RubyXL/OLEObject.html +6 -13
- data/rdoc/RubyXL/OLEObjectFile.html +6 -21
- data/rdoc/RubyXL/OLEObjects.html +6 -13
- data/rdoc/RubyXL/OLESize.html +6 -13
- data/rdoc/RubyXL/OOXMLContainerObject.html +57 -140
- data/rdoc/RubyXL/OOXMLIgnored.html +24 -55
- data/rdoc/RubyXL/OOXMLObject.html +9 -19
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +80 -115
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +79 -185
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +86 -223
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +46 -123
- data/rdoc/RubyXL/OdbcOleDbProperties.html +6 -13
- data/rdoc/RubyXL/Offset.html +6 -13
- data/rdoc/RubyXL/OlapProperties.html +6 -13
- data/rdoc/RubyXL/OleItem.html +99 -0
- data/rdoc/RubyXL/OleItems.html +99 -0
- data/rdoc/RubyXL/OleLink.html +99 -0
- data/rdoc/RubyXL/OutlineProperties.html +6 -13
- data/rdoc/RubyXL/PageMargins.html +6 -13
- data/rdoc/RubyXL/PageSetup.html +6 -13
- data/rdoc/RubyXL/PageSetupProperties.html +6 -13
- data/rdoc/RubyXL/Pane.html +6 -13
- data/rdoc/RubyXL/Parser.html +24 -54
- data/rdoc/RubyXL/PatternFill.html +6 -13
- data/rdoc/RubyXL/PersonMetadata.html +108 -0
- data/rdoc/RubyXL/PhoneticProperties.html +6 -13
- data/rdoc/RubyXL/PhoneticRun.html +6 -13
- data/rdoc/RubyXL/PivotArea.html +6 -13
- data/rdoc/RubyXL/PivotCache.html +6 -13
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +8 -26
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +6 -21
- data/rdoc/RubyXL/PivotCaches.html +6 -13
- data/rdoc/RubyXL/PivotReference.html +6 -13
- data/rdoc/RubyXL/PivotReferences.html +6 -13
- data/rdoc/RubyXL/PivotTableFile.html +8 -26
- data/rdoc/RubyXL/PivotTableSelection.html +6 -13
- data/rdoc/RubyXL/PresetGeometry.html +6 -13
- data/rdoc/RubyXL/PrintOptions.html +6 -13
- data/rdoc/RubyXL/PrinterSettingsFile.html +6 -21
- data/rdoc/RubyXL/ProtectedRange.html +6 -13
- data/rdoc/RubyXL/ProtectedRanges.html +6 -13
- data/rdoc/RubyXL/Protection.html +6 -13
- data/rdoc/RubyXL/QueryParameter.html +6 -13
- data/rdoc/RubyXL/QueryParameters.html +6 -13
- data/rdoc/RubyXL/QueryTable.html +18 -48
- data/rdoc/RubyXL/QueryTableDeletedField.html +6 -13
- data/rdoc/RubyXL/QueryTableDeletedFields.html +6 -13
- data/rdoc/RubyXL/QueryTableField.html +6 -13
- data/rdoc/RubyXL/QueryTableFields.html +6 -13
- data/rdoc/RubyXL/QueryTableRefresh.html +6 -13
- data/rdoc/RubyXL/RID.html +6 -13
- data/rdoc/RubyXL/RawOOXML.html +24 -60
- data/rdoc/RubyXL/Reference.html +137 -263
- data/rdoc/RubyXL/Relationship.html +6 -13
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +14 -32
- data/rdoc/RubyXL/RelationshipSupport.html +52 -137
- data/rdoc/RubyXL/RevisionPointer.html +6 -13
- data/rdoc/RubyXL/RichText.html +19 -37
- data/rdoc/RubyXL/RichTextRun.html +16 -35
- data/rdoc/RubyXL/Row.html +63 -180
- data/rdoc/RubyXL/RowExt.html +6 -13
- data/rdoc/RubyXL/RunProperties.html +6 -13
- data/rdoc/RubyXL/Scenario.html +6 -13
- data/rdoc/RubyXL/Scenarios.html +6 -13
- data/rdoc/RubyXL/Selection.html +16 -35
- data/rdoc/RubyXL/ShapeGuide.html +6 -13
- data/rdoc/RubyXL/ShapeTextRectangle.html +6 -13
- data/rdoc/RubyXL/SharedStringsTable.html +60 -156
- data/rdoc/RubyXL/Sheet.html +6 -13
- data/rdoc/RubyXL/SheetCalculationProperties.html +6 -13
- data/rdoc/RubyXL/SheetData.html +21 -51
- data/rdoc/RubyXL/SheetDataExt.html +6 -13
- data/rdoc/RubyXL/SheetDataSet.html +6 -13
- data/rdoc/RubyXL/SheetMetadata.html +108 -0
- data/rdoc/RubyXL/SheetName.html +6 -13
- data/rdoc/RubyXL/SheetNames.html +6 -13
- data/rdoc/RubyXL/Sheets.html +6 -13
- data/rdoc/RubyXL/SlicerCacheFile.html +6 -21
- data/rdoc/RubyXL/SlicerFile.html +6 -21
- data/rdoc/RubyXL/SmartTagProperties.html +6 -13
- data/rdoc/RubyXL/SmartTagType.html +6 -13
- data/rdoc/RubyXL/SmartTagTypes.html +6 -13
- data/rdoc/RubyXL/SmartTags.html +6 -13
- data/rdoc/RubyXL/SortCondition.html +6 -13
- data/rdoc/RubyXL/SortState.html +6 -13
- data/rdoc/RubyXL/Sqref.html +25 -56
- data/rdoc/RubyXL/Stop.html +6 -13
- data/rdoc/RubyXL/StringNode.html +6 -13
- data/rdoc/RubyXL/StringNodeW3C.html +24 -55
- data/rdoc/RubyXL/StringValue.html +6 -13
- data/rdoc/RubyXL/Stylesheet.html +45 -118
- data/rdoc/RubyXL/TableFile.html +6 -21
- data/rdoc/RubyXL/TableParts.html +6 -13
- data/rdoc/RubyXL/TableStyle.html +6 -13
- data/rdoc/RubyXL/TableStyles.html +6 -13
- data/rdoc/RubyXL/Text.html +25 -63
- data/rdoc/RubyXL/TextImportSettings.html +6 -13
- data/rdoc/RubyXL/Theme.html +46 -96
- data/rdoc/RubyXL/ThemeElements.html +6 -13
- data/rdoc/RubyXL/ThumbnailFile.html +6 -21
- data/rdoc/RubyXL/Top10.html +6 -13
- data/rdoc/RubyXL/VMLDrawingFile.html +9 -27
- data/rdoc/RubyXL/Variant.html +6 -13
- data/rdoc/RubyXL/Vector.html +16 -35
- data/rdoc/RubyXL/VectorValue.html +6 -13
- data/rdoc/RubyXL/VisualProperties.html +6 -13
- data/rdoc/RubyXL/WebPublishObject.html +6 -13
- data/rdoc/RubyXL/WebPublishObjects.html +6 -13
- data/rdoc/RubyXL/WebPublishingItem.html +6 -13
- data/rdoc/RubyXL/WebPublishingItems.html +6 -13
- data/rdoc/RubyXL/WebPublishingProperties.html +6 -13
- data/rdoc/RubyXL/WebQueryProperties.html +6 -13
- data/rdoc/RubyXL/Workbook.html +222 -583
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +170 -309
- data/rdoc/RubyXL/WorkbookProperties.html +6 -13
- data/rdoc/RubyXL/WorkbookProtection.html +6 -13
- data/rdoc/RubyXL/WorkbookRoot.html +47 -125
- data/rdoc/RubyXL/WorkbookView.html +6 -13
- data/rdoc/RubyXL/WorkbookViews.html +6 -13
- data/rdoc/RubyXL/Worksheet.html +79 -160
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +605 -1269
- data/rdoc/RubyXL/WorksheetDimensions.html +6 -13
- data/rdoc/RubyXL/WorksheetFormatProperties.html +6 -13
- data/rdoc/RubyXL/WorksheetProperties.html +6 -13
- data/rdoc/RubyXL/WorksheetProtection.html +6 -13
- data/rdoc/RubyXL/WorksheetView.html +6 -13
- data/rdoc/RubyXL/WorksheetViews.html +6 -13
- data/rdoc/RubyXL/XF.html +6 -13
- data/rdoc/RubyXL.html +15 -324
- data/rdoc/created.rid +44 -44
- data/rdoc/css/rdoc.css +76 -8
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/index.html +397 -769
- data/rdoc/js/darkfish.js +14 -1
- data/rdoc/js/navigation.js +8 -8
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +4 -4
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +68 -5
- data/rubyXL.gemspec +28 -29
- data/spec/lib/cell_spec.rb +67 -9
- data/spec/lib/color_spec.rb +8 -1
- data/spec/lib/parser_spec.rb +28 -28
- data/spec/lib/reference_spec.rb +41 -5
- data/spec/lib/rgb_color_spec.rb +16 -3
- data/spec/lib/stylesheet_spec.rb +10 -11
- data/spec/lib/text_spec.rb +4 -6
- data/spec/lib/workbook_spec.rb +20 -8
- data/spec/lib/worksheet_spec.rb +815 -460
- data/spec/spec_helper.rb +2 -0
- data/test/test_parse_write.rb +3 -3
- metadata +26 -6
- data/Gemfile.lock +0 -92
|
@@ -6,7 +6,6 @@ require 'rubyXL/objects/border'
|
|
|
6
6
|
require 'rubyXL/objects/extensions'
|
|
7
7
|
|
|
8
8
|
module RubyXL
|
|
9
|
-
|
|
10
9
|
# http://www.datypic.com/sc/ooxml/e-ssml_numFmt-1.html
|
|
11
10
|
class NumberFormat < OOXMLObject
|
|
12
11
|
define_attribute(:numFmtId, :int, :required => true)
|
|
@@ -15,9 +14,8 @@ module RubyXL
|
|
|
15
14
|
|
|
16
15
|
def is_date_format?
|
|
17
16
|
# v-------- Toss all the escaped chars -------v v--- and see if any date-related remained
|
|
18
|
-
!!(format_code.gsub(/(
|
|
17
|
+
!!(format_code.gsub(/("[^"]*"|\[[^\]]*\]|[\\_*].)/i, '') =~ /[dmyhs]/i)
|
|
19
18
|
end
|
|
20
|
-
|
|
21
19
|
end
|
|
22
20
|
|
|
23
21
|
# http://www.datypic.com/sc/ooxml/e-ssml_numFmts-1.html
|
|
@@ -63,7 +61,6 @@ module RubyXL
|
|
|
63
61
|
def find_by_format_id(format_id)
|
|
64
62
|
self.find { |fmt| fmt.num_fmt_id == format_id }
|
|
65
63
|
end
|
|
66
|
-
|
|
67
64
|
end
|
|
68
65
|
|
|
69
66
|
# http://www.datypic.com/sc/ooxml/e-ssml_cellStyleXfs-1.html
|
|
@@ -82,11 +79,8 @@ module RubyXL
|
|
|
82
79
|
define_element_name 'cellXfs'
|
|
83
80
|
|
|
84
81
|
def self.default
|
|
85
|
-
self.new(:_ => [
|
|
86
|
-
|
|
87
|
-
:num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0, :xfId => 0
|
|
88
|
-
)
|
|
89
|
-
])
|
|
82
|
+
self.new(:_ => [ RubyXL::XF.new(:num_fmt_id => 0, :font_id => 0, :fill_id => 0,
|
|
83
|
+
:border_id => 0, :xfId => 0) ])
|
|
90
84
|
end
|
|
91
85
|
end
|
|
92
86
|
|
|
@@ -161,8 +155,8 @@ module RubyXL
|
|
|
161
155
|
|
|
162
156
|
# http://www.datypic.com/sc/ooxml/e-ssml_styleSheet.html
|
|
163
157
|
class Stylesheet < OOXMLTopLevelObject
|
|
164
|
-
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'
|
|
165
|
-
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles'
|
|
158
|
+
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'.freeze
|
|
159
|
+
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles'.freeze
|
|
166
160
|
|
|
167
161
|
define_child_node(RubyXL::NumberFormats, :accessor => :number_formats)
|
|
168
162
|
define_child_node(RubyXL::Fonts)
|
|
@@ -176,11 +170,11 @@ module RubyXL
|
|
|
176
170
|
define_child_node(RubyXL::Colors)
|
|
177
171
|
define_child_node(RubyXL::ExtensionStorageArea)
|
|
178
172
|
define_element_name 'styleSheet'
|
|
179
|
-
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main'
|
|
173
|
+
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
|
|
180
174
|
'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r',
|
|
181
|
-
'http://schemas.openxmlformats.org/markup-compatibility/2006'
|
|
182
|
-
'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac'
|
|
183
|
-
'urn:schemas-microsoft-com:mac:vml'
|
|
175
|
+
'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
|
|
176
|
+
'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
|
|
177
|
+
'urn:schemas-microsoft-com:mac:vml' => 'mv')
|
|
184
178
|
|
|
185
179
|
def initialize(*args)
|
|
186
180
|
super
|
|
@@ -226,7 +220,5 @@ module RubyXL
|
|
|
226
220
|
|
|
227
221
|
return max_fmt_id
|
|
228
222
|
end
|
|
229
|
-
|
|
230
223
|
end
|
|
231
|
-
|
|
232
224
|
end
|
data/lib/rubyXL/objects/text.rb
CHANGED
|
@@ -4,7 +4,6 @@ require 'rubyXL/objects/container_nodes'
|
|
|
4
4
|
require 'rubyXL/objects/color'
|
|
5
5
|
|
|
6
6
|
module RubyXL
|
|
7
|
-
|
|
8
7
|
# http://www.datypic.com/sc/ooxml/e-ssml_t-1.html
|
|
9
8
|
class Text < OOXMLObject
|
|
10
9
|
define_attribute(:_, :string, :accessor => :value)
|
|
@@ -19,12 +18,12 @@ module RubyXL
|
|
|
19
18
|
|
|
20
19
|
def before_write_xml
|
|
21
20
|
preserve_whitespace
|
|
22
|
-
self.value.gsub
|
|
21
|
+
self.value.gsub(INVALID_XML10_CHARS) { |bad_char| format('_x%04x_', bad_char.ord) }
|
|
23
22
|
true
|
|
24
23
|
end
|
|
25
24
|
|
|
26
25
|
def to_s
|
|
27
|
-
value.to_s.gsub(ESCAPED_UNICODE) {
|
|
26
|
+
value.to_s.gsub(ESCAPED_UNICODE) { Regexp.last_match(1).hex.chr(::Encoding::UTF_8) }
|
|
28
27
|
end
|
|
29
28
|
end
|
|
30
29
|
|
|
@@ -57,7 +56,6 @@ module RubyXL
|
|
|
57
56
|
def to_s
|
|
58
57
|
t.to_s
|
|
59
58
|
end
|
|
60
|
-
|
|
61
59
|
end
|
|
62
60
|
|
|
63
61
|
# http://www.datypic.com/sc/ooxml/e-ssml_rPh-1.html
|
|
@@ -70,7 +68,7 @@ module RubyXL
|
|
|
70
68
|
|
|
71
69
|
# http://www.datypic.com/sc/ooxml/e-ssml_phoneticPr-1.html
|
|
72
70
|
class PhoneticProperties < OOXMLObject
|
|
73
|
-
define_attribute(:fontId, :int,
|
|
71
|
+
define_attribute(:fontId, :int, :required => true)
|
|
74
72
|
define_attribute(:type, RubyXL::ST_PhoneticType, :default => 'fullwidthKatakana')
|
|
75
73
|
define_attribute(:alignment, RubyXL::ST_PhoneticAlignment, :default => 'left')
|
|
76
74
|
define_element_name 'phoneticPr'
|
|
@@ -85,10 +83,10 @@ module RubyXL
|
|
|
85
83
|
define_element_name 'is'
|
|
86
84
|
|
|
87
85
|
def to_s
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
# `dup` here unfreezes the string since it's not a constant but initial value
|
|
87
|
+
str = t.nil? ? ''.dup : t.to_s
|
|
88
|
+
r&.each { |rtr| str << rtr.to_s if rtr }
|
|
90
89
|
str
|
|
91
90
|
end
|
|
92
91
|
end
|
|
93
|
-
|
|
94
92
|
end
|
data/lib/rubyXL/objects/theme.rb
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
# encoding: UTF-8 <-- magic comment, need this because of sime fancy fonts in the default scheme below. See http://stackoverflow.com/questions/6444826/ruby-utf-8-file-encoding
|
|
2
1
|
require 'rubyXL/objects/ooxml_object'
|
|
3
2
|
require 'rubyXL/objects/extensions'
|
|
4
3
|
|
|
5
4
|
module RubyXL
|
|
6
|
-
|
|
7
5
|
# http://www.datypic.com/sc/ooxml/e-a_ext-1.html
|
|
8
6
|
class AExtension < OOXMLObject
|
|
9
7
|
define_attribute(:uri, :string)
|
|
@@ -19,7 +17,6 @@ module RubyXL
|
|
|
19
17
|
def write_xml(xml, node_name_override = nil)
|
|
20
18
|
self.raw_xml
|
|
21
19
|
end
|
|
22
|
-
|
|
23
20
|
end
|
|
24
21
|
|
|
25
22
|
class AExtensionStorageArea < OOXMLObject
|
|
@@ -1164,7 +1161,7 @@ module RubyXL
|
|
|
1164
1161
|
class CT_Hyperlink < OOXMLObject
|
|
1165
1162
|
define_child_node(RubyXL::CT_EmbeddedWAVAudioFile)
|
|
1166
1163
|
define_child_node(RubyXL::AExtensionStorageArea)
|
|
1167
|
-
|
|
1164
|
+
define_relationship
|
|
1168
1165
|
define_attribute(:invalidUrl, :string, :default => '')
|
|
1169
1166
|
define_attribute(:action, :string, :default => '')
|
|
1170
1167
|
define_attribute(:tgtFrame, :string, :default => '')
|
|
@@ -1183,7 +1180,7 @@ module RubyXL
|
|
|
1183
1180
|
define_child_node(RubyXL::CT_GradientFillProperties)
|
|
1184
1181
|
define_child_node(RubyXL::CT_BlipFillProperties)
|
|
1185
1182
|
define_child_node(RubyXL::CT_PatternFillProperties)
|
|
1186
|
-
define_child_node(RubyXL::BooleanValue,
|
|
1183
|
+
define_child_node(RubyXL::BooleanValue, :node_name => 'a:grpFill')
|
|
1187
1184
|
# -- EG_EffectProperties
|
|
1188
1185
|
define_child_node(RubyXL::CT_EffectList)
|
|
1189
1186
|
define_child_node(RubyXL::CT_EffectContainer, :node_name => 'a:effectDag')
|
|
@@ -1373,8 +1370,8 @@ module RubyXL
|
|
|
1373
1370
|
|
|
1374
1371
|
# http://www.datypic.com/sc/ooxml/e-a_theme.html
|
|
1375
1372
|
class Theme < OOXMLTopLevelObject
|
|
1376
|
-
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.theme+xml'
|
|
1377
|
-
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme'
|
|
1373
|
+
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.theme+xml'.freeze
|
|
1374
|
+
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme'.freeze
|
|
1378
1375
|
|
|
1379
1376
|
define_attribute(:name, :string, :default => '')
|
|
1380
1377
|
define_child_node(RubyXL::ThemeElements)
|
|
@@ -1392,21 +1389,21 @@ module RubyXL
|
|
|
1392
1389
|
end
|
|
1393
1390
|
|
|
1394
1391
|
def get_theme_color(idx)
|
|
1395
|
-
color_scheme = a_theme_elements
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1392
|
+
color_scheme = a_theme_elements&.a_clr_scheme
|
|
1393
|
+
|
|
1394
|
+
return unless color_scheme
|
|
1395
|
+
|
|
1396
|
+
case idx
|
|
1397
|
+
when 0 then color_scheme.a_lt1
|
|
1398
|
+
when 1 then color_scheme.a_dk1
|
|
1399
|
+
when 2 then color_scheme.a_lt2
|
|
1400
|
+
when 3 then color_scheme.a_dk2
|
|
1401
|
+
when 4 then color_scheme.a_accent1
|
|
1402
|
+
when 5 then color_scheme.a_accent2
|
|
1403
|
+
when 6 then color_scheme.a_accent3
|
|
1404
|
+
when 7 then color_scheme.a_accent4
|
|
1405
|
+
when 8 then color_scheme.a_accent5
|
|
1406
|
+
when 9 then color_scheme.a_accent6
|
|
1410
1407
|
end
|
|
1411
1408
|
end
|
|
1412
1409
|
|
|
@@ -1729,7 +1726,5 @@ module RubyXL
|
|
|
1729
1726
|
</a:theme>'
|
|
1730
1727
|
self.parse(default_theme)
|
|
1731
1728
|
end
|
|
1732
|
-
|
|
1733
1729
|
end
|
|
1734
|
-
|
|
1735
1730
|
end
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#require 'tmpdir'
|
|
2
1
|
require 'date'
|
|
3
2
|
require 'rubyXL/objects/ooxml_object'
|
|
4
3
|
require 'rubyXL/objects/shared_strings'
|
|
@@ -14,7 +13,6 @@ require 'rubyXL/objects/extensions'
|
|
|
14
13
|
require 'rubyXL/objects/external_links'
|
|
15
14
|
|
|
16
15
|
module RubyXL
|
|
17
|
-
|
|
18
16
|
# Eventually, the entire code for Workbook will be moved here.
|
|
19
17
|
|
|
20
18
|
# http://www.datypic.com/sc/ooxml/e-ssml_fileVersion-1.html
|
|
@@ -37,7 +35,7 @@ module RubyXL
|
|
|
37
35
|
|
|
38
36
|
# http://www.datypic.com/sc/ooxml/e-ssml_workbookPr-1.html
|
|
39
37
|
class WorkbookProperties < OOXMLObject
|
|
40
|
-
define_attribute(:date1904, :bool,
|
|
38
|
+
define_attribute(:date1904, :bool, :default => false)
|
|
41
39
|
define_attribute(:showObjects, RubyXL::ST_Objects, :default => 'all')
|
|
42
40
|
define_attribute(:showBorderUnselectedTables, :bool, :default => true)
|
|
43
41
|
define_attribute(:filterPrivacy, :bool, :default => false)
|
|
@@ -98,7 +96,7 @@ module RubyXL
|
|
|
98
96
|
define_attribute(:name, :string, :required => true)
|
|
99
97
|
define_attribute(:sheetId, :int, :required => true)
|
|
100
98
|
define_attribute(:state, RubyXL::ST_Visibility, :default => 'visible')
|
|
101
|
-
|
|
99
|
+
define_relationship(:required => true)
|
|
102
100
|
define_element_name 'sheet'
|
|
103
101
|
end
|
|
104
102
|
|
|
@@ -110,7 +108,7 @@ module RubyXL
|
|
|
110
108
|
|
|
111
109
|
# http://www.datypic.com/sc/ooxml/e-ssml_externalReference-1.html
|
|
112
110
|
class ExternalReference < OOXMLObject
|
|
113
|
-
|
|
111
|
+
define_relationship(:required => true)
|
|
114
112
|
define_element_name 'externalReference'
|
|
115
113
|
end
|
|
116
114
|
|
|
@@ -152,8 +150,8 @@ module RubyXL
|
|
|
152
150
|
|
|
153
151
|
# http://www.datypic.com/sc/ooxml/e-ssml_pivotCache-1.html
|
|
154
152
|
class PivotCache < OOXMLObject
|
|
155
|
-
define_attribute(:cacheId, :int,
|
|
156
|
-
|
|
153
|
+
define_attribute(:cacheId, :int, :required => true)
|
|
154
|
+
define_relationship(:required => true)
|
|
157
155
|
define_element_name 'pivotCache'
|
|
158
156
|
end
|
|
159
157
|
|
|
@@ -186,7 +184,7 @@ module RubyXL
|
|
|
186
184
|
define_attribute(:vml, :bool, :default => false)
|
|
187
185
|
define_attribute(:allowPng, :bool, :default => false)
|
|
188
186
|
define_attribute(:targetScreenSize, RubyXL::ST_TargetScreenSize, :default => '800x600')
|
|
189
|
-
define_attribute(:dpi, :int,
|
|
187
|
+
define_attribute(:dpi, :int, :default => 96)
|
|
190
188
|
define_attribute(:codePage, :int)
|
|
191
189
|
define_element_name 'webPublishing'
|
|
192
190
|
end
|
|
@@ -195,7 +193,7 @@ module RubyXL
|
|
|
195
193
|
class CalculationProperties < OOXMLObject
|
|
196
194
|
define_attribute(:calcId, :int)
|
|
197
195
|
define_attribute(:calcMode, RubyXL::ST_CalcMode, :default => 'auto')
|
|
198
|
-
define_attribute(:fullCalcOnLoad, :bool,
|
|
196
|
+
define_attribute(:fullCalcOnLoad, :bool, :default => false)
|
|
199
197
|
define_attribute(:refMode, RubyXL::ST_RefMode, :default => 'A1')
|
|
200
198
|
define_attribute(:iterate, :bool, :default => false)
|
|
201
199
|
define_attribute(:iterateCount, :int, :default => 100)
|
|
@@ -216,7 +214,7 @@ module RubyXL
|
|
|
216
214
|
define_attribute(:sourceObject, :string)
|
|
217
215
|
define_attribute(:destinationFile, :string, :required => true)
|
|
218
216
|
define_attribute(:title, :string)
|
|
219
|
-
define_attribute(:autoRepublish, :bool,
|
|
217
|
+
define_attribute(:autoRepublish, :bool, :default => false)
|
|
220
218
|
define_element_name 'webPublishObject'
|
|
221
219
|
end
|
|
222
220
|
|
|
@@ -228,7 +226,7 @@ module RubyXL
|
|
|
228
226
|
|
|
229
227
|
# http://www.datypic.com/sc/ooxml/e-ssml_smartTagPr-1.html
|
|
230
228
|
class SmartTagProperties < OOXMLObject
|
|
231
|
-
define_attribute(:embed, :bool,
|
|
229
|
+
define_attribute(:embed, :bool, :default => false)
|
|
232
230
|
define_attribute(:show, RubyXL::ST_SmartTagShow, :default => 'all')
|
|
233
231
|
define_element_name 'smartTagPr'
|
|
234
232
|
end
|
|
@@ -280,7 +278,7 @@ module RubyXL
|
|
|
280
278
|
define_attribute(:yWindow, :int, :default => 0)
|
|
281
279
|
define_attribute(:windowWidth, :int)
|
|
282
280
|
define_attribute(:windowHeight, :int)
|
|
283
|
-
define_attribute(:tabRatio, :int,
|
|
281
|
+
define_attribute(:tabRatio, :int, :default => 600)
|
|
284
282
|
define_attribute(:activeSheetId, :int)
|
|
285
283
|
define_attribute(:showFormulaBar, :bool, :default => true)
|
|
286
284
|
define_attribute(:showStatusbar, :bool, :default => true)
|
|
@@ -298,15 +296,17 @@ module RubyXL
|
|
|
298
296
|
|
|
299
297
|
# http://www.datypic.com/sc/ooxml/e-ssml_workbook.html
|
|
300
298
|
class Workbook < OOXMLTopLevelObject
|
|
301
|
-
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'
|
|
302
|
-
CONTENT_TYPE_TEMPLATE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml'
|
|
303
|
-
CONTENT_TYPE_TEMPLATE_WITH_MACROS = 'application/vnd.ms-excel.template.macroEnabled.main+xml'
|
|
304
|
-
CONTENT_TYPE_WITH_MACROS = 'application/vnd.ms-excel.sheet.macroEnabled.main+xml'
|
|
305
|
-
REL_TYPE
|
|
299
|
+
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'.freeze
|
|
300
|
+
CONTENT_TYPE_TEMPLATE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml'.freeze
|
|
301
|
+
CONTENT_TYPE_TEMPLATE_WITH_MACROS = 'application/vnd.ms-excel.template.macroEnabled.main+xml'.freeze
|
|
302
|
+
CONTENT_TYPE_WITH_MACROS = 'application/vnd.ms-excel.sheet.macroEnabled.main+xml'.freeze
|
|
303
|
+
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument'.freeze
|
|
306
304
|
|
|
307
305
|
# http://www.accountingweb.com/technology/excel/seven-characters-you-cant-use-in-worksheet-names
|
|
308
|
-
SHEET_NAME_FORBIDDEN_CHARS =
|
|
309
|
-
|
|
306
|
+
SHEET_NAME_FORBIDDEN_CHARS = %r{[/\\*\[\]:?]}
|
|
307
|
+
|
|
308
|
+
# https://answers.microsoft.com/en-us/msoffice/forum/all/excel-history-is-a-reserved-name-help/f8a398a4-b72c-48e3-82da-4f132c305e91
|
|
309
|
+
SHEET_NAME_FORBIDDEN_NAMES = [ 'History' ]
|
|
310
310
|
|
|
311
311
|
include RubyXL::RelationshipSupport
|
|
312
312
|
|
|
@@ -332,8 +332,9 @@ module RubyXL
|
|
|
332
332
|
define_relationship(RubyXL::PivotCacheDefinitionFile)
|
|
333
333
|
define_relationship(RubyXL::PivotCacheRecordsFile)
|
|
334
334
|
define_relationship(RubyXL::CustomXMLFile)
|
|
335
|
-
define_relationship(RubyXL::MacrosFile,
|
|
335
|
+
define_relationship(RubyXL::MacrosFile, :macros)
|
|
336
336
|
define_relationship(RubyXL::SlicerCacheFile)
|
|
337
|
+
define_relationship(RubyXL::PersonMetadata)
|
|
337
338
|
|
|
338
339
|
define_child_node(RubyXL::FileVersion)
|
|
339
340
|
define_child_node(RubyXL::FileSharing)
|
|
@@ -358,13 +359,12 @@ module RubyXL
|
|
|
358
359
|
define_child_node(RubyXL::ExtensionStorageArea)
|
|
359
360
|
|
|
360
361
|
define_element_name 'workbook'
|
|
361
|
-
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main'
|
|
362
|
+
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
|
|
362
363
|
'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r',
|
|
363
|
-
'http://schemas.openxmlformats.org/markup-compatibility/2006'
|
|
364
|
-
'http://schemas.microsoft.com/office/spreadsheetml/2010/11/main'
|
|
364
|
+
'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
|
|
365
|
+
'http://schemas.microsoft.com/office/spreadsheetml/2010/11/main' => 'x15')
|
|
365
366
|
|
|
366
|
-
attr_accessor :worksheets
|
|
367
|
-
attr_accessor :is_template
|
|
367
|
+
attr_accessor :worksheets, :is_template
|
|
368
368
|
|
|
369
369
|
def before_write_xml
|
|
370
370
|
max_sheet_id = worksheets.collect(&:sheet_id).compact.max || 0
|
|
@@ -375,6 +375,7 @@ module RubyXL
|
|
|
375
375
|
rel = relationship_container.find_by_target(sheet.xlsx_path)
|
|
376
376
|
|
|
377
377
|
raise "Worksheet name '#{sheet.sheet_name}' contains forbidden characters" if sheet.sheet_name =~ SHEET_NAME_FORBIDDEN_CHARS
|
|
378
|
+
raise "Worksheet name '#{sheet.sheet_name}' is forbidden" if SHEET_NAME_FORBIDDEN_NAMES.include?(sheet.sheet_name)
|
|
378
379
|
|
|
379
380
|
sheets << RubyXL::Sheet.new(:name => sheet.sheet_name[0..30], # Max sheet name length is 31 char
|
|
380
381
|
:sheet_id => sheet.sheet_id || (max_sheet_id += 1),
|
|
@@ -403,33 +404,39 @@ module RubyXL
|
|
|
403
404
|
raise "Unsupported extension: #{extension} (only .xlsx, .xlsm, .xltx and .xltm files are supported)."
|
|
404
405
|
end
|
|
405
406
|
|
|
406
|
-
File.open(dst_file_path,
|
|
407
|
+
File.open(dst_file_path, 'wb') { |output_file| FileUtils.copy_stream(root.stream, output_file) }
|
|
407
408
|
|
|
408
409
|
return dst_file_path
|
|
409
410
|
end
|
|
410
411
|
alias_method :write, :save
|
|
411
412
|
|
|
412
413
|
DATE1904 = DateTime.new(1904, 1, 1)
|
|
413
|
-
# Subtracting one day to
|
|
414
|
+
# Subtracting one day to accommodate for erroneous 1900 leap year compatibility only for 1900 based dates
|
|
414
415
|
DATE1899 = DateTime.new(1899, 12, 31) - 1
|
|
415
416
|
MARCH_1_1900 = 61
|
|
416
417
|
|
|
417
418
|
def base_date
|
|
418
|
-
|
|
419
|
+
workbook_properties&.date1904 ? DATE1904 : DATE1899
|
|
419
420
|
end
|
|
420
421
|
private :base_date
|
|
421
422
|
|
|
422
423
|
def date_to_num(date)
|
|
423
|
-
|
|
424
|
+
case date
|
|
425
|
+
when Date, DateTime then (date.ajd - base_date.ajd).to_f
|
|
426
|
+
when Time then ((date.to_r - base_date.to_time.to_r) / 86400).to_f
|
|
427
|
+
end
|
|
424
428
|
end
|
|
425
429
|
|
|
426
430
|
def num_to_date(num)
|
|
431
|
+
return nil if num.nil?
|
|
432
|
+
|
|
427
433
|
# Bug-for-bug Excel compatibility (https://support.microsoft.com/kb/214058/)
|
|
428
|
-
if num
|
|
429
|
-
num += 1 unless workbook_properties
|
|
434
|
+
if num < MARCH_1_1900 then
|
|
435
|
+
num += 1 unless workbook_properties&.date1904
|
|
430
436
|
end
|
|
431
437
|
|
|
432
|
-
|
|
438
|
+
dateparts = num.divmod(1)
|
|
439
|
+
base_date + (dateparts[0] + ((dateparts[1] * 86400).round(6) / 86400))
|
|
433
440
|
end
|
|
434
441
|
|
|
435
442
|
include Enumerable
|
|
@@ -511,7 +518,7 @@ module RubyXL
|
|
|
511
518
|
end
|
|
512
519
|
|
|
513
520
|
def company
|
|
514
|
-
root.document_properties.company
|
|
521
|
+
root.document_properties.company&.value
|
|
515
522
|
end
|
|
516
523
|
|
|
517
524
|
def company=(v)
|
|
@@ -520,7 +527,7 @@ module RubyXL
|
|
|
520
527
|
end
|
|
521
528
|
|
|
522
529
|
def application
|
|
523
|
-
root.document_properties.application
|
|
530
|
+
root.document_properties.application&.value
|
|
524
531
|
end
|
|
525
532
|
|
|
526
533
|
def application=(v)
|
|
@@ -529,7 +536,7 @@ module RubyXL
|
|
|
529
536
|
end
|
|
530
537
|
|
|
531
538
|
def appversion
|
|
532
|
-
root.document_properties.app_version
|
|
539
|
+
root.document_properties.app_version&.value
|
|
533
540
|
end
|
|
534
541
|
|
|
535
542
|
def appversion=(v)
|
|
@@ -554,14 +561,12 @@ module RubyXL
|
|
|
554
561
|
end
|
|
555
562
|
|
|
556
563
|
def date1904
|
|
557
|
-
workbook_properties
|
|
564
|
+
workbook_properties&.date1904
|
|
558
565
|
end
|
|
559
566
|
|
|
560
567
|
def date1904=(v)
|
|
561
568
|
self.workbook_properties ||= RubyXL::WorkbookProperties.new
|
|
562
569
|
workbook_properties.date1904 = v
|
|
563
570
|
end
|
|
564
|
-
|
|
565
571
|
end
|
|
566
|
-
|
|
567
572
|
end
|
|
@@ -15,7 +15,6 @@ require 'rubyXL/objects/query_table'
|
|
|
15
15
|
require 'rubyXL/worksheet'
|
|
16
16
|
|
|
17
17
|
module RubyXL
|
|
18
|
-
|
|
19
18
|
# Eventually, the entire code for Worksheet will be moved here. One small step at a time!
|
|
20
19
|
|
|
21
20
|
# http://www.datypic.com/sc/ooxml/e-ssml_outlinePr-1.html
|
|
@@ -58,7 +57,7 @@ module RubyXL
|
|
|
58
57
|
end
|
|
59
58
|
|
|
60
59
|
class WorksheetFormatProperties < OOXMLObject
|
|
61
|
-
define_attribute(:baseColWidth, :int,
|
|
60
|
+
define_attribute(:baseColWidth, :int, :default => 8)
|
|
62
61
|
define_attribute(:defaultColWidth, :double)
|
|
63
62
|
define_attribute(:defaultRowHeight, :double, :required => true)
|
|
64
63
|
define_attribute(:customHeight, :bool, :default => false)
|
|
@@ -83,12 +82,12 @@ module RubyXL
|
|
|
83
82
|
define_attribute(:blackAndWhite, :bool, :default => false)
|
|
84
83
|
define_attribute(:draft, :bool, :default => false)
|
|
85
84
|
define_attribute(:cellComments, RubyXL::ST_CellComments, :default => 'none')
|
|
86
|
-
define_attribute(:useFirstPageNumber, :bool,
|
|
85
|
+
define_attribute(:useFirstPageNumber, :bool, :default => false)
|
|
87
86
|
define_attribute(:errors, RubyXL::ST_PrintError, :default => 'displayed')
|
|
88
87
|
define_attribute(:horizontalDpi, :int, :default => 600)
|
|
89
88
|
define_attribute(:verticalDpi, :int, :default => 600)
|
|
90
89
|
define_attribute(:copies, :int, :default => 1)
|
|
91
|
-
|
|
90
|
+
define_relationship
|
|
92
91
|
define_element_name 'pageSetup'
|
|
93
92
|
end
|
|
94
93
|
|
|
@@ -166,7 +165,7 @@ module RubyXL
|
|
|
166
165
|
class ConditionalFormatValue < OOXMLObject
|
|
167
166
|
define_attribute(:type, RubyXL::ST_CfvoType, :required => true)
|
|
168
167
|
define_attribute(:val, :string)
|
|
169
|
-
define_attribute(:gte, :bool,
|
|
168
|
+
define_attribute(:gte, :bool, :default => true)
|
|
170
169
|
define_child_node(RubyXL::ExtensionStorageArea)
|
|
171
170
|
define_element_name 'cfvo'
|
|
172
171
|
end
|
|
@@ -174,7 +173,7 @@ module RubyXL
|
|
|
174
173
|
# http://www.datypic.com/sc/ooxml/e-ssml_colorScale-1.html
|
|
175
174
|
class ColorScale < OOXMLObject
|
|
176
175
|
define_child_node(RubyXL::ConditionalFormatValue, :collection => true, :accessor => :cfvo)
|
|
177
|
-
define_child_node(RubyXL::Color)
|
|
176
|
+
define_child_node(RubyXL::Color, :collection => true)
|
|
178
177
|
define_element_name 'colorScale'
|
|
179
178
|
end
|
|
180
179
|
|
|
@@ -184,7 +183,7 @@ module RubyXL
|
|
|
184
183
|
define_attribute(:maxLength, :int, :default => 90)
|
|
185
184
|
define_attribute(:showValue, :bool, :default => true)
|
|
186
185
|
define_child_node(RubyXL::ConditionalFormatValue, :collection => true, :accessor => :cfvo)
|
|
187
|
-
define_child_node(RubyXL::Color)
|
|
186
|
+
define_child_node(RubyXL::Color, :collection => true)
|
|
188
187
|
define_element_name 'dataBar'
|
|
189
188
|
end
|
|
190
189
|
|
|
@@ -212,7 +211,7 @@ module RubyXL
|
|
|
212
211
|
define_attribute(:timePeriod, RubyXL::ST_TimePeriod)
|
|
213
212
|
define_attribute(:rank, :int)
|
|
214
213
|
define_attribute(:stdDev, :int)
|
|
215
|
-
define_attribute(:equalAverage, :bool,
|
|
214
|
+
define_attribute(:equalAverage, :bool, :default => false)
|
|
216
215
|
define_child_node(RubyXL::Formula, :collection => true, :node_name => :formula, :accessor => :formulas)
|
|
217
216
|
define_child_node(RubyXL::ColorScale)
|
|
218
217
|
define_child_node(RubyXL::DataBar)
|
|
@@ -301,8 +300,8 @@ module RubyXL
|
|
|
301
300
|
|
|
302
301
|
# http://www.datypic.com/sc/ooxml/e-ssml_hyperlink-1.html
|
|
303
302
|
class Hyperlink < OOXMLObject
|
|
304
|
-
define_attribute(:ref,
|
|
305
|
-
|
|
303
|
+
define_attribute(:ref, :ref, :required => true)
|
|
304
|
+
define_relationship
|
|
306
305
|
define_attribute(:location, :string)
|
|
307
306
|
define_attribute(:tooltip, :string)
|
|
308
307
|
define_attribute(:display, :string)
|
|
@@ -323,7 +322,7 @@ module RubyXL
|
|
|
323
322
|
define_attribute(:oleUpdate, RubyXL::ST_OleUpdate)
|
|
324
323
|
define_attribute(:autoLoad, :bool, :default => false)
|
|
325
324
|
define_attribute(:shapeId, :int, :required => true)
|
|
326
|
-
|
|
325
|
+
define_relationship
|
|
327
326
|
define_element_name 'oleObject'
|
|
328
327
|
end
|
|
329
328
|
|
|
@@ -339,7 +338,7 @@ module RubyXL
|
|
|
339
338
|
define_attribute(:ref, :ref)
|
|
340
339
|
define_attribute(:name, :string)
|
|
341
340
|
define_attribute(:sheet, :string)
|
|
342
|
-
|
|
341
|
+
define_relationship
|
|
343
342
|
define_element_name 'dataRef'
|
|
344
343
|
end
|
|
345
344
|
|
|
@@ -408,9 +407,9 @@ module RubyXL
|
|
|
408
407
|
define_attribute(:hiddenRows, :bool, :default => false)
|
|
409
408
|
define_attribute(:hiddenColumns, :bool, :default => false)
|
|
410
409
|
define_attribute(:state, RubyXL::ST_Visibility, :default => 'visible')
|
|
411
|
-
define_attribute(:filterUnique, :bool,
|
|
410
|
+
define_attribute(:filterUnique, :bool, :default => false)
|
|
412
411
|
define_attribute(:view, RubyXL::ST_SheetViewType, :default => 'normal')
|
|
413
|
-
define_attribute(:showRuler, :bool,
|
|
412
|
+
define_attribute(:showRuler, :bool, :default => true)
|
|
414
413
|
define_attribute(:topLeftCell, :ref)
|
|
415
414
|
define_child_node(RubyXL::Pane)
|
|
416
415
|
define_child_node(RubyXL::Selection)
|
|
@@ -433,9 +432,9 @@ module RubyXL
|
|
|
433
432
|
|
|
434
433
|
# http://www.datypic.com/sc/ooxml/e-ssml_control-1.html
|
|
435
434
|
class EmbeddedControl < OOXMLObject
|
|
436
|
-
define_attribute(:shapeId, :int,
|
|
437
|
-
|
|
438
|
-
define_attribute(:name,
|
|
435
|
+
define_attribute(:shapeId, :int, :required => true)
|
|
436
|
+
define_relationship(:required => true)
|
|
437
|
+
define_attribute(:name, :string)
|
|
439
438
|
define_element_name 'control'
|
|
440
439
|
end
|
|
441
440
|
|
|
@@ -489,8 +488,8 @@ module RubyXL
|
|
|
489
488
|
|
|
490
489
|
# http://www.datypic.com/sc/ooxml/e-ssml_customPr-1.html
|
|
491
490
|
class CustomProperty < OOXMLObject
|
|
492
|
-
define_attribute(:name,
|
|
493
|
-
|
|
491
|
+
define_attribute(:name, :string, :required => true)
|
|
492
|
+
define_relationship(:required => true)
|
|
494
493
|
define_element_name 'customPr'
|
|
495
494
|
end
|
|
496
495
|
|
|
@@ -546,7 +545,7 @@ module RubyXL
|
|
|
546
545
|
define_attribute(:cacheIndex, :bool, :default => false)
|
|
547
546
|
define_attribute(:outline, :bool, :default => true)
|
|
548
547
|
define_attribute(:offset, :ref)
|
|
549
|
-
define_attribute(:collapsedLevelsAreSubtotals, :bool,
|
|
548
|
+
define_attribute(:collapsedLevelsAreSubtotals, :bool, :default => false)
|
|
550
549
|
define_attribute(:axis, RubyXL::ST_Axis)
|
|
551
550
|
define_attribute(:fieldPosition, :int, :default => 0)
|
|
552
551
|
define_child_node(RubyXL::PivotReferences)
|
|
@@ -572,7 +571,7 @@ module RubyXL
|
|
|
572
571
|
define_attribute(:previousRow, :uint, :default => 0)
|
|
573
572
|
define_attribute(:previousCol, :uint, :default => 0)
|
|
574
573
|
define_attribute(:click, :uint, :default => 0)
|
|
575
|
-
|
|
574
|
+
define_relationship
|
|
576
575
|
define_child_node(RubyXL::PivotArea)
|
|
577
576
|
define_element_name 'pivotSelection'
|
|
578
577
|
end
|
|
@@ -597,10 +596,10 @@ module RubyXL
|
|
|
597
596
|
define_attribute(:zoomScaleNormal, :uint, :default => 0)
|
|
598
597
|
define_attribute(:zoomScaleSheetLayoutView, :uint, :default => 0)
|
|
599
598
|
define_attribute(:zoomScalePageLayoutView, :uint, :default => 0)
|
|
600
|
-
define_attribute(:workbookViewId, :uint, :required => true, :default => 0
|
|
599
|
+
define_attribute(:workbookViewId, :uint, :required => true, :default => 0)
|
|
601
600
|
define_child_node(RubyXL::Pane)
|
|
602
601
|
define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections)
|
|
603
|
-
define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections
|
|
602
|
+
define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections)
|
|
604
603
|
define_child_node(RubyXL::ExtensionStorageArea)
|
|
605
604
|
define_element_name 'sheetView'
|
|
606
605
|
end
|
|
@@ -614,8 +613,8 @@ module RubyXL
|
|
|
614
613
|
|
|
615
614
|
# http://www.datypic.com/sc/ooxml/e-ssml_worksheet.html
|
|
616
615
|
class Worksheet < OOXMLTopLevelObject
|
|
617
|
-
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'
|
|
618
|
-
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'
|
|
616
|
+
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'.freeze
|
|
617
|
+
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'.freeze
|
|
619
618
|
|
|
620
619
|
include RubyXL::RelationshipSupport
|
|
621
620
|
|
|
@@ -651,7 +650,7 @@ module RubyXL
|
|
|
651
650
|
define_child_node(RubyXL::SortState)
|
|
652
651
|
define_child_node(RubyXL::DataConsolidate)
|
|
653
652
|
define_child_node(RubyXL::CustomSheetViews)
|
|
654
|
-
define_child_node(RubyXL::MergedCells,
|
|
653
|
+
define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
|
|
655
654
|
define_child_node(RubyXL::PhoneticProperties)
|
|
656
655
|
define_child_node(RubyXL::ConditionalFormatting, :collection => [0..-1])
|
|
657
656
|
define_child_node(RubyXL::DataValidations)
|
|
@@ -677,11 +676,11 @@ module RubyXL
|
|
|
677
676
|
define_child_node(RubyXL::ExtensionStorageArea)
|
|
678
677
|
define_child_node(RubyXL::AlternateContent)
|
|
679
678
|
define_element_name 'worksheet'
|
|
680
|
-
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main'
|
|
679
|
+
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
|
|
681
680
|
'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r',
|
|
682
|
-
'http://schemas.openxmlformats.org/markup-compatibility/2006'
|
|
683
|
-
'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac'
|
|
684
|
-
'urn:schemas-microsoft-com:mac:vml'
|
|
681
|
+
'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
|
|
682
|
+
'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
|
|
683
|
+
'urn:schemas-microsoft-com:mac:vml' => 'mv')
|
|
685
684
|
|
|
686
685
|
attr_accessor :workbook, :state, :sheet_name, :sheet_id, :rels
|
|
687
686
|
|
|
@@ -752,7 +751,12 @@ module RubyXL
|
|
|
752
751
|
workbook.stylesheet.cell_xfs[get_row_style(row)]
|
|
753
752
|
end
|
|
754
753
|
|
|
754
|
+
def cell_at(ref)
|
|
755
|
+
reference = RubyXL::Reference.new(ref)
|
|
756
|
+
raise "Invalid reference: #{ref}" unless reference.valid? && reference.single_cell?
|
|
757
|
+
sheet_data&.rows&.[](reference.first_row)&.cells&.[](reference.first_col)
|
|
758
|
+
end
|
|
759
|
+
|
|
755
760
|
include LegacyWorksheet
|
|
756
761
|
end
|
|
757
|
-
|
|
758
762
|
end
|