rubyXL 3.3.22 → 3.4.25
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 +5 -5
- data/.circleci/config.yml +60 -0
- data/.codeclimate.yml +3 -0
- data/Gemfile +9 -8
- data/Gemfile.lock +124 -0
- data/LICENSE.txt +1 -1
- data/README.rdoc +54 -18
- data/Rakefile +29 -29
- data/VERSION +1 -1
- data/lib/rubyXL/cell.rb +3 -30
- data/lib/rubyXL/convenience_methods/cell.rb +276 -0
- data/lib/rubyXL/convenience_methods/color.rb +156 -0
- data/lib/rubyXL/convenience_methods/font.rb +63 -0
- data/lib/rubyXL/convenience_methods/workbook.rb +141 -0
- data/lib/rubyXL/convenience_methods/worksheet.rb +714 -0
- data/lib/rubyXL/convenience_methods.rb +5 -1045
- data/lib/rubyXL/objects/border.rb +2 -5
- data/lib/rubyXL/objects/calculation_chain.rb +4 -4
- data/lib/rubyXL/objects/cell_style.rb +9 -11
- data/lib/rubyXL/objects/chartsheet.rb +15 -19
- data/lib/rubyXL/objects/color.rb +7 -7
- data/lib/rubyXL/objects/column_range.rb +10 -13
- data/lib/rubyXL/objects/comments.rb +5 -8
- data/lib/rubyXL/objects/connection.rb +175 -0
- data/lib/rubyXL/objects/container_nodes.rb +3 -7
- data/lib/rubyXL/objects/content_types.rb +5 -8
- data/lib/rubyXL/objects/data_validation.rb +4 -4
- data/lib/rubyXL/objects/document_properties.rb +12 -16
- data/lib/rubyXL/objects/extensions.rb +19 -4
- data/lib/rubyXL/objects/external_links.rb +30 -8
- data/lib/rubyXL/objects/fill.rb +6 -9
- data/lib/rubyXL/objects/filters.rb +17 -19
- data/lib/rubyXL/objects/font.rb +4 -64
- data/lib/rubyXL/objects/formula.rb +4 -6
- data/lib/rubyXL/objects/ooxml_object.rb +25 -18
- data/lib/rubyXL/objects/query_table.rb +104 -0
- data/lib/rubyXL/objects/reference.rb +6 -8
- data/lib/rubyXL/objects/relationships.rb +13 -13
- data/lib/rubyXL/objects/root.rb +0 -2
- data/lib/rubyXL/objects/shared_strings.rb +4 -7
- data/lib/rubyXL/objects/sheet_common.rb +5 -7
- data/lib/rubyXL/objects/sheet_data.rb +50 -16
- data/lib/rubyXL/objects/simple_types.rb +21 -1
- data/lib/rubyXL/objects/storage.rb +67 -43
- data/lib/rubyXL/objects/stylesheet.rb +22 -29
- data/lib/rubyXL/objects/text.rb +12 -14
- data/lib/rubyXL/objects/theme.rb +142 -126
- data/lib/rubyXL/objects/workbook.rb +172 -64
- data/lib/rubyXL/objects/worksheet.rb +143 -128
- data/lib/rubyXL/parser.rb +1 -3
- data/lib/rubyXL/worksheet.rb +83 -78
- data/lib/rubyXL.rb +1 -1
- data/rdoc/README_rdoc.html +122 -114
- data/rdoc/RubyXL/AExtension.html +21 -60
- data/rdoc/RubyXL/AExtensionStorageArea.html +12 -17
- data/rdoc/RubyXL/ActiveX.html +154 -0
- data/rdoc/RubyXL/ActiveXBinary.html +106 -0
- data/rdoc/RubyXL/AdjustHandleList.html +13 -19
- data/rdoc/RubyXL/Alignment.html +13 -19
- data/rdoc/RubyXL/AlternateContent.html +12 -17
- data/rdoc/RubyXL/Authors.html +13 -19
- data/rdoc/RubyXL/AutoFilter.html +13 -19
- data/rdoc/RubyXL/AutoFilterColumn.html +13 -19
- data/rdoc/RubyXL/BinaryImageFile.html +12 -25
- data/rdoc/RubyXL/BodyProperties.html +13 -19
- data/rdoc/RubyXL/BooleanNode.html +12 -17
- data/rdoc/RubyXL/BooleanValue.html +12 -17
- data/rdoc/RubyXL/Border.html +25 -84
- data/rdoc/RubyXL/BorderEdge.html +20 -52
- data/rdoc/RubyXL/Borders.html +19 -39
- data/rdoc/RubyXL/Break.html +13 -19
- data/rdoc/RubyXL/BreakList.html +13 -19
- data/rdoc/RubyXL/CT_AdjPoint2D.html +13 -19
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +13 -19
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +13 -19
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +13 -19
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +13 -19
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +13 -19
- data/rdoc/RubyXL/CT_Backdrop.html +13 -19
- data/rdoc/RubyXL/CT_Bevel.html +13 -19
- data/rdoc/RubyXL/CT_BiLevelEffect.html +13 -19
- data/rdoc/RubyXL/CT_BlendEffect.html +13 -19
- data/rdoc/RubyXL/CT_Blip.html +13 -19
- data/rdoc/RubyXL/CT_BlipFillProperties.html +13 -19
- data/rdoc/RubyXL/CT_BlurEffect.html +13 -19
- data/rdoc/RubyXL/CT_Camera.html +13 -19
- data/rdoc/RubyXL/CT_Color.html +13 -19
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +13 -19
- data/rdoc/RubyXL/CT_ColorMapping.html +13 -19
- data/rdoc/RubyXL/CT_ColorScheme.html +13 -19
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +13 -19
- data/rdoc/RubyXL/CT_ConnectionSite.html +13 -19
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +13 -19
- data/rdoc/RubyXL/CT_DashStop.html +13 -19
- data/rdoc/RubyXL/CT_DashStopList.html +13 -19
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +13 -19
- data/rdoc/RubyXL/CT_DuotoneEffect.html +13 -19
- data/rdoc/RubyXL/CT_EffectContainer.html +13 -19
- data/rdoc/RubyXL/CT_EffectList.html +13 -19
- data/rdoc/RubyXL/CT_EffectReference.html +13 -19
- data/rdoc/RubyXL/CT_EffectStyleItem.html +13 -19
- data/rdoc/RubyXL/CT_EffectStyleList.html +13 -19
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +13 -19
- data/rdoc/RubyXL/CT_FillEffect.html +13 -19
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +13 -19
- data/rdoc/RubyXL/CT_FillStyleList.html +13 -19
- data/rdoc/RubyXL/CT_FlatText.html +13 -19
- data/rdoc/RubyXL/CT_FontCollection.html +13 -19
- data/rdoc/RubyXL/CT_FontReference.html +13 -19
- data/rdoc/RubyXL/CT_GeomGuideList.html +13 -19
- data/rdoc/RubyXL/CT_GlowEffect.html +13 -19
- data/rdoc/RubyXL/CT_GradientFillProperties.html +13 -19
- data/rdoc/RubyXL/CT_GradientStop.html +13 -19
- data/rdoc/RubyXL/CT_GradientStopList.html +13 -19
- data/rdoc/RubyXL/CT_HSLEffect.html +13 -19
- data/rdoc/RubyXL/CT_HslColor.html +13 -19
- data/rdoc/RubyXL/CT_Hyperlink.html +13 -19
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +13 -19
- data/rdoc/RubyXL/CT_LightRig.html +13 -19
- data/rdoc/RubyXL/CT_LineEndProperties.html +13 -19
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +13 -19
- data/rdoc/RubyXL/CT_LineProperties.html +13 -19
- data/rdoc/RubyXL/CT_LineStyleList.html +13 -19
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +13 -19
- data/rdoc/RubyXL/CT_LuminanceEffect.html +13 -19
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +13 -19
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +13 -19
- data/rdoc/RubyXL/CT_Path2D.html +13 -19
- data/rdoc/RubyXL/CT_Path2DArcTo.html +13 -19
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +13 -19
- data/rdoc/RubyXL/CT_Path2DList.html +13 -19
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +13 -19
- data/rdoc/RubyXL/CT_Path2DTo.html +13 -19
- data/rdoc/RubyXL/CT_PathShadeProperties.html +13 -19
- data/rdoc/RubyXL/CT_PatternFillProperties.html +13 -19
- data/rdoc/RubyXL/CT_Point3D.html +13 -19
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +13 -19
- data/rdoc/RubyXL/CT_PresetColor.html +13 -19
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +13 -19
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +13 -19
- data/rdoc/RubyXL/CT_PresetTextShape.html +13 -19
- data/rdoc/RubyXL/CT_ReflectionEffect.html +13 -19
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +13 -19
- data/rdoc/RubyXL/CT_RelativeRect.html +13 -19
- data/rdoc/RubyXL/CT_SRgbColor.html +13 -19
- data/rdoc/RubyXL/CT_ScRgbColor.html +13 -19
- data/rdoc/RubyXL/CT_Scene3D.html +13 -19
- data/rdoc/RubyXL/CT_SchemeColor.html +13 -19
- data/rdoc/RubyXL/CT_Shape3D.html +13 -19
- data/rdoc/RubyXL/CT_ShapeStyle.html +13 -19
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +13 -19
- data/rdoc/RubyXL/CT_SphereCoords.html +13 -19
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +13 -19
- data/rdoc/RubyXL/CT_StyleMatrix.html +13 -19
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +13 -19
- data/rdoc/RubyXL/CT_SupplementalFont.html +13 -19
- data/rdoc/RubyXL/CT_SystemColor.html +13 -19
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +13 -19
- data/rdoc/RubyXL/CT_TextBlipBullet.html +13 -19
- data/rdoc/RubyXL/CT_TextCharBullet.html +13 -19
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +13 -19
- data/rdoc/RubyXL/CT_TextFont.html +13 -19
- data/rdoc/RubyXL/CT_TextListStyle.html +13 -19
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +13 -19
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +13 -19
- data/rdoc/RubyXL/CT_TextSpacing.html +13 -19
- data/rdoc/RubyXL/CT_TextTabStop.html +13 -19
- data/rdoc/RubyXL/CT_TextTabStopList.html +13 -19
- data/rdoc/RubyXL/CT_TileInfoProperties.html +13 -19
- data/rdoc/RubyXL/CT_TintEffect.html +13 -19
- data/rdoc/RubyXL/CT_Transform2D.html +13 -19
- data/rdoc/RubyXL/CT_TransformEffect.html +13 -19
- data/rdoc/RubyXL/CT_Vector3D.html +13 -19
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +13 -19
- data/rdoc/RubyXL/CalculationChain.html +17 -45
- data/rdoc/RubyXL/CalculationChainCell.html +13 -19
- data/rdoc/RubyXL/CalculationProperties.html +13 -19
- data/rdoc/RubyXL/Cell.html +145 -205
- data/rdoc/RubyXL/CellConvenienceMethods.html +255 -460
- data/rdoc/RubyXL/CellExt.html +13 -19
- data/rdoc/RubyXL/CellSmartTag.html +13 -19
- data/rdoc/RubyXL/CellSmartTagProperty.html +13 -19
- data/rdoc/RubyXL/CellSmartTags.html +13 -19
- data/rdoc/RubyXL/CellStyle.html +13 -19
- data/rdoc/RubyXL/CellStyleXFs.html +19 -39
- data/rdoc/RubyXL/CellStyles.html +19 -39
- data/rdoc/RubyXL/CellValue.html +18 -38
- data/rdoc/RubyXL/CellWatch.html +13 -19
- data/rdoc/RubyXL/CellWatches.html +13 -19
- data/rdoc/RubyXL/CellXFs.html +20 -42
- data/rdoc/RubyXL/ChartColorsFile.html +12 -25
- data/rdoc/RubyXL/ChartFile.html +19 -49
- data/rdoc/RubyXL/ChartStyleFile.html +12 -25
- data/rdoc/RubyXL/ChartUserShapesFile.html +12 -25
- data/rdoc/RubyXL/Chartsheet.html +20 -68
- data/rdoc/RubyXL/ChartsheetPageSetup.html +13 -19
- data/rdoc/RubyXL/ChartsheetProperties.html +13 -19
- data/rdoc/RubyXL/ChartsheetProtection.html +13 -19
- data/rdoc/RubyXL/ChartsheetView.html +13 -19
- data/rdoc/RubyXL/ChartsheetViews.html +13 -19
- data/rdoc/RubyXL/Color.html +29 -40
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +242 -0
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +279 -0
- data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
- data/rdoc/RubyXL/ColorConvenienceMethods.html +137 -0
- data/rdoc/RubyXL/ColorFilter.html +13 -19
- data/rdoc/RubyXL/ColorScale.html +13 -19
- data/rdoc/RubyXL/ColorSet.html +13 -19
- data/rdoc/RubyXL/Colors.html +13 -19
- data/rdoc/RubyXL/ColumnRange.html +23 -74
- data/rdoc/RubyXL/ColumnRanges.html +24 -83
- data/rdoc/RubyXL/Comment.html +13 -19
- data/rdoc/RubyXL/CommentList.html +13 -19
- data/rdoc/RubyXL/CommentsFile.html +18 -51
- data/rdoc/RubyXL/ConditionalFormatValue.html +13 -19
- data/rdoc/RubyXL/ConditionalFormatting.html +13 -19
- data/rdoc/RubyXL/ConditionalFormattingRule.html +13 -19
- data/rdoc/RubyXL/Connection.html +99 -0
- data/rdoc/RubyXL/ConnectionTable.html +99 -0
- data/rdoc/RubyXL/ConnectionTables.html +99 -0
- data/rdoc/RubyXL/ConnectionTextField.html +99 -0
- data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
- data/rdoc/RubyXL/Connections.html +147 -0
- data/rdoc/RubyXL/ContentTypeDefault.html +12 -17
- data/rdoc/RubyXL/ContentTypeOverride.html +12 -17
- data/rdoc/RubyXL/ContentTypes.html +25 -65
- data/rdoc/RubyXL/ControlPropertiesFile.html +14 -22
- data/rdoc/RubyXL/CorePropertiesFile.html +35 -171
- data/rdoc/RubyXL/CustomColor.html +13 -19
- data/rdoc/RubyXL/CustomColorList.html +13 -19
- data/rdoc/RubyXL/CustomFilter.html +13 -19
- data/rdoc/RubyXL/CustomFilters.html +13 -19
- data/rdoc/RubyXL/CustomGeometry.html +13 -19
- data/rdoc/RubyXL/CustomProperties.html +13 -19
- data/rdoc/RubyXL/CustomPropertiesFile.html +12 -25
- data/rdoc/RubyXL/CustomProperty.html +13 -19
- data/rdoc/RubyXL/CustomPropertyFile.html +108 -0
- data/rdoc/RubyXL/CustomSheetView.html +13 -19
- data/rdoc/RubyXL/CustomSheetViews.html +13 -19
- data/rdoc/RubyXL/CustomWorkbookView.html +13 -19
- data/rdoc/RubyXL/CustomWorkbookViews.html +13 -19
- data/rdoc/RubyXL/CustomXMLFile.html +12 -22
- data/rdoc/RubyXL/DXF.html +13 -19
- data/rdoc/RubyXL/DXFs.html +13 -19
- data/rdoc/RubyXL/DataBar.html +13 -19
- data/rdoc/RubyXL/DataConsolidate.html +13 -19
- data/rdoc/RubyXL/DataConsolidationReference.html +13 -19
- data/rdoc/RubyXL/DataConsolidationReferences.html +13 -19
- data/rdoc/RubyXL/DataType.html +11 -39
- data/rdoc/RubyXL/DataValidation.html +13 -19
- data/rdoc/RubyXL/DataValidations.html +13 -19
- data/rdoc/RubyXL/DateGroupItem.html +13 -19
- data/rdoc/RubyXL/DefinedName.html +13 -19
- data/rdoc/RubyXL/DefinedNameExt.html +13 -19
- data/rdoc/RubyXL/DefinedNames.html +13 -19
- data/rdoc/RubyXL/DefinedNamesExt.html +13 -19
- data/rdoc/RubyXL/DocumentPropertiesFile.html +22 -68
- data/rdoc/RubyXL/DrawingFile.html +19 -49
- data/rdoc/RubyXL/DynamicFilter.html +13 -19
- data/rdoc/RubyXL/EmbeddedControl.html +13 -19
- data/rdoc/RubyXL/EmbeddedControls.html +13 -19
- data/rdoc/RubyXL/Extension.html +13 -19
- data/rdoc/RubyXL/ExtensionStorageArea.html +13 -19
- data/rdoc/RubyXL/Extents.html +13 -19
- data/rdoc/RubyXL/ExternalBook.html +13 -19
- data/rdoc/RubyXL/ExternalLinksFile.html +19 -49
- data/rdoc/RubyXL/ExternalReference.html +13 -19
- data/rdoc/RubyXL/ExternalReferences.html +13 -19
- data/rdoc/RubyXL/ExtraColorSchemeList.html +13 -19
- data/rdoc/RubyXL/FieldItem.html +13 -19
- data/rdoc/RubyXL/FileRecoveryProperties.html +13 -19
- data/rdoc/RubyXL/FileSharing.html +13 -19
- data/rdoc/RubyXL/FileVersion.html +13 -19
- data/rdoc/RubyXL/Fill.html +19 -39
- data/rdoc/RubyXL/Fills.html +19 -39
- data/rdoc/RubyXL/FilterContainer.html +13 -19
- data/rdoc/RubyXL/FloatNode.html +12 -17
- data/rdoc/RubyXL/FloatValue.html +12 -17
- data/rdoc/RubyXL/Font.html +20 -544
- data/rdoc/RubyXL/FontConvenienceMethods.html +414 -0
- data/rdoc/RubyXL/FontScheme.html +13 -19
- data/rdoc/RubyXL/Fonts.html +19 -39
- data/rdoc/RubyXL/Formula.html +13 -19
- data/rdoc/RubyXL/FunctionGroup.html +13 -19
- data/rdoc/RubyXL/FunctionGroups.html +13 -19
- data/rdoc/RubyXL/GenericStorageObject.html +22 -84
- data/rdoc/RubyXL/GradientFill.html +13 -19
- data/rdoc/RubyXL/HeaderFooterSettings.html +13 -19
- data/rdoc/RubyXL/Hyperlink.html +13 -19
- data/rdoc/RubyXL/HyperlinkRelFile.html +12 -22
- data/rdoc/RubyXL/Hyperlinks.html +13 -19
- data/rdoc/RubyXL/IconFilter.html +13 -19
- data/rdoc/RubyXL/IconSet.html +13 -19
- data/rdoc/RubyXL/IgnoredError.html +13 -19
- data/rdoc/RubyXL/IgnoredErrors.html +13 -19
- data/rdoc/RubyXL/IndexedColors.html +13 -19
- data/rdoc/RubyXL/InputCells.html +13 -19
- data/rdoc/RubyXL/IntegerNode.html +12 -17
- data/rdoc/RubyXL/IntegerValue.html +12 -17
- data/rdoc/RubyXL/LegacyCell.html +14 -66
- data/rdoc/RubyXL/LegacyWorksheet.html +40 -100
- data/rdoc/RubyXL/MRUColors.html +13 -19
- data/rdoc/RubyXL/MacrosFile.html +12 -25
- data/rdoc/RubyXL/MergedCell.html +13 -19
- data/rdoc/RubyXL/MergedCells.html +13 -19
- data/rdoc/RubyXL/NumFmt.html +13 -19
- data/rdoc/RubyXL/NumberFormat.html +19 -39
- data/rdoc/RubyXL/NumberFormats.html +19 -45
- data/rdoc/RubyXL/OLEObject.html +13 -19
- data/rdoc/RubyXL/OLEObjectFile.html +12 -25
- data/rdoc/RubyXL/OLEObjects.html +13 -19
- data/rdoc/RubyXL/OLESize.html +13 -19
- data/rdoc/RubyXL/OOXMLContainerObject.html +36 -132
- data/rdoc/RubyXL/OOXMLIgnored.html +163 -0
- data/rdoc/RubyXL/OOXMLObject.html +15 -25
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +92 -183
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +49 -185
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +48 -200
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +37 -133
- data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
- data/rdoc/RubyXL/Offset.html +13 -19
- data/rdoc/RubyXL/OlapProperties.html +99 -0
- 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 +13 -19
- data/rdoc/RubyXL/PageMargins.html +13 -19
- data/rdoc/RubyXL/PageSetup.html +13 -19
- data/rdoc/RubyXL/PageSetupProperties.html +13 -19
- data/rdoc/RubyXL/Pane.html +13 -19
- data/rdoc/RubyXL/Parser.html +23 -56
- data/rdoc/RubyXL/PatternFill.html +13 -19
- data/rdoc/RubyXL/PhoneticProperties.html +13 -19
- data/rdoc/RubyXL/PhoneticRun.html +13 -19
- data/rdoc/RubyXL/PivotArea.html +13 -19
- data/rdoc/RubyXL/PivotCache.html +13 -19
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +14 -30
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +12 -25
- data/rdoc/RubyXL/PivotCaches.html +13 -19
- data/rdoc/RubyXL/PivotReference.html +13 -19
- data/rdoc/RubyXL/PivotReferences.html +13 -19
- data/rdoc/RubyXL/PivotTableFile.html +14 -30
- data/rdoc/RubyXL/PivotTableSelection.html +13 -19
- data/rdoc/RubyXL/PresetGeometry.html +13 -19
- data/rdoc/RubyXL/PrintOptions.html +13 -19
- data/rdoc/RubyXL/PrinterSettingsFile.html +12 -25
- data/rdoc/RubyXL/ProtectedRange.html +13 -19
- data/rdoc/RubyXL/ProtectedRanges.html +13 -19
- data/rdoc/RubyXL/Protection.html +13 -19
- data/rdoc/RubyXL/QueryParameter.html +99 -0
- data/rdoc/RubyXL/QueryParameters.html +99 -0
- data/rdoc/RubyXL/QueryTable.html +155 -0
- data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
- data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
- data/rdoc/RubyXL/QueryTableField.html +99 -0
- data/rdoc/RubyXL/QueryTableFields.html +99 -0
- data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
- data/rdoc/RubyXL/RID.html +12 -17
- data/rdoc/RubyXL/RawOOXML.html +21 -60
- data/rdoc/RubyXL/Reference.html +63 -228
- data/rdoc/RubyXL/Relationship.html +12 -17
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +14 -32
- data/rdoc/RubyXL/RelationshipSupport.html +26 -120
- data/rdoc/RubyXL/RevisionPointer.html +99 -0
- data/rdoc/RubyXL/RichText.html +20 -39
- data/rdoc/RubyXL/RichTextRun.html +18 -38
- data/rdoc/RubyXL/Row.html +53 -152
- data/rdoc/RubyXL/RowExt.html +13 -19
- data/rdoc/RubyXL/RunProperties.html +13 -19
- data/rdoc/RubyXL/Scenario.html +13 -19
- data/rdoc/RubyXL/Scenarios.html +13 -19
- data/rdoc/RubyXL/Selection.html +19 -39
- data/rdoc/RubyXL/ShapeGuide.html +13 -19
- data/rdoc/RubyXL/ShapeTextRectangle.html +13 -19
- data/rdoc/RubyXL/SharedStringsTable.html +38 -147
- data/rdoc/RubyXL/Sheet.html +13 -19
- data/rdoc/RubyXL/SheetCalculationProperties.html +13 -19
- data/rdoc/RubyXL/SheetData.html +20 -53
- data/rdoc/RubyXL/SheetDataExt.html +13 -19
- data/rdoc/RubyXL/SheetDataSet.html +13 -19
- data/rdoc/RubyXL/SheetMetadata.html +108 -0
- data/rdoc/RubyXL/SheetName.html +13 -19
- data/rdoc/RubyXL/SheetNames.html +13 -19
- data/rdoc/RubyXL/Sheets.html +13 -19
- data/rdoc/RubyXL/SlicerCacheFile.html +12 -25
- data/rdoc/RubyXL/SlicerFile.html +12 -25
- data/rdoc/RubyXL/SmartTagProperties.html +13 -19
- data/rdoc/RubyXL/SmartTagType.html +13 -19
- data/rdoc/RubyXL/SmartTagTypes.html +13 -19
- data/rdoc/RubyXL/SmartTags.html +13 -19
- data/rdoc/RubyXL/SortCondition.html +13 -19
- data/rdoc/RubyXL/SortState.html +13 -19
- data/rdoc/RubyXL/Sqref.html +20 -53
- data/rdoc/RubyXL/Stop.html +13 -19
- data/rdoc/RubyXL/StringNode.html +12 -17
- data/rdoc/RubyXL/StringNodeW3C.html +21 -54
- data/rdoc/RubyXL/StringValue.html +12 -17
- data/rdoc/RubyXL/Stylesheet.html +35 -117
- data/rdoc/RubyXL/TableFile.html +12 -25
- data/rdoc/RubyXL/TableParts.html +12 -17
- data/rdoc/RubyXL/TableStyle.html +13 -19
- data/rdoc/RubyXL/TableStyles.html +13 -19
- data/rdoc/RubyXL/Text.html +23 -67
- data/rdoc/RubyXL/TextImportSettings.html +99 -0
- data/rdoc/RubyXL/Theme.html +57 -62
- data/rdoc/RubyXL/ThemeElements.html +13 -19
- data/rdoc/RubyXL/ThumbnailFile.html +12 -25
- data/rdoc/RubyXL/Top10.html +13 -19
- data/rdoc/RubyXL/VMLDrawingFile.html +15 -32
- data/rdoc/RubyXL/Variant.html +13 -19
- data/rdoc/RubyXL/Vector.html +18 -38
- data/rdoc/RubyXL/VectorValue.html +12 -17
- data/rdoc/RubyXL/VisualProperties.html +13 -19
- data/rdoc/RubyXL/WebPublishObject.html +13 -19
- data/rdoc/RubyXL/WebPublishObjects.html +13 -19
- data/rdoc/RubyXL/WebPublishingItem.html +13 -19
- data/rdoc/RubyXL/WebPublishingItems.html +13 -19
- data/rdoc/RubyXL/WebPublishingProperties.html +13 -19
- data/rdoc/RubyXL/WebQueryProperties.html +99 -0
- data/rdoc/RubyXL/Workbook.html +487 -227
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +163 -871
- data/rdoc/RubyXL/WorkbookProperties.html +13 -19
- data/rdoc/RubyXL/WorkbookProtection.html +13 -19
- data/rdoc/RubyXL/WorkbookRoot.html +28 -114
- data/rdoc/RubyXL/WorkbookView.html +13 -19
- data/rdoc/RubyXL/WorkbookViews.html +13 -19
- data/rdoc/RubyXL/Worksheet.html +93 -121
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +299 -1109
- data/rdoc/RubyXL/WorksheetDimensions.html +13 -19
- data/rdoc/RubyXL/WorksheetFormatProperties.html +12 -17
- data/rdoc/RubyXL/WorksheetProperties.html +13 -19
- data/rdoc/RubyXL/WorksheetProtection.html +13 -19
- data/rdoc/RubyXL/WorksheetView.html +13 -19
- data/rdoc/RubyXL/WorksheetViews.html +13 -19
- data/rdoc/RubyXL/XF.html +13 -19
- data/rdoc/RubyXL.html +41 -296
- data/rdoc/created.rid +45 -38
- data/rdoc/css/fonts.css +6 -6
- data/rdoc/css/rdoc.css +55 -6
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/index.html +44 -363
- data/rdoc/js/darkfish.js +23 -100
- data/rdoc/js/navigation.js +4 -41
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +32 -31
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +7 -6
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +347 -75
- data/rubyXL.gemspec +78 -43
- data/spec/lib/cell_spec.rb +115 -4
- data/spec/lib/color_spec.rb +2 -1
- data/spec/lib/parser_spec.rb +24 -27
- data/spec/lib/reference_spec.rb +9 -3
- data/spec/lib/rgb_color_spec.rb +27 -0
- data/spec/lib/stylesheet_spec.rb +8 -11
- data/spec/lib/text_spec.rb +8 -4
- data/spec/lib/workbook_spec.rb +26 -5
- data/spec/lib/worksheet_spec.rb +873 -479
- data/spec/spec_helper.rb +2 -0
- data/test/test_parse_write.rb +15 -15
- metadata +65 -10
- data/rdoc/js/jquery.js +0 -4
|
@@ -4,20 +4,23 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
|
|
7
|
-
<title>module RubyXL::WorkbookConvenienceMethods - rubyXL 3.
|
|
7
|
+
<title>module RubyXL::WorkbookConvenienceMethods - rubyXL 3.4.25</title>
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "../";
|
|
11
|
+
var index_rel_prefix = "../";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
|
-
<script src="../js/
|
|
14
|
-
<script src="../js/
|
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
|
15
|
+
<script src="../js/search.js" defer></script>
|
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
|
15
19
|
|
|
16
20
|
<link href="../css/fonts.css" rel="stylesheet">
|
|
17
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
|
18
22
|
|
|
19
23
|
|
|
20
|
-
|
|
21
24
|
<body id="top" role="document" class="module">
|
|
22
25
|
<nav role="navigation">
|
|
23
26
|
<div id="project-navigation">
|
|
@@ -57,74 +60,30 @@
|
|
|
57
60
|
|
|
58
61
|
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
|
|
64
|
+
<!-- Method Quickref -->
|
|
61
65
|
<div id="method-list-section" class="nav-section">
|
|
62
66
|
<h3>Methods</h3>
|
|
63
67
|
|
|
64
68
|
<ul class="link-list" role="directory">
|
|
65
|
-
|
|
66
|
-
<li ><a href="#method-i-5B-5D">#[]</a>
|
|
67
|
-
|
|
68
|
-
<li ><a href="#method-i-add_worksheet">#add_worksheet</a>
|
|
69
|
-
|
|
70
|
-
<li ><a href="#method-i-application">#application</a>
|
|
71
|
-
|
|
72
|
-
<li ><a href="#method-i-application-3D">#application=</a>
|
|
73
|
-
|
|
74
|
-
<li ><a href="#method-i-appversion">#appversion</a>
|
|
75
|
-
|
|
76
|
-
<li ><a href="#method-i-appversion-3D">#appversion=</a>
|
|
77
|
-
|
|
78
69
|
<li ><a href="#method-i-borders">#borders</a>
|
|
79
|
-
|
|
80
70
|
<li ><a href="#method-i-cell_xfs">#cell_xfs</a>
|
|
81
|
-
|
|
82
|
-
<li ><a href="#method-i-company">#company</a>
|
|
83
|
-
|
|
84
|
-
<li ><a href="#method-i-company-3D">#company=</a>
|
|
85
|
-
|
|
86
|
-
<li ><a href="#method-i-created_at">#created_at</a>
|
|
87
|
-
|
|
88
|
-
<li ><a href="#method-i-created_at-3D">#created_at=</a>
|
|
89
|
-
|
|
90
|
-
<li ><a href="#method-i-creator">#creator</a>
|
|
91
|
-
|
|
92
|
-
<li ><a href="#method-i-creator-3D">#creator=</a>
|
|
93
|
-
|
|
94
|
-
<li ><a href="#method-i-date1904">#date1904</a>
|
|
95
|
-
|
|
96
|
-
<li ><a href="#method-i-date1904-3D">#date1904=</a>
|
|
97
|
-
|
|
71
|
+
<li ><a href="#method-i-define_new_name">#define_new_name</a>
|
|
98
72
|
<li ><a href="#method-i-each">#each</a>
|
|
99
|
-
|
|
100
73
|
<li ><a href="#method-i-fills">#fills</a>
|
|
101
|
-
|
|
102
74
|
<li ><a href="#method-i-fonts">#fonts</a>
|
|
103
|
-
|
|
75
|
+
<li ><a href="#method-i-get_defined_name">#get_defined_name</a>
|
|
104
76
|
<li ><a href="#method-i-get_fill_color">#get_fill_color</a>
|
|
105
|
-
|
|
106
|
-
<li ><a href="#method-i-modified_at">#modified_at</a>
|
|
107
|
-
|
|
108
|
-
<li ><a href="#method-i-modified_at-3D">#modified_at=</a>
|
|
109
|
-
|
|
110
|
-
<li ><a href="#method-i-modifier">#modifier</a>
|
|
111
|
-
|
|
112
|
-
<li ><a href="#method-i-modifier-3D">#modifier=</a>
|
|
113
|
-
|
|
114
77
|
<li ><a href="#method-i-modify_alignment">#modify_alignment</a>
|
|
115
|
-
|
|
116
78
|
<li ><a href="#method-i-modify_border">#modify_border</a>
|
|
117
|
-
|
|
118
79
|
<li ><a href="#method-i-modify_border_color">#modify_border_color</a>
|
|
119
|
-
|
|
120
80
|
<li ><a href="#method-i-modify_fill">#modify_fill</a>
|
|
121
|
-
|
|
81
|
+
<li ><a href="#method-i-password_hash">#password_hash</a>
|
|
122
82
|
<li ><a href="#method-i-register_new_fill">#register_new_fill</a>
|
|
123
|
-
|
|
124
83
|
<li ><a href="#method-i-register_new_font">#register_new_font</a>
|
|
125
|
-
|
|
126
84
|
<li ><a href="#method-i-register_new_xf">#register_new_xf</a>
|
|
127
|
-
|
|
85
|
+
<li ><a href="#method-i-title">#title</a>
|
|
86
|
+
<li ><a href="#method-i-title-3D">#title=</a>
|
|
128
87
|
</ul>
|
|
129
88
|
</div>
|
|
130
89
|
|
|
@@ -140,914 +99,241 @@
|
|
|
140
99
|
|
|
141
100
|
</section>
|
|
142
101
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
102
|
<section id="5Buntitled-5D" class="documentation-section">
|
|
147
|
-
|
|
148
103
|
|
|
149
|
-
|
|
150
104
|
|
|
151
|
-
|
|
152
|
-
<section class="constants-list">
|
|
153
|
-
<header>
|
|
154
|
-
<h3>Constants</h3>
|
|
155
|
-
</header>
|
|
156
|
-
<dl>
|
|
157
|
-
|
|
158
|
-
<dt id="SHEET_NAME_TEMPLATE">SHEET_NAME_TEMPLATE
|
|
159
|
-
|
|
160
|
-
<dd>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
</dl>
|
|
164
|
-
</section>
|
|
165
|
-
|
|
166
105
|
|
|
167
|
-
|
|
168
106
|
|
|
169
|
-
|
|
107
|
+
|
|
170
108
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
171
109
|
<header>
|
|
172
110
|
<h3>Public Instance Methods</h3>
|
|
173
111
|
</header>
|
|
174
112
|
|
|
175
|
-
|
|
176
|
-
<div id="method-i-5B-5D" class="method-detail ">
|
|
177
|
-
|
|
178
|
-
<div class="method-heading">
|
|
179
|
-
<span class="method-name">[]</span><span
|
|
180
|
-
class="method-args">(ind)</span>
|
|
181
|
-
|
|
182
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
183
|
-
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<div class="method-description">
|
|
188
|
-
|
|
189
|
-
<p>Finds worksheet by its name or numerical index</p>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
<div class="method-source-code" id="5B-5D-source">
|
|
195
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 7</span>
|
|
196
|
-
<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">ind</span>)
|
|
197
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">ind</span>
|
|
198
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">Integer</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">worksheets</span>[<span class="ruby-identifier">ind</span>]
|
|
199
|
-
<span class="ruby-keyword">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">sheet_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">ind</span> }
|
|
200
|
-
<span class="ruby-keyword">end</span>
|
|
201
|
-
<span class="ruby-keyword">end</span></pre>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
</div>
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
</div>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
<div id="method-i-add_worksheet" class="method-detail ">
|
|
213
|
-
|
|
214
|
-
<div class="method-heading">
|
|
215
|
-
<span class="method-name">add_worksheet</span><span
|
|
216
|
-
class="method-args">(name = nil)</span>
|
|
217
|
-
|
|
218
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
219
|
-
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<div class="method-description">
|
|
224
|
-
|
|
225
|
-
<p>Create new simple worksheet and add it to the workbook worksheets</p>
|
|
226
|
-
|
|
227
|
-
<p>@param [String] The name for the new worksheet</p>
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
<div class="method-source-code" id="add_worksheet-source">
|
|
233
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 17</span>
|
|
234
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_worksheet</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
|
|
235
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
|
|
236
|
-
<span class="ruby-identifier">n</span> = <span class="ruby-value">0</span>
|
|
237
|
-
|
|
238
|
-
<span class="ruby-keyword">begin</span>
|
|
239
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-constant">SHEET_NAME_TEMPLATE</span> <span class="ruby-operator">%</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>)
|
|
240
|
-
<span class="ruby-keyword">end</span> <span class="ruby-keyword">until</span> <span class="ruby-keyword">self</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">nil?</span>
|
|
241
|
-
<span class="ruby-keyword">end</span>
|
|
242
|
-
|
|
243
|
-
<span class="ruby-identifier">new_worksheet</span> = <span class="ruby-constant">Worksheet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:workbook</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">self</span>, <span class="ruby-value">:sheet_name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>)
|
|
244
|
-
<span class="ruby-identifier">worksheets</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_worksheet</span>
|
|
245
|
-
<span class="ruby-identifier">new_worksheet</span>
|
|
246
|
-
<span class="ruby-keyword">end</span></pre>
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
</div>
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<div id="method-i-application" class="method-detail ">
|
|
258
|
-
|
|
259
|
-
<div class="method-heading">
|
|
260
|
-
<span class="method-name">application</span><span
|
|
261
|
-
class="method-args">()</span>
|
|
262
|
-
|
|
263
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
264
|
-
|
|
265
|
-
</div>
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<div class="method-description">
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<div class="method-source-code" id="application-source">
|
|
276
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 53</span>
|
|
277
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application</span>
|
|
278
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">value</span>
|
|
279
|
-
<span class="ruby-keyword">end</span></pre>
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
</div>
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
</div>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<div id="method-i-application-3D" class="method-detail ">
|
|
291
|
-
|
|
292
|
-
<div class="method-heading">
|
|
293
|
-
<span class="method-name">application=</span><span
|
|
294
|
-
class="method-args">(v)</span>
|
|
295
|
-
|
|
296
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
297
|
-
|
|
298
|
-
</div>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
<div class="method-description">
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
<div class="method-source-code" id="application-3D-source">
|
|
309
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 57</span>
|
|
310
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application=</span>(<span class="ruby-identifier">v</span>)
|
|
311
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
|
|
312
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">application</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
|
|
313
|
-
<span class="ruby-keyword">end</span></pre>
|
|
314
|
-
</div>
|
|
315
|
-
|
|
316
|
-
</div>
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
</div>
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<div id="method-i-appversion" class="method-detail ">
|
|
325
|
-
|
|
326
|
-
<div class="method-heading">
|
|
327
|
-
<span class="method-name">appversion</span><span
|
|
328
|
-
class="method-args">()</span>
|
|
329
|
-
|
|
330
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
331
|
-
|
|
332
|
-
</div>
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
<div class="method-description">
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
<div class="method-source-code" id="appversion-source">
|
|
343
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 62</span>
|
|
344
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appversion</span>
|
|
345
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span>.<span class="ruby-identifier">value</span>
|
|
346
|
-
<span class="ruby-keyword">end</span></pre>
|
|
347
|
-
</div>
|
|
348
|
-
|
|
349
|
-
</div>
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
</div>
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
<div id="method-i-appversion-3D" class="method-detail ">
|
|
358
|
-
|
|
359
|
-
<div class="method-heading">
|
|
360
|
-
<span class="method-name">appversion=</span><span
|
|
361
|
-
class="method-args">(v)</span>
|
|
362
|
-
|
|
363
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
364
|
-
|
|
365
|
-
</div>
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
<div class="method-description">
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
<div class="method-source-code" id="appversion-3D-source">
|
|
376
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 66</span>
|
|
377
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appversion=</span>(<span class="ruby-identifier">v</span>)
|
|
378
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
|
|
379
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">app_version</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
|
|
380
|
-
<span class="ruby-keyword">end</span></pre>
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
</div>
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
</div>
|
|
389
|
-
|
|
390
|
-
|
|
391
113
|
<div id="method-i-borders" class="method-detail ">
|
|
392
|
-
|
|
393
114
|
<div class="method-heading">
|
|
394
115
|
<span class="method-name">borders</span><span
|
|
395
116
|
class="method-args">()</span>
|
|
396
|
-
|
|
397
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
398
|
-
|
|
399
|
-
</div>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
<div class="method-description">
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
<div class="method-source-code" id="borders-source">
|
|
410
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 115</span>
|
|
411
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">borders</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
412
|
-
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">borders</span>
|
|
413
|
-
<span class="ruby-keyword">end</span></pre>
|
|
414
|
-
</div>
|
|
415
|
-
|
|
416
|
-
</div>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
</div>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
<div id="method-i-cell_xfs" class="method-detail ">
|
|
425
|
-
|
|
426
|
-
<div class="method-heading">
|
|
427
|
-
<span class="method-name">cell_xfs</span><span
|
|
428
|
-
class="method-args">()</span>
|
|
429
|
-
|
|
430
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
431
|
-
|
|
432
|
-
</div>
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
<div class="method-description">
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
<div class="method-source-code" id="cell_xfs-source">
|
|
443
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 103</span>
|
|
444
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cell_xfs</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
445
|
-
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">cell_xfs</span>
|
|
446
|
-
<span class="ruby-keyword">end</span></pre>
|
|
447
|
-
</div>
|
|
448
|
-
|
|
449
|
-
</div>
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
</div>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
<div id="method-i-company" class="method-detail ">
|
|
458
|
-
|
|
459
|
-
<div class="method-heading">
|
|
460
|
-
<span class="method-name">company</span><span
|
|
461
|
-
class="method-args">()</span>
|
|
462
|
-
|
|
463
117
|
<span class="method-click-advice">click to toggle source</span>
|
|
464
|
-
|
|
465
118
|
</div>
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
<div class="method-description">
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
<div class="method-source-code" id="company-source">
|
|
476
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 44</span>
|
|
477
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">company</span>
|
|
478
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span>.<span class="ruby-identifier">value</span>
|
|
479
|
-
<span class="ruby-keyword">end</span></pre>
|
|
480
|
-
</div>
|
|
481
|
-
|
|
482
|
-
</div>
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
</div>
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
<div id="method-i-company-3D" class="method-detail ">
|
|
491
|
-
|
|
492
|
-
<div class="method-heading">
|
|
493
|
-
<span class="method-name">company=</span><span
|
|
494
|
-
class="method-args">(v)</span>
|
|
495
|
-
|
|
496
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
497
|
-
|
|
498
|
-
</div>
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
<div class="method-description">
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
<div class="method-source-code" id="company-3D-source">
|
|
509
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 48</span>
|
|
510
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">company=</span>(<span class="ruby-identifier">v</span>)
|
|
511
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>
|
|
512
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">document_properties</span>.<span class="ruby-identifier">company</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">v</span>
|
|
513
|
-
<span class="ruby-keyword">end</span></pre>
|
|
514
|
-
</div>
|
|
515
|
-
|
|
516
|
-
</div>
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
</div>
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
<div id="method-i-created_at" class="method-detail ">
|
|
525
|
-
|
|
526
|
-
<div class="method-heading">
|
|
527
|
-
<span class="method-name">created_at</span><span
|
|
528
|
-
class="method-args">()</span>
|
|
529
|
-
|
|
530
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
531
|
-
|
|
532
|
-
</div>
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
<div class="method-description">
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
<div class="method-source-code" id="created_at-source">
|
|
543
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 87</span>
|
|
544
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created_at</span>
|
|
545
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span>
|
|
546
|
-
<span class="ruby-keyword">end</span></pre>
|
|
547
|
-
</div>
|
|
548
|
-
|
|
549
|
-
</div>
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
</div>
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
<div id="method-i-created_at-3D" class="method-detail ">
|
|
558
|
-
|
|
559
|
-
<div class="method-heading">
|
|
560
|
-
<span class="method-name">created_at=</span><span
|
|
561
|
-
class="method-args">(v)</span>
|
|
562
|
-
|
|
563
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
564
|
-
|
|
565
|
-
</div>
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
<div class="method-description">
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
<div class="method-source-code" id="created_at-3D-source">
|
|
576
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 91</span>
|
|
577
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created_at=</span>(<span class="ruby-identifier">v</span>)
|
|
578
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span> = <span class="ruby-identifier">v</span>
|
|
579
|
-
<span class="ruby-keyword">end</span></pre>
|
|
580
|
-
</div>
|
|
581
|
-
|
|
582
|
-
</div>
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
</div>
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
<div id="method-i-creator" class="method-detail ">
|
|
591
|
-
|
|
592
|
-
<div class="method-heading">
|
|
593
|
-
<span class="method-name">creator</span><span
|
|
594
|
-
class="method-args">()</span>
|
|
595
|
-
|
|
596
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
597
|
-
|
|
598
|
-
</div>
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
<div class="method-description">
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
<div class="method-source-code" id="creator-source">
|
|
609
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 71</span>
|
|
610
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">creator</span>
|
|
611
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span>
|
|
612
|
-
<span class="ruby-keyword">end</span></pre>
|
|
613
|
-
</div>
|
|
614
|
-
|
|
615
|
-
</div>
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
</div>
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
<div id="method-i-creator-3D" class="method-detail ">
|
|
624
|
-
|
|
625
|
-
<div class="method-heading">
|
|
626
|
-
<span class="method-name">creator=</span><span
|
|
627
|
-
class="method-args">(v)</span>
|
|
628
|
-
|
|
629
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
630
|
-
|
|
631
|
-
</div>
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
<div class="method-description">
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
119
|
|
|
120
|
+
<div class="method-description">
|
|
640
121
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
<span class="ruby-
|
|
644
|
-
|
|
122
|
+
|
|
123
|
+
<div class="method-source-code" id="borders-source">
|
|
124
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 19</span>
|
|
125
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">borders</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
126
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">borders</span>
|
|
645
127
|
<span class="ruby-keyword">end</span></pre>
|
|
646
128
|
</div>
|
|
647
|
-
|
|
648
129
|
</div>
|
|
649
130
|
|
|
650
|
-
|
|
651
131
|
|
|
652
|
-
|
|
653
132
|
</div>
|
|
654
133
|
|
|
655
|
-
|
|
656
|
-
<div id="method-i-date1904" class="method-detail ">
|
|
657
|
-
|
|
134
|
+
<div id="method-i-cell_xfs" class="method-detail ">
|
|
658
135
|
<div class="method-heading">
|
|
659
|
-
<span class="method-name">
|
|
136
|
+
<span class="method-name">cell_xfs</span><span
|
|
660
137
|
class="method-args">()</span>
|
|
661
|
-
|
|
662
138
|
<span class="method-click-advice">click to toggle source</span>
|
|
663
|
-
|
|
664
139
|
</div>
|
|
665
|
-
|
|
666
140
|
|
|
667
141
|
<div class="method-description">
|
|
668
142
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
143
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
<span class="ruby-
|
|
677
|
-
<span class="ruby-identifier">workbook_properties</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span>
|
|
144
|
+
<div class="method-source-code" id="cell_xfs-source">
|
|
145
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 7</span>
|
|
146
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cell_xfs</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
147
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">cell_xfs</span>
|
|
678
148
|
<span class="ruby-keyword">end</span></pre>
|
|
679
149
|
</div>
|
|
680
|
-
|
|
681
150
|
</div>
|
|
682
151
|
|
|
683
|
-
|
|
684
152
|
|
|
685
|
-
|
|
686
153
|
</div>
|
|
687
154
|
|
|
688
|
-
|
|
689
|
-
<div id="method-i-date1904-3D" class="method-detail ">
|
|
690
|
-
|
|
155
|
+
<div id="method-i-define_new_name" class="method-detail ">
|
|
691
156
|
<div class="method-heading">
|
|
692
|
-
<span class="method-name">
|
|
693
|
-
class="method-args">(
|
|
694
|
-
|
|
157
|
+
<span class="method-name">define_new_name</span><span
|
|
158
|
+
class="method-args">(name, reference)</span>
|
|
695
159
|
<span class="method-click-advice">click to toggle source</span>
|
|
696
|
-
|
|
697
160
|
</div>
|
|
698
|
-
|
|
699
161
|
|
|
700
162
|
<div class="method-description">
|
|
701
163
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
164
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
<span class="ruby-keyword">
|
|
710
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">
|
|
711
|
-
<span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span> = <span class="ruby-identifier">v</span>
|
|
165
|
+
<div class="method-source-code" id="define_new_name-source">
|
|
166
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 122</span>
|
|
167
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">define_new_name</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">reference</span>)
|
|
168
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">defined_names</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DefinedNames</span>.<span class="ruby-identifier">new</span>
|
|
169
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">defined_names</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DefinedName</span>.<span class="ruby-identifier">new</span>({<span class="ruby-value">:name</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">name</span>, <span class="ruby-value">:reference</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">reference</span>})
|
|
712
170
|
<span class="ruby-keyword">end</span></pre>
|
|
713
171
|
</div>
|
|
714
|
-
|
|
715
172
|
</div>
|
|
716
173
|
|
|
717
|
-
|
|
718
174
|
|
|
719
|
-
|
|
720
175
|
</div>
|
|
721
176
|
|
|
722
|
-
|
|
723
177
|
<div id="method-i-each" class="method-detail ">
|
|
724
|
-
|
|
725
178
|
<div class="method-heading">
|
|
726
179
|
<span class="method-name">each</span><span
|
|
727
180
|
class="method-args">() { |i| ... }</span>
|
|
728
|
-
|
|
729
181
|
<span class="method-click-advice">click to toggle source</span>
|
|
730
|
-
|
|
731
182
|
</div>
|
|
732
|
-
|
|
733
183
|
|
|
734
184
|
<div class="method-description">
|
|
735
185
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
186
|
|
|
740
|
-
|
|
741
187
|
<div class="method-source-code" id="each-source">
|
|
742
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
743
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
|
|
188
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 3</span>
|
|
189
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">each</span>
|
|
744
190
|
<span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">i</span> }
|
|
745
191
|
<span class="ruby-keyword">end</span></pre>
|
|
746
192
|
</div>
|
|
747
|
-
|
|
748
193
|
</div>
|
|
749
194
|
|
|
750
|
-
|
|
751
195
|
|
|
752
|
-
|
|
753
196
|
</div>
|
|
754
197
|
|
|
755
|
-
|
|
756
198
|
<div id="method-i-fills" class="method-detail ">
|
|
757
|
-
|
|
758
199
|
<div class="method-heading">
|
|
759
200
|
<span class="method-name">fills</span><span
|
|
760
201
|
class="method-args">()</span>
|
|
761
|
-
|
|
762
202
|
<span class="method-click-advice">click to toggle source</span>
|
|
763
|
-
|
|
764
203
|
</div>
|
|
765
|
-
|
|
766
204
|
|
|
767
205
|
<div class="method-description">
|
|
768
206
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
207
|
|
|
773
|
-
|
|
774
208
|
<div class="method-source-code" id="fills-source">
|
|
775
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
776
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">fills</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
209
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 15</span>
|
|
210
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fills</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
777
211
|
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">fills</span>
|
|
778
212
|
<span class="ruby-keyword">end</span></pre>
|
|
779
213
|
</div>
|
|
780
|
-
|
|
781
214
|
</div>
|
|
782
215
|
|
|
783
|
-
|
|
784
216
|
|
|
785
|
-
|
|
786
217
|
</div>
|
|
787
218
|
|
|
788
|
-
|
|
789
219
|
<div id="method-i-fonts" class="method-detail ">
|
|
790
|
-
|
|
791
220
|
<div class="method-heading">
|
|
792
221
|
<span class="method-name">fonts</span><span
|
|
793
222
|
class="method-args">()</span>
|
|
794
|
-
|
|
795
223
|
<span class="method-click-advice">click to toggle source</span>
|
|
796
|
-
|
|
797
224
|
</div>
|
|
798
|
-
|
|
799
225
|
|
|
800
226
|
<div class="method-description">
|
|
801
227
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
228
|
|
|
806
|
-
|
|
807
229
|
<div class="method-source-code" id="fonts-source">
|
|
808
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
809
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">fonts</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
230
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 11</span>
|
|
231
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fonts</span> <span class="ruby-comment"># Stylesheet should be pre-filled with defaults on initialize()</span>
|
|
810
232
|
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">fonts</span>
|
|
811
233
|
<span class="ruby-keyword">end</span></pre>
|
|
812
234
|
</div>
|
|
813
|
-
|
|
814
|
-
</div>
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
</div>
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
<div id="method-i-get_fill_color" class="method-detail ">
|
|
823
|
-
|
|
824
|
-
<div class="method-heading">
|
|
825
|
-
<span class="method-name">get_fill_color</span><span
|
|
826
|
-
class="method-args">(xf)</span>
|
|
827
|
-
|
|
828
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
829
|
-
|
|
830
|
-
</div>
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
<div class="method-description">
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
<div class="method-source-code" id="get_fill_color-source">
|
|
841
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 119</span>
|
|
842
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_fill_color</span>(<span class="ruby-identifier">xf</span>)
|
|
843
|
-
<span class="ruby-identifier">fill</span> = <span class="ruby-identifier">fills</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">fill_id</span>]
|
|
844
|
-
<span class="ruby-identifier">pattern</span> = <span class="ruby-identifier">fill</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">fill</span>.<span class="ruby-identifier">pattern_fill</span>
|
|
845
|
-
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">pattern</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">pattern</span>.<span class="ruby-identifier">fg_color</span>
|
|
846
|
-
<span class="ruby-identifier">color</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span> <span class="ruby-operator">||</span> <span class="ruby-string">'ffffff'</span>
|
|
847
|
-
<span class="ruby-keyword">end</span></pre>
|
|
848
|
-
</div>
|
|
849
|
-
|
|
850
|
-
</div>
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
</div>
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
<div id="method-i-modified_at" class="method-detail ">
|
|
859
|
-
|
|
860
|
-
<div class="method-heading">
|
|
861
|
-
<span class="method-name">modified_at</span><span
|
|
862
|
-
class="method-args">()</span>
|
|
863
|
-
|
|
864
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
865
|
-
|
|
866
|
-
</div>
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
<div class="method-description">
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
<div class="method-source-code" id="modified_at-source">
|
|
877
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 95</span>
|
|
878
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modified_at</span>
|
|
879
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span>
|
|
880
|
-
<span class="ruby-keyword">end</span></pre>
|
|
881
|
-
</div>
|
|
882
|
-
|
|
883
|
-
</div>
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
</div>
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
<div id="method-i-modified_at-3D" class="method-detail ">
|
|
892
|
-
|
|
893
|
-
<div class="method-heading">
|
|
894
|
-
<span class="method-name">modified_at=</span><span
|
|
895
|
-
class="method-args">(v)</span>
|
|
896
|
-
|
|
897
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
898
|
-
|
|
899
|
-
</div>
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
<div class="method-description">
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
<div class="method-source-code" id="modified_at-3D-source">
|
|
910
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 99</span>
|
|
911
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modified_at=</span>(<span class="ruby-identifier">v</span>)
|
|
912
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span> = <span class="ruby-identifier">v</span>
|
|
913
|
-
<span class="ruby-keyword">end</span></pre>
|
|
914
|
-
</div>
|
|
915
|
-
|
|
916
235
|
</div>
|
|
917
236
|
|
|
918
|
-
|
|
919
237
|
|
|
920
|
-
|
|
921
238
|
</div>
|
|
922
239
|
|
|
923
|
-
|
|
924
|
-
<div id="method-i-modifier" class="method-detail ">
|
|
925
|
-
|
|
240
|
+
<div id="method-i-get_defined_name" class="method-detail ">
|
|
926
241
|
<div class="method-heading">
|
|
927
|
-
<span class="method-name">
|
|
928
|
-
class="method-args">()</span>
|
|
929
|
-
|
|
242
|
+
<span class="method-name">get_defined_name</span><span
|
|
243
|
+
class="method-args">(name)</span>
|
|
930
244
|
<span class="method-click-advice">click to toggle source</span>
|
|
931
|
-
|
|
932
245
|
</div>
|
|
933
|
-
|
|
934
246
|
|
|
935
247
|
<div class="method-description">
|
|
936
248
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
249
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
<span class="ruby-keyword">
|
|
945
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span>
|
|
250
|
+
<div class="method-source-code" id="get_defined_name-source">
|
|
251
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 127</span>
|
|
252
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_defined_name</span>(<span class="ruby-identifier">name</span>)
|
|
253
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">defined_names</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">defined_names</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
|
|
946
254
|
<span class="ruby-keyword">end</span></pre>
|
|
947
255
|
</div>
|
|
948
|
-
|
|
949
256
|
</div>
|
|
950
257
|
|
|
951
|
-
|
|
952
258
|
|
|
953
|
-
|
|
954
259
|
</div>
|
|
955
260
|
|
|
956
|
-
|
|
957
|
-
<div id="method-i-modifier-3D" class="method-detail ">
|
|
958
|
-
|
|
261
|
+
<div id="method-i-get_fill_color" class="method-detail ">
|
|
959
262
|
<div class="method-heading">
|
|
960
|
-
<span class="method-name">
|
|
961
|
-
class="method-args">(
|
|
962
|
-
|
|
263
|
+
<span class="method-name">get_fill_color</span><span
|
|
264
|
+
class="method-args">(xf)</span>
|
|
963
265
|
<span class="method-click-advice">click to toggle source</span>
|
|
964
|
-
|
|
965
266
|
</div>
|
|
966
|
-
|
|
967
267
|
|
|
968
268
|
<div class="method-description">
|
|
969
269
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
270
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
<span class="ruby-
|
|
978
|
-
<span class="ruby-identifier">
|
|
271
|
+
<div class="method-source-code" id="get_fill_color-source">
|
|
272
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 23</span>
|
|
273
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_fill_color</span>(<span class="ruby-identifier">xf</span>)
|
|
274
|
+
<span class="ruby-identifier">fill</span> = <span class="ruby-identifier">fills</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">fill_id</span>]
|
|
275
|
+
<span class="ruby-identifier">pattern</span> = <span class="ruby-identifier">fill</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">fill</span>.<span class="ruby-identifier">pattern_fill</span>
|
|
276
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">pattern</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">pattern</span>.<span class="ruby-identifier">fg_color</span>
|
|
277
|
+
<span class="ruby-identifier">color</span> = <span class="ruby-identifier">color</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">color</span>.<span class="ruby-identifier">get_rgb</span>(<span class="ruby-keyword">self</span>)
|
|
278
|
+
<span class="ruby-identifier">color</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">color</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">||</span> <span class="ruby-string">'ffffff'</span>
|
|
979
279
|
<span class="ruby-keyword">end</span></pre>
|
|
980
280
|
</div>
|
|
981
|
-
|
|
982
281
|
</div>
|
|
983
282
|
|
|
984
|
-
|
|
985
283
|
|
|
986
|
-
|
|
987
284
|
</div>
|
|
988
285
|
|
|
989
|
-
|
|
990
286
|
<div id="method-i-modify_alignment" class="method-detail ">
|
|
991
|
-
|
|
992
287
|
<div class="method-heading">
|
|
993
288
|
<span class="method-name">modify_alignment</span><span
|
|
994
289
|
class="method-args">(style_index) { |alignment| ... }</span>
|
|
995
|
-
|
|
996
290
|
<span class="method-click-advice">click to toggle source</span>
|
|
997
|
-
|
|
998
291
|
</div>
|
|
999
|
-
|
|
1000
292
|
|
|
1001
293
|
<div class="method-description">
|
|
1002
294
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
295
|
|
|
1007
|
-
|
|
1008
296
|
<div class="method-source-code" id="modify_alignment-source">
|
|
1009
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1010
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
1011
|
-
<span class="ruby-identifier">
|
|
1012
|
-
<span class="ruby-identifier">
|
|
1013
|
-
<span class="ruby-keyword">
|
|
1014
|
-
|
|
297
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 56</span>
|
|
298
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modify_alignment</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
299
|
+
<span class="ruby-identifier">old_xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>]
|
|
300
|
+
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
|
301
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-keyword">then</span>
|
|
302
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">alignment</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">dup</span>
|
|
303
|
+
<span class="ruby-keyword">else</span>
|
|
304
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">alignment</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Alignment</span>.<span class="ruby-identifier">new</span>
|
|
305
|
+
<span class="ruby-keyword">end</span>
|
|
1015
306
|
|
|
1016
|
-
<span class="ruby-
|
|
307
|
+
<span class="ruby-keyword">yield</span>(<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">alignment</span>)
|
|
308
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">apply_alignment</span> = <span class="ruby-keyword">true</span>
|
|
309
|
+
|
|
310
|
+
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
|
1017
311
|
<span class="ruby-keyword">end</span></pre>
|
|
1018
312
|
</div>
|
|
1019
|
-
|
|
1020
313
|
</div>
|
|
1021
314
|
|
|
1022
|
-
|
|
1023
315
|
|
|
1024
|
-
|
|
1025
316
|
</div>
|
|
1026
317
|
|
|
1027
|
-
|
|
1028
318
|
<div id="method-i-modify_border" class="method-detail ">
|
|
1029
|
-
|
|
1030
319
|
<div class="method-heading">
|
|
1031
320
|
<span class="method-name">modify_border</span><span
|
|
1032
321
|
class="method-args">(style_index, direction, weight)</span>
|
|
1033
|
-
|
|
1034
322
|
<span class="method-click-advice">click to toggle source</span>
|
|
1035
|
-
|
|
1036
323
|
</div>
|
|
1037
|
-
|
|
1038
324
|
|
|
1039
325
|
<div class="method-description">
|
|
1040
326
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
327
|
|
|
1045
|
-
|
|
1046
328
|
<div class="method-source-code" id="modify_border-source">
|
|
1047
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1048
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
329
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 79</span>
|
|
330
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modify_border</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
1049
331
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
|
1050
332
|
<span class="ruby-identifier">new_border</span> = <span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
|
333
|
+
|
|
334
|
+
<span class="ruby-identifier">edge</span> = <span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">direction</span>)
|
|
335
|
+
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{direction}="</span>, <span class="ruby-identifier">edge</span>.<span class="ruby-identifier">dup</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">edge</span>
|
|
336
|
+
|
|
1051
337
|
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">set_edge_style</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
|
|
1052
338
|
|
|
1053
339
|
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> = <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_border</span> } <span class="ruby-comment"># Reuse existing border, if it exists</span>
|
|
@@ -1058,36 +344,24 @@
|
|
|
1058
344
|
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
|
1059
345
|
<span class="ruby-keyword">end</span></pre>
|
|
1060
346
|
</div>
|
|
1061
|
-
|
|
1062
347
|
</div>
|
|
1063
348
|
|
|
1064
|
-
|
|
1065
349
|
|
|
1066
|
-
|
|
1067
350
|
</div>
|
|
1068
351
|
|
|
1069
|
-
|
|
1070
352
|
<div id="method-i-modify_border_color" class="method-detail ">
|
|
1071
|
-
|
|
1072
353
|
<div class="method-heading">
|
|
1073
354
|
<span class="method-name">modify_border_color</span><span
|
|
1074
355
|
class="method-args">(style_index, direction, color)</span>
|
|
1075
|
-
|
|
1076
356
|
<span class="method-click-advice">click to toggle source</span>
|
|
1077
|
-
|
|
1078
357
|
</div>
|
|
1079
|
-
|
|
1080
358
|
|
|
1081
359
|
<div class="method-description">
|
|
1082
360
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
361
|
|
|
1087
|
-
|
|
1088
362
|
<div class="method-source-code" id="modify_border_color-source">
|
|
1089
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1090
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_border_color</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
|
363
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 96</span>
|
|
364
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modify_border_color</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
|
1091
365
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
|
1092
366
|
<span class="ruby-identifier">new_border</span> = <span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
|
1093
367
|
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">set_edge_color</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
|
|
@@ -1100,73 +374,77 @@
|
|
|
1100
374
|
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
|
1101
375
|
<span class="ruby-keyword">end</span></pre>
|
|
1102
376
|
</div>
|
|
1103
|
-
|
|
1104
377
|
</div>
|
|
1105
378
|
|
|
1106
|
-
|
|
1107
379
|
|
|
1108
|
-
|
|
1109
380
|
</div>
|
|
1110
381
|
|
|
1111
|
-
|
|
1112
382
|
<div id="method-i-modify_fill" class="method-detail ">
|
|
1113
|
-
|
|
1114
383
|
<div class="method-heading">
|
|
1115
384
|
<span class="method-name">modify_fill</span><span
|
|
1116
385
|
class="method-args">(style_index, rgb)</span>
|
|
1117
|
-
|
|
1118
386
|
<span class="method-click-advice">click to toggle source</span>
|
|
1119
|
-
|
|
1120
387
|
</div>
|
|
1121
|
-
|
|
1122
388
|
|
|
1123
389
|
<div class="method-description">
|
|
1124
390
|
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
391
|
|
|
1129
|
-
|
|
1130
392
|
<div class="method-source-code" id="modify_fill-source">
|
|
1131
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1132
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">rgb</span>)
|
|
393
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 71</span>
|
|
394
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modify_fill</span>(<span class="ruby-identifier">style_index</span>, <span class="ruby-identifier">rgb</span>)
|
|
1133
395
|
<span class="ruby-identifier">xf</span> = <span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">style_index</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>].<span class="ruby-identifier">dup</span>
|
|
1134
|
-
<span class="ruby-identifier">new_fill</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Fill</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:pattern_fill</span>
|
|
1135
|
-
|
|
1136
|
-
|
|
396
|
+
<span class="ruby-identifier">new_fill</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Fill</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:pattern_fill</span> <span class="ruby-operator">=></span>
|
|
397
|
+
<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">PatternFill</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:pattern_type</span> <span class="ruby-operator">=></span> <span class="ruby-string">'solid'</span>,
|
|
398
|
+
<span class="ruby-value">:fg_color</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:rgb</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">rgb</span>)))
|
|
1137
399
|
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">register_new_fill</span>(<span class="ruby-identifier">new_fill</span>, <span class="ruby-identifier">xf</span>))
|
|
1138
400
|
<span class="ruby-keyword">end</span></pre>
|
|
1139
401
|
</div>
|
|
1140
|
-
|
|
1141
402
|
</div>
|
|
1142
403
|
|
|
1143
|
-
|
|
1144
404
|
|
|
1145
|
-
|
|
1146
405
|
</div>
|
|
1147
406
|
|
|
1148
|
-
|
|
407
|
+
<div id="method-i-password_hash" class="method-detail ">
|
|
408
|
+
<div class="method-heading">
|
|
409
|
+
<span class="method-name">password_hash</span><span
|
|
410
|
+
class="method-args">(pwd)</span>
|
|
411
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
412
|
+
</div>
|
|
413
|
+
|
|
414
|
+
<div class="method-description">
|
|
415
|
+
<p>Calculate password hash from string for use in ‘password’ fields. <a href="https://www.openoffice.org/sc/excelfileformat.pdf">www.openoffice.org/sc/excelfileformat.pdf</a></p>
|
|
416
|
+
|
|
417
|
+
<div class="method-source-code" id="password_hash-source">
|
|
418
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 111</span>
|
|
419
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">password_hash</span>(<span class="ruby-identifier">pwd</span>)
|
|
420
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-value">0</span>
|
|
421
|
+
<span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each_char</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
|
422
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-identifier">hsh</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">ord</span>
|
|
423
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-identifier">hsh</span> <span class="ruby-operator"><<</span> <span class="ruby-value">1</span>
|
|
424
|
+
<span class="ruby-identifier">hsh</span> <span class="ruby-operator">-=</span> <span class="ruby-value">0x7fff</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">hsh</span> <span class="ruby-operator">></span> <span class="ruby-value">0x7fff</span>
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
(<span class="ruby-identifier">hsh</span> <span class="ruby-operator">^</span> <span class="ruby-identifier">pwd</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">^</span> <span class="ruby-value">0xCE4B</span>).<span class="ruby-identifier">to_s</span>(<span class="ruby-value">16</span>)
|
|
428
|
+
<span class="ruby-keyword">end</span></pre>
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
</div>
|
|
434
|
+
|
|
1149
435
|
<div id="method-i-register_new_fill" class="method-detail ">
|
|
1150
|
-
|
|
1151
436
|
<div class="method-heading">
|
|
1152
437
|
<span class="method-name">register_new_fill</span><span
|
|
1153
438
|
class="method-args">(new_fill, old_xf)</span>
|
|
1154
|
-
|
|
1155
439
|
<span class="method-click-advice">click to toggle source</span>
|
|
1156
|
-
|
|
1157
440
|
</div>
|
|
1158
|
-
|
|
1159
441
|
|
|
1160
442
|
<div class="method-description">
|
|
1161
443
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
444
|
|
|
1166
|
-
|
|
1167
445
|
<div class="method-source-code" id="register_new_fill-source">
|
|
1168
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1169
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_fill</span>(<span class="ruby-identifier">new_fill</span>, <span class="ruby-identifier">old_xf</span>)
|
|
446
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 31</span>
|
|
447
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">register_new_fill</span>(<span class="ruby-identifier">new_fill</span>, <span class="ruby-identifier">old_xf</span>)
|
|
1170
448
|
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
|
1171
449
|
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">apply_fill</span> = <span class="ruby-keyword">true</span>
|
|
1172
450
|
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">fill_id</span> = <span class="ruby-identifier">fills</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_fill</span> } <span class="ruby-comment"># Reuse existing fill, if it exists</span>
|
|
@@ -1175,36 +453,24 @@
|
|
|
1175
453
|
<span class="ruby-identifier">new_xf</span>
|
|
1176
454
|
<span class="ruby-keyword">end</span></pre>
|
|
1177
455
|
</div>
|
|
1178
|
-
|
|
1179
456
|
</div>
|
|
1180
457
|
|
|
1181
|
-
|
|
1182
458
|
|
|
1183
|
-
|
|
1184
459
|
</div>
|
|
1185
460
|
|
|
1186
|
-
|
|
1187
461
|
<div id="method-i-register_new_font" class="method-detail ">
|
|
1188
|
-
|
|
1189
462
|
<div class="method-heading">
|
|
1190
463
|
<span class="method-name">register_new_font</span><span
|
|
1191
464
|
class="method-args">(new_font, old_xf)</span>
|
|
1192
|
-
|
|
1193
465
|
<span class="method-click-advice">click to toggle source</span>
|
|
1194
|
-
|
|
1195
466
|
</div>
|
|
1196
|
-
|
|
1197
467
|
|
|
1198
468
|
<div class="method-description">
|
|
1199
469
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
470
|
|
|
1204
|
-
|
|
1205
471
|
<div class="method-source-code" id="register_new_font-source">
|
|
1206
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1207
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">new_font</span>, <span class="ruby-identifier">old_xf</span>)
|
|
472
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 40</span>
|
|
473
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">register_new_font</span>(<span class="ruby-identifier">new_font</span>, <span class="ruby-identifier">old_xf</span>)
|
|
1208
474
|
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
|
1209
475
|
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">font_id</span> = <span class="ruby-identifier">fonts</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_font</span> } <span class="ruby-comment"># Reuse existing font, if it exists</span>
|
|
1210
476
|
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">font_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">fonts</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this font has never existed before, add it to collection.</span>
|
|
@@ -1213,60 +479,86 @@
|
|
|
1213
479
|
<span class="ruby-identifier">new_xf</span>
|
|
1214
480
|
<span class="ruby-keyword">end</span></pre>
|
|
1215
481
|
</div>
|
|
1216
|
-
|
|
1217
482
|
</div>
|
|
1218
483
|
|
|
1219
|
-
|
|
1220
484
|
|
|
1221
|
-
|
|
1222
485
|
</div>
|
|
1223
486
|
|
|
1224
|
-
|
|
1225
487
|
<div id="method-i-register_new_xf" class="method-detail ">
|
|
1226
|
-
|
|
1227
488
|
<div class="method-heading">
|
|
1228
489
|
<span class="method-name">register_new_xf</span><span
|
|
1229
490
|
class="method-args">(new_xf)</span>
|
|
1230
|
-
|
|
1231
491
|
<span class="method-click-advice">click to toggle source</span>
|
|
1232
|
-
|
|
1233
492
|
</div>
|
|
1234
|
-
|
|
1235
493
|
|
|
1236
494
|
<div class="method-description">
|
|
1237
495
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
496
|
|
|
1242
|
-
|
|
1243
497
|
<div class="method-source-code" id="register_new_xf-source">
|
|
1244
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1245
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
|
498
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 49</span>
|
|
499
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
|
1246
500
|
<span class="ruby-identifier">new_xf_id</span> = <span class="ruby-identifier">cell_xfs</span>.<span class="ruby-identifier">find_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">xf</span><span class="ruby-operator">|</span> <span class="ruby-identifier">xf</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">new_xf</span> } <span class="ruby-comment"># Reuse existing XF, if it exists</span>
|
|
1247
501
|
<span class="ruby-identifier">new_xf_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">cell_xfs</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this XF has never existed before, add it to collection.</span>
|
|
1248
502
|
<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">new_xf_id</span>] = <span class="ruby-identifier">new_xf</span>
|
|
1249
503
|
<span class="ruby-identifier">new_xf_id</span>
|
|
1250
504
|
<span class="ruby-keyword">end</span></pre>
|
|
1251
505
|
</div>
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
</div>
|
|
510
|
+
|
|
511
|
+
<div id="method-i-title" class="method-detail ">
|
|
512
|
+
<div class="method-heading">
|
|
513
|
+
<span class="method-name">title</span><span
|
|
514
|
+
class="method-args">()</span>
|
|
515
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
516
|
+
</div>
|
|
517
|
+
|
|
518
|
+
<div class="method-description">
|
|
1252
519
|
|
|
520
|
+
|
|
521
|
+
<div class="method-source-code" id="title-source">
|
|
522
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 131</span>
|
|
523
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">title</span>
|
|
524
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">dc_title</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">dc_title</span>.<span class="ruby-identifier">value</span>
|
|
525
|
+
<span class="ruby-keyword">end</span></pre>
|
|
526
|
+
</div>
|
|
527
|
+
</div>
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
</div>
|
|
531
|
+
|
|
532
|
+
<div id="method-i-title-3D" class="method-detail ">
|
|
533
|
+
<div class="method-heading">
|
|
534
|
+
<span class="method-name">title=</span><span
|
|
535
|
+
class="method-args">(v)</span>
|
|
536
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
537
|
+
</div>
|
|
538
|
+
|
|
539
|
+
<div class="method-description">
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
<div class="method-source-code" id="title-3D-source">
|
|
543
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 135</span>
|
|
544
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">title=</span>(<span class="ruby-identifier">v</span>)
|
|
545
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">dc_title</span> = <span class="ruby-identifier">v</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">StringNode</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:value</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">v</span>)
|
|
546
|
+
<span class="ruby-keyword">end</span></pre>
|
|
547
|
+
</div>
|
|
1253
548
|
</div>
|
|
1254
549
|
|
|
1255
|
-
|
|
1256
550
|
|
|
1257
|
-
|
|
1258
551
|
</div>
|
|
1259
552
|
|
|
1260
|
-
|
|
1261
553
|
</section>
|
|
1262
|
-
|
|
554
|
+
|
|
1263
555
|
</section>
|
|
1264
556
|
</main>
|
|
1265
557
|
|
|
1266
558
|
|
|
1267
559
|
<footer id="validator-badges" role="contentinfo">
|
|
1268
|
-
<p><a href="
|
|
1269
|
-
<p>Generated by <a href="
|
|
560
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
|
561
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
|
|
1270
562
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
1271
563
|
</footer>
|
|
1272
564
|
|