rubyXL 3.3.21 → 3.4.17
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 +3 -2
- data/Gemfile.lock +96 -0
- data/LICENSE.txt +1 -1
- data/README.rdoc +47 -16
- data/Rakefile +3 -2
- data/VERSION +1 -1
- data/lib/rubyXL.rb +1 -0
- data/lib/rubyXL/cell.rb +1 -26
- data/lib/rubyXL/convenience_methods.rb +5 -982
- data/lib/rubyXL/convenience_methods/cell.rb +272 -0
- data/lib/rubyXL/convenience_methods/color.rb +160 -0
- data/lib/rubyXL/convenience_methods/font.rb +63 -0
- data/lib/rubyXL/convenience_methods/workbook.rb +136 -0
- data/lib/rubyXL/convenience_methods/worksheet.rb +710 -0
- data/lib/rubyXL/objects/border.rb +31 -3
- data/lib/rubyXL/objects/calculation_chain.rb +2 -2
- data/lib/rubyXL/objects/cell_style.rb +8 -8
- data/lib/rubyXL/objects/chartsheet.rb +10 -10
- data/lib/rubyXL/objects/color.rb +6 -4
- data/lib/rubyXL/objects/column_range.rb +10 -10
- data/lib/rubyXL/objects/comments.rb +6 -6
- data/lib/rubyXL/objects/connection.rb +175 -0
- data/lib/rubyXL/objects/container_nodes.rb +2 -2
- data/lib/rubyXL/objects/content_types.rb +2 -2
- data/lib/rubyXL/objects/data_validation.rb +4 -2
- data/lib/rubyXL/objects/document_properties.rb +3 -3
- data/lib/rubyXL/objects/extensions.rb +20 -3
- data/lib/rubyXL/objects/external_links.rb +26 -2
- data/lib/rubyXL/objects/fill.rb +4 -4
- data/lib/rubyXL/objects/filters.rb +12 -12
- data/lib/rubyXL/objects/font.rb +2 -60
- data/lib/rubyXL/objects/formula.rb +1 -1
- data/lib/rubyXL/objects/ooxml_object.rb +15 -3
- data/lib/rubyXL/objects/query_table.rb +104 -0
- data/lib/rubyXL/objects/relationships.rb +8 -3
- data/lib/rubyXL/objects/shared_strings.rb +1 -1
- data/lib/rubyXL/objects/sheet_common.rb +4 -4
- data/lib/rubyXL/objects/sheet_data.rb +48 -11
- data/lib/rubyXL/objects/simple_types.rb +18 -0
- data/lib/rubyXL/objects/storage.rb +25 -1
- data/lib/rubyXL/objects/stylesheet.rb +14 -14
- data/lib/rubyXL/objects/text.rb +8 -8
- data/lib/rubyXL/objects/theme.rb +138 -119
- data/lib/rubyXL/objects/workbook.rb +153 -43
- data/lib/rubyXL/objects/worksheet.rb +118 -107
- data/lib/rubyXL/worksheet.rb +19 -13
- data/rdoc/README_rdoc.html +109 -103
- data/rdoc/RubyXL.html +39 -296
- 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 +76 -53
- data/rdoc/RubyXL/BorderEdge.html +71 -17
- 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 +144 -204
- data/rdoc/RubyXL/CellConvenienceMethods.html +240 -426
- 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 +18 -38
- data/rdoc/RubyXL/CellStyles.html +18 -38
- 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 +19 -39
- 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 +19 -67
- 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 +28 -39
- data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +242 -0
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +279 -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 +20 -71
- data/rdoc/RubyXL/ColumnRanges.html +20 -79
- data/rdoc/RubyXL/Comment.html +13 -19
- data/rdoc/RubyXL/CommentList.html +13 -19
- data/rdoc/RubyXL/CommentsFile.html +17 -50
- 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 +23 -63
- data/rdoc/RubyXL/ControlPropertiesFile.html +14 -22
- data/rdoc/RubyXL/CorePropertiesFile.html +26 -162
- 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 +20 -66
- 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 +18 -38
- data/rdoc/RubyXL/Fills.html +18 -38
- 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 +19 -81
- 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 +18 -38
- data/rdoc/RubyXL/NumberFormats.html +18 -44
- 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 +88 -179
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +47 -183
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +42 -194
- 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 +20 -53
- 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 +19 -58
- data/rdoc/RubyXL/Reference.html +31 -215
- data/rdoc/RubyXL/Relationship.html +12 -17
- data/rdoc/RubyXL/RelationshipSupport.html +32 -126
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +15 -33
- data/rdoc/RubyXL/RevisionPointer.html +99 -0
- data/rdoc/RubyXL/RichText.html +18 -38
- data/rdoc/RubyXL/RichTextRun.html +17 -37
- 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 +20 -40
- data/rdoc/RubyXL/ShapeGuide.html +13 -19
- data/rdoc/RubyXL/ShapeTextRectangle.html +13 -19
- data/rdoc/RubyXL/SharedStringsTable.html +31 -140
- 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/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 +18 -51
- data/rdoc/RubyXL/Stop.html +13 -19
- data/rdoc/RubyXL/StringNode.html +12 -17
- data/rdoc/RubyXL/StringNodeW3C.html +19 -52
- data/rdoc/RubyXL/StringValue.html +12 -17
- data/rdoc/RubyXL/Stylesheet.html +30 -112
- 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 +19 -63
- data/rdoc/RubyXL/TextImportSettings.html +99 -0
- data/rdoc/RubyXL/Theme.html +58 -63
- 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 +17 -37
- 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 +483 -226
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +149 -857
- data/rdoc/RubyXL/WorkbookProperties.html +13 -19
- data/rdoc/RubyXL/WorkbookProtection.html +13 -19
- data/rdoc/RubyXL/WorkbookRoot.html +23 -109
- data/rdoc/RubyXL/WorkbookView.html +13 -19
- data/rdoc/RubyXL/WorkbookViews.html +13 -19
- data/rdoc/RubyXL/Worksheet.html +70 -122
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +398 -1049
- 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/created.rid +45 -38
- data/rdoc/css/fonts.css +6 -6
- data/rdoc/css/rdoc.css +35 -6
- data/rdoc/index.html +43 -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 +368 -75
- data/rubyXL.gemspec +60 -26
- data/spec/lib/cell_spec.rb +147 -2
- data/spec/lib/color_spec.rb +1 -0
- data/spec/lib/parser_spec.rb +1 -1
- data/spec/lib/rgb_color_spec.rb +16 -0
- data/spec/lib/text_spec.rb +8 -0
- data/spec/lib/workbook_spec.rb +12 -1
- data/spec/lib/worksheet_spec.rb +353 -37
- data/test/test_parse_write.rb +15 -15
- metadata +63 -9
- 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.17</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,72 +60,28 @@
|
|
|
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
|
-
|
|
79
|
+
<li ><a href="#method-i-modify_border_color">#modify_border_color</a>
|
|
118
80
|
<li ><a href="#method-i-modify_fill">#modify_fill</a>
|
|
119
|
-
|
|
81
|
+
<li ><a href="#method-i-password_hash">#password_hash</a>
|
|
120
82
|
<li ><a href="#method-i-register_new_fill">#register_new_fill</a>
|
|
121
|
-
|
|
122
83
|
<li ><a href="#method-i-register_new_font">#register_new_font</a>
|
|
123
|
-
|
|
124
84
|
<li ><a href="#method-i-register_new_xf">#register_new_xf</a>
|
|
125
|
-
|
|
126
85
|
</ul>
|
|
127
86
|
</div>
|
|
128
87
|
|
|
@@ -130,923 +89,280 @@
|
|
|
130
89
|
</nav>
|
|
131
90
|
|
|
132
91
|
<main role="main" aria-labelledby="module-RubyXL::WorkbookConvenienceMethods">
|
|
133
|
-
<h1 id="module-RubyXL::WorkbookConvenienceMethods" class="module">
|
|
134
|
-
module RubyXL::WorkbookConvenienceMethods
|
|
135
|
-
</h1>
|
|
136
|
-
|
|
137
|
-
<section class="description">
|
|
138
|
-
|
|
139
|
-
</section>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
<section class="constants-list">
|
|
151
|
-
<header>
|
|
152
|
-
<h3>Constants</h3>
|
|
153
|
-
</header>
|
|
154
|
-
<dl>
|
|
155
|
-
|
|
156
|
-
<dt id="SHEET_NAME_TEMPLATE">SHEET_NAME_TEMPLATE
|
|
157
|
-
|
|
158
|
-
<dd>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
</dl>
|
|
162
|
-
</section>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
169
|
-
<header>
|
|
170
|
-
<h3>Public Instance Methods</h3>
|
|
171
|
-
</header>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<div id="method-i-5B-5D" class="method-detail ">
|
|
175
|
-
|
|
176
|
-
<div class="method-heading">
|
|
177
|
-
<span class="method-name">[]</span><span
|
|
178
|
-
class="method-args">(ind)</span>
|
|
179
|
-
|
|
180
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
181
|
-
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<div class="method-description">
|
|
186
|
-
|
|
187
|
-
<p>Finds worksheet by its name or numerical index</p>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
<div class="method-source-code" id="5B-5D-source">
|
|
193
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 7</span>
|
|
194
|
-
<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">ind</span>)
|
|
195
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">ind</span>
|
|
196
|
-
<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>]
|
|
197
|
-
<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> }
|
|
198
|
-
<span class="ruby-keyword">end</span>
|
|
199
|
-
<span class="ruby-keyword">end</span></pre>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
</div>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<div id="method-i-add_worksheet" class="method-detail ">
|
|
211
|
-
|
|
212
|
-
<div class="method-heading">
|
|
213
|
-
<span class="method-name">add_worksheet</span><span
|
|
214
|
-
class="method-args">(name = nil)</span>
|
|
215
|
-
|
|
216
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
217
|
-
|
|
218
|
-
</div>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<div class="method-description">
|
|
222
|
-
|
|
223
|
-
<p>Create new simple worksheet and add it to the workbook worksheets</p>
|
|
224
|
-
|
|
225
|
-
<p>@param [String] The name for the new worksheet</p>
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<div class="method-source-code" id="add_worksheet-source">
|
|
231
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 17</span>
|
|
232
|
-
<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>)
|
|
233
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
|
|
234
|
-
<span class="ruby-identifier">n</span> = <span class="ruby-value">0</span>
|
|
235
|
-
|
|
236
|
-
<span class="ruby-keyword">begin</span>
|
|
237
|
-
<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>)
|
|
238
|
-
<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>
|
|
239
|
-
<span class="ruby-keyword">end</span>
|
|
240
|
-
|
|
241
|
-
<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>)
|
|
242
|
-
<span class="ruby-identifier">worksheets</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_worksheet</span>
|
|
243
|
-
<span class="ruby-identifier">new_worksheet</span>
|
|
244
|
-
<span class="ruby-keyword">end</span></pre>
|
|
245
|
-
</div>
|
|
246
|
-
|
|
247
|
-
</div>
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
</div>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<div id="method-i-application" class="method-detail ">
|
|
256
|
-
|
|
257
|
-
<div class="method-heading">
|
|
258
|
-
<span class="method-name">application</span><span
|
|
259
|
-
class="method-args">()</span>
|
|
260
|
-
|
|
261
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
262
|
-
|
|
263
|
-
</div>
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<div class="method-description">
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<div class="method-source-code" id="application-source">
|
|
274
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 53</span>
|
|
275
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application</span>
|
|
276
|
-
<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>
|
|
277
|
-
<span class="ruby-keyword">end</span></pre>
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
</div>
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
<div id="method-i-application-3D" class="method-detail ">
|
|
289
|
-
|
|
290
|
-
<div class="method-heading">
|
|
291
|
-
<span class="method-name">application=</span><span
|
|
292
|
-
class="method-args">(v)</span>
|
|
293
|
-
|
|
294
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
295
|
-
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
<div class="method-description">
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
<div class="method-source-code" id="application-3D-source">
|
|
307
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 57</span>
|
|
308
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">application=</span>(<span class="ruby-identifier">v</span>)
|
|
309
|
-
<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>
|
|
310
|
-
<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>
|
|
311
|
-
<span class="ruby-keyword">end</span></pre>
|
|
312
|
-
</div>
|
|
313
|
-
|
|
314
|
-
</div>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
<div id="method-i-appversion" class="method-detail ">
|
|
323
|
-
|
|
324
|
-
<div class="method-heading">
|
|
325
|
-
<span class="method-name">appversion</span><span
|
|
326
|
-
class="method-args">()</span>
|
|
327
|
-
|
|
328
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
329
|
-
|
|
330
|
-
</div>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<div class="method-description">
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
<div class="method-source-code" id="appversion-source">
|
|
341
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 62</span>
|
|
342
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appversion</span>
|
|
343
|
-
<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>
|
|
344
|
-
<span class="ruby-keyword">end</span></pre>
|
|
345
|
-
</div>
|
|
346
|
-
|
|
347
|
-
</div>
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
</div>
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
<div id="method-i-appversion-3D" class="method-detail ">
|
|
356
|
-
|
|
357
|
-
<div class="method-heading">
|
|
358
|
-
<span class="method-name">appversion=</span><span
|
|
359
|
-
class="method-args">(v)</span>
|
|
360
|
-
|
|
361
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
362
|
-
|
|
363
|
-
</div>
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
<div class="method-description">
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
<div class="method-source-code" id="appversion-3D-source">
|
|
374
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 66</span>
|
|
375
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">appversion=</span>(<span class="ruby-identifier">v</span>)
|
|
376
|
-
<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>
|
|
377
|
-
<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>
|
|
378
|
-
<span class="ruby-keyword">end</span></pre>
|
|
379
|
-
</div>
|
|
380
|
-
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
</div>
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<div id="method-i-borders" class="method-detail ">
|
|
390
|
-
|
|
391
|
-
<div class="method-heading">
|
|
392
|
-
<span class="method-name">borders</span><span
|
|
393
|
-
class="method-args">()</span>
|
|
394
|
-
|
|
395
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
396
|
-
|
|
397
|
-
</div>
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
<div class="method-description">
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
<div class="method-source-code" id="borders-source">
|
|
408
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 115</span>
|
|
409
|
-
<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>
|
|
410
|
-
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">borders</span>
|
|
411
|
-
<span class="ruby-keyword">end</span></pre>
|
|
412
|
-
</div>
|
|
413
|
-
|
|
414
|
-
</div>
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
</div>
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
<div id="method-i-cell_xfs" class="method-detail ">
|
|
423
|
-
|
|
424
|
-
<div class="method-heading">
|
|
425
|
-
<span class="method-name">cell_xfs</span><span
|
|
426
|
-
class="method-args">()</span>
|
|
427
|
-
|
|
428
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
429
|
-
|
|
430
|
-
</div>
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
<div class="method-description">
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
<div class="method-source-code" id="cell_xfs-source">
|
|
441
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 103</span>
|
|
442
|
-
<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>
|
|
443
|
-
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">cell_xfs</span>
|
|
444
|
-
<span class="ruby-keyword">end</span></pre>
|
|
445
|
-
</div>
|
|
446
|
-
|
|
447
|
-
</div>
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
</div>
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
<div id="method-i-company" class="method-detail ">
|
|
456
|
-
|
|
457
|
-
<div class="method-heading">
|
|
458
|
-
<span class="method-name">company</span><span
|
|
459
|
-
class="method-args">()</span>
|
|
460
|
-
|
|
461
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
462
|
-
|
|
463
|
-
</div>
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
<div class="method-description">
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
<div class="method-source-code" id="company-source">
|
|
474
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 44</span>
|
|
475
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">company</span>
|
|
476
|
-
<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>
|
|
477
|
-
<span class="ruby-keyword">end</span></pre>
|
|
478
|
-
</div>
|
|
479
|
-
|
|
480
|
-
</div>
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
</div>
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
<div id="method-i-company-3D" class="method-detail ">
|
|
489
|
-
|
|
490
|
-
<div class="method-heading">
|
|
491
|
-
<span class="method-name">company=</span><span
|
|
492
|
-
class="method-args">(v)</span>
|
|
493
|
-
|
|
494
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
495
|
-
|
|
496
|
-
</div>
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
<div class="method-description">
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
<div class="method-source-code" id="company-3D-source">
|
|
507
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 48</span>
|
|
508
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">company=</span>(<span class="ruby-identifier">v</span>)
|
|
509
|
-
<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>
|
|
510
|
-
<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>
|
|
511
|
-
<span class="ruby-keyword">end</span></pre>
|
|
512
|
-
</div>
|
|
513
|
-
|
|
514
|
-
</div>
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
</div>
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
<div id="method-i-created_at" class="method-detail ">
|
|
523
|
-
|
|
524
|
-
<div class="method-heading">
|
|
525
|
-
<span class="method-name">created_at</span><span
|
|
526
|
-
class="method-args">()</span>
|
|
527
|
-
|
|
528
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
529
|
-
|
|
530
|
-
</div>
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<div class="method-description">
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
<div class="method-source-code" id="created_at-source">
|
|
541
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 87</span>
|
|
542
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created_at</span>
|
|
543
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span>
|
|
544
|
-
<span class="ruby-keyword">end</span></pre>
|
|
545
|
-
</div>
|
|
546
|
-
|
|
547
|
-
</div>
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
</div>
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
<div id="method-i-created_at-3D" class="method-detail ">
|
|
556
|
-
|
|
557
|
-
<div class="method-heading">
|
|
558
|
-
<span class="method-name">created_at=</span><span
|
|
559
|
-
class="method-args">(v)</span>
|
|
560
|
-
|
|
561
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
562
|
-
|
|
563
|
-
</div>
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
<div class="method-description">
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
<div class="method-source-code" id="created_at-3D-source">
|
|
574
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 91</span>
|
|
575
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">created_at=</span>(<span class="ruby-identifier">v</span>)
|
|
576
|
-
<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>
|
|
577
|
-
<span class="ruby-keyword">end</span></pre>
|
|
578
|
-
</div>
|
|
579
|
-
|
|
580
|
-
</div>
|
|
92
|
+
<h1 id="module-RubyXL::WorkbookConvenienceMethods" class="module">
|
|
93
|
+
module RubyXL::WorkbookConvenienceMethods
|
|
94
|
+
</h1>
|
|
581
95
|
|
|
582
|
-
|
|
96
|
+
<section class="description">
|
|
97
|
+
|
|
98
|
+
</section>
|
|
583
99
|
|
|
584
|
-
|
|
585
|
-
</div>
|
|
100
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
586
101
|
|
|
587
|
-
|
|
588
|
-
<div id="method-i-creator" class="method-detail ">
|
|
589
|
-
|
|
590
|
-
<div class="method-heading">
|
|
591
|
-
<span class="method-name">creator</span><span
|
|
592
|
-
class="method-args">()</span>
|
|
593
|
-
|
|
594
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
595
|
-
|
|
596
|
-
</div>
|
|
597
|
-
|
|
598
102
|
|
|
599
|
-
<div class="method-description">
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
103
|
|
|
605
|
-
|
|
606
|
-
<div class="method-source-code" id="creator-source">
|
|
607
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 71</span>
|
|
608
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">creator</span>
|
|
609
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span>
|
|
610
|
-
<span class="ruby-keyword">end</span></pre>
|
|
611
|
-
</div>
|
|
612
|
-
|
|
613
|
-
</div>
|
|
614
104
|
|
|
615
|
-
|
|
616
105
|
|
|
617
|
-
|
|
618
|
-
|
|
106
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
107
|
+
<header>
|
|
108
|
+
<h3>Public Instance Methods</h3>
|
|
109
|
+
</header>
|
|
619
110
|
|
|
620
|
-
|
|
621
|
-
<div id="method-i-creator-3D" class="method-detail ">
|
|
622
|
-
|
|
111
|
+
<div id="method-i-borders" class="method-detail ">
|
|
623
112
|
<div class="method-heading">
|
|
624
|
-
<span class="method-name">
|
|
625
|
-
class="method-args">(
|
|
626
|
-
|
|
113
|
+
<span class="method-name">borders</span><span
|
|
114
|
+
class="method-args">()</span>
|
|
627
115
|
<span class="method-click-advice">click to toggle source</span>
|
|
628
|
-
|
|
629
116
|
</div>
|
|
630
|
-
|
|
631
117
|
|
|
632
118
|
<div class="method-description">
|
|
633
119
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
120
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
<span class="ruby-
|
|
642
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span> = <span class="ruby-identifier">v</span>
|
|
121
|
+
<div class="method-source-code" id="borders-source">
|
|
122
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 21</span>
|
|
123
|
+
<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>
|
|
124
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">borders</span>
|
|
643
125
|
<span class="ruby-keyword">end</span></pre>
|
|
644
126
|
</div>
|
|
645
|
-
|
|
646
127
|
</div>
|
|
647
128
|
|
|
648
|
-
|
|
649
129
|
|
|
650
|
-
|
|
651
130
|
</div>
|
|
652
131
|
|
|
653
|
-
|
|
654
|
-
<div id="method-i-date1904" class="method-detail ">
|
|
655
|
-
|
|
132
|
+
<div id="method-i-cell_xfs" class="method-detail ">
|
|
656
133
|
<div class="method-heading">
|
|
657
|
-
<span class="method-name">
|
|
134
|
+
<span class="method-name">cell_xfs</span><span
|
|
658
135
|
class="method-args">()</span>
|
|
659
|
-
|
|
660
136
|
<span class="method-click-advice">click to toggle source</span>
|
|
661
|
-
|
|
662
137
|
</div>
|
|
663
|
-
|
|
664
138
|
|
|
665
139
|
<div class="method-description">
|
|
666
140
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
141
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
<span class="ruby-
|
|
675
|
-
<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>
|
|
142
|
+
<div class="method-source-code" id="cell_xfs-source">
|
|
143
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 9</span>
|
|
144
|
+
<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>
|
|
145
|
+
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">cell_xfs</span>
|
|
676
146
|
<span class="ruby-keyword">end</span></pre>
|
|
677
147
|
</div>
|
|
678
|
-
|
|
679
148
|
</div>
|
|
680
149
|
|
|
681
|
-
|
|
682
150
|
|
|
683
|
-
|
|
684
151
|
</div>
|
|
685
152
|
|
|
686
|
-
|
|
687
|
-
<div id="method-i-date1904-3D" class="method-detail ">
|
|
688
|
-
|
|
153
|
+
<div id="method-i-define_new_name" class="method-detail ">
|
|
689
154
|
<div class="method-heading">
|
|
690
|
-
<span class="method-name">
|
|
691
|
-
class="method-args">(
|
|
692
|
-
|
|
155
|
+
<span class="method-name">define_new_name</span><span
|
|
156
|
+
class="method-args">(name, reference)</span>
|
|
693
157
|
<span class="method-click-advice">click to toggle source</span>
|
|
694
|
-
|
|
695
158
|
</div>
|
|
696
|
-
|
|
697
159
|
|
|
698
160
|
<div class="method-description">
|
|
699
161
|
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
162
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
<span class="ruby-keyword">
|
|
708
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">
|
|
709
|
-
<span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span> = <span class="ruby-identifier">v</span>
|
|
163
|
+
<div class="method-source-code" id="define_new_name-source">
|
|
164
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 124</span>
|
|
165
|
+
<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>)
|
|
166
|
+
<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>
|
|
167
|
+
<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>})
|
|
710
168
|
<span class="ruby-keyword">end</span></pre>
|
|
711
169
|
</div>
|
|
712
|
-
|
|
713
170
|
</div>
|
|
714
171
|
|
|
715
|
-
|
|
716
172
|
|
|
717
|
-
|
|
718
173
|
</div>
|
|
719
174
|
|
|
720
|
-
|
|
721
175
|
<div id="method-i-each" class="method-detail ">
|
|
722
|
-
|
|
723
176
|
<div class="method-heading">
|
|
724
177
|
<span class="method-name">each</span><span
|
|
725
178
|
class="method-args">() { |i| ... }</span>
|
|
726
|
-
|
|
727
179
|
<span class="method-click-advice">click to toggle source</span>
|
|
728
|
-
|
|
729
180
|
</div>
|
|
730
|
-
|
|
731
181
|
|
|
732
182
|
<div class="method-description">
|
|
733
183
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
184
|
|
|
738
|
-
|
|
739
185
|
<div class="method-source-code" id="each-source">
|
|
740
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
741
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>
|
|
186
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 5</span>
|
|
187
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">each</span>
|
|
742
188
|
<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> }
|
|
743
189
|
<span class="ruby-keyword">end</span></pre>
|
|
744
190
|
</div>
|
|
745
|
-
|
|
746
191
|
</div>
|
|
747
192
|
|
|
748
|
-
|
|
749
193
|
|
|
750
|
-
|
|
751
194
|
</div>
|
|
752
195
|
|
|
753
|
-
|
|
754
196
|
<div id="method-i-fills" class="method-detail ">
|
|
755
|
-
|
|
756
197
|
<div class="method-heading">
|
|
757
198
|
<span class="method-name">fills</span><span
|
|
758
199
|
class="method-args">()</span>
|
|
759
|
-
|
|
760
200
|
<span class="method-click-advice">click to toggle source</span>
|
|
761
|
-
|
|
762
201
|
</div>
|
|
763
|
-
|
|
764
202
|
|
|
765
203
|
<div class="method-description">
|
|
766
204
|
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
205
|
|
|
771
|
-
|
|
772
206
|
<div class="method-source-code" id="fills-source">
|
|
773
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
774
|
-
<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>
|
|
207
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 17</span>
|
|
208
|
+
<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>
|
|
775
209
|
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">fills</span>
|
|
776
210
|
<span class="ruby-keyword">end</span></pre>
|
|
777
211
|
</div>
|
|
778
|
-
|
|
779
212
|
</div>
|
|
780
213
|
|
|
781
|
-
|
|
782
214
|
|
|
783
|
-
|
|
784
215
|
</div>
|
|
785
216
|
|
|
786
|
-
|
|
787
217
|
<div id="method-i-fonts" class="method-detail ">
|
|
788
|
-
|
|
789
218
|
<div class="method-heading">
|
|
790
219
|
<span class="method-name">fonts</span><span
|
|
791
220
|
class="method-args">()</span>
|
|
792
|
-
|
|
793
221
|
<span class="method-click-advice">click to toggle source</span>
|
|
794
|
-
|
|
795
222
|
</div>
|
|
796
|
-
|
|
797
223
|
|
|
798
224
|
<div class="method-description">
|
|
799
225
|
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
226
|
|
|
804
|
-
|
|
805
227
|
<div class="method-source-code" id="fonts-source">
|
|
806
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
807
|
-
<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>
|
|
228
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 13</span>
|
|
229
|
+
<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>
|
|
808
230
|
<span class="ruby-identifier">stylesheet</span>.<span class="ruby-identifier">fonts</span>
|
|
809
231
|
<span class="ruby-keyword">end</span></pre>
|
|
810
232
|
</div>
|
|
811
|
-
|
|
812
233
|
</div>
|
|
813
234
|
|
|
814
|
-
|
|
815
235
|
|
|
816
|
-
|
|
817
236
|
</div>
|
|
818
237
|
|
|
819
|
-
|
|
820
|
-
<div id="method-i-get_fill_color" class="method-detail ">
|
|
821
|
-
|
|
238
|
+
<div id="method-i-get_defined_name" class="method-detail ">
|
|
822
239
|
<div class="method-heading">
|
|
823
|
-
<span class="method-name">
|
|
824
|
-
class="method-args">(
|
|
825
|
-
|
|
240
|
+
<span class="method-name">get_defined_name</span><span
|
|
241
|
+
class="method-args">(name)</span>
|
|
826
242
|
<span class="method-click-advice">click to toggle source</span>
|
|
827
|
-
|
|
828
243
|
</div>
|
|
829
|
-
|
|
830
244
|
|
|
831
245
|
<div class="method-description">
|
|
832
246
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
247
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
<span class="ruby-keyword">
|
|
841
|
-
<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>]
|
|
842
|
-
<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>
|
|
843
|
-
<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>
|
|
844
|
-
<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>
|
|
248
|
+
<div class="method-source-code" id="get_defined_name-source">
|
|
249
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 129</span>
|
|
250
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_defined_name</span>(<span class="ruby-identifier">name</span>)
|
|
251
|
+
<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> }
|
|
845
252
|
<span class="ruby-keyword">end</span></pre>
|
|
846
253
|
</div>
|
|
847
|
-
|
|
848
254
|
</div>
|
|
849
255
|
|
|
850
|
-
|
|
851
256
|
|
|
852
|
-
|
|
853
257
|
</div>
|
|
854
258
|
|
|
855
|
-
|
|
856
|
-
<div id="method-i-modified_at" class="method-detail ">
|
|
857
|
-
|
|
259
|
+
<div id="method-i-get_fill_color" class="method-detail ">
|
|
858
260
|
<div class="method-heading">
|
|
859
|
-
<span class="method-name">
|
|
860
|
-
class="method-args">()</span>
|
|
861
|
-
|
|
261
|
+
<span class="method-name">get_fill_color</span><span
|
|
262
|
+
class="method-args">(xf)</span>
|
|
862
263
|
<span class="method-click-advice">click to toggle source</span>
|
|
863
|
-
|
|
864
264
|
</div>
|
|
865
|
-
|
|
866
265
|
|
|
867
266
|
<div class="method-description">
|
|
868
267
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
268
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
<span class="ruby-
|
|
877
|
-
<span class="ruby-identifier">
|
|
269
|
+
<div class="method-source-code" id="get_fill_color-source">
|
|
270
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 25</span>
|
|
271
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_fill_color</span>(<span class="ruby-identifier">xf</span>)
|
|
272
|
+
<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>]
|
|
273
|
+
<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>
|
|
274
|
+
<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>
|
|
275
|
+
<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>)
|
|
276
|
+
<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>
|
|
878
277
|
<span class="ruby-keyword">end</span></pre>
|
|
879
278
|
</div>
|
|
880
|
-
|
|
881
279
|
</div>
|
|
882
280
|
|
|
883
|
-
|
|
884
281
|
|
|
885
|
-
|
|
886
282
|
</div>
|
|
887
283
|
|
|
888
|
-
|
|
889
|
-
<div id="method-i-modified_at-3D" class="method-detail ">
|
|
890
|
-
|
|
284
|
+
<div id="method-i-modify_alignment" class="method-detail ">
|
|
891
285
|
<div class="method-heading">
|
|
892
|
-
<span class="method-name">
|
|
893
|
-
class="method-args">(
|
|
894
|
-
|
|
286
|
+
<span class="method-name">modify_alignment</span><span
|
|
287
|
+
class="method-args">(style_index) { |alignment| ... }</span>
|
|
895
288
|
<span class="method-click-advice">click to toggle source</span>
|
|
896
|
-
|
|
897
289
|
</div>
|
|
898
|
-
|
|
899
290
|
|
|
900
291
|
<div class="method-description">
|
|
901
292
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
<div class="method-source-code" id="modified_at-3D-source">
|
|
908
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 99</span>
|
|
909
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modified_at=</span>(<span class="ruby-identifier">v</span>)
|
|
910
|
-
<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>
|
|
911
|
-
<span class="ruby-keyword">end</span></pre>
|
|
912
|
-
</div>
|
|
913
|
-
|
|
914
|
-
</div>
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
</div>
|
|
920
293
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
294
|
+
<div class="method-source-code" id="modify_alignment-source">
|
|
295
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 58</span>
|
|
296
|
+
<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>)
|
|
297
|
+
<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>]
|
|
298
|
+
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
|
299
|
+
<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>
|
|
300
|
+
<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>
|
|
301
|
+
<span class="ruby-keyword">else</span>
|
|
302
|
+
<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>
|
|
303
|
+
<span class="ruby-keyword">end</span>
|
|
932
304
|
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
305
|
+
<span class="ruby-keyword">yield</span>(<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">alignment</span>)
|
|
306
|
+
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">apply_alignment</span> = <span class="ruby-keyword">true</span>
|
|
938
307
|
|
|
939
|
-
|
|
940
|
-
<div class="method-source-code" id="modifier-source">
|
|
941
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 79</span>
|
|
942
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modifier</span>
|
|
943
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span>
|
|
308
|
+
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
|
944
309
|
<span class="ruby-keyword">end</span></pre>
|
|
945
310
|
</div>
|
|
946
|
-
|
|
947
311
|
</div>
|
|
948
312
|
|
|
949
|
-
|
|
950
313
|
|
|
951
|
-
|
|
952
314
|
</div>
|
|
953
315
|
|
|
954
|
-
|
|
955
|
-
<div id="method-i-modifier-3D" class="method-detail ">
|
|
956
|
-
|
|
316
|
+
<div id="method-i-modify_border" class="method-detail ">
|
|
957
317
|
<div class="method-heading">
|
|
958
|
-
<span class="method-name">
|
|
959
|
-
class="method-args">(
|
|
960
|
-
|
|
318
|
+
<span class="method-name">modify_border</span><span
|
|
319
|
+
class="method-args">(style_index, direction, weight)</span>
|
|
961
320
|
<span class="method-click-advice">click to toggle source</span>
|
|
962
|
-
|
|
963
321
|
</div>
|
|
964
|
-
|
|
965
322
|
|
|
966
323
|
<div class="method-description">
|
|
967
324
|
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
<div class="method-source-code" id="modifier-3D-source">
|
|
974
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line 83</span>
|
|
975
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">modifier=</span>(<span class="ruby-identifier">v</span>)
|
|
976
|
-
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span> = <span class="ruby-identifier">v</span>
|
|
977
|
-
<span class="ruby-keyword">end</span></pre>
|
|
978
|
-
</div>
|
|
979
|
-
|
|
980
|
-
</div>
|
|
981
325
|
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
326
|
+
<div class="method-source-code" id="modify_border-source">
|
|
327
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 81</span>
|
|
328
|
+
<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>)
|
|
329
|
+
<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>
|
|
330
|
+
<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>
|
|
986
331
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
<div class="method-heading">
|
|
991
|
-
<span class="method-name">modify_alignment</span><span
|
|
992
|
-
class="method-args">(style_index) { |alignment| ... }</span>
|
|
993
|
-
|
|
994
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
995
|
-
|
|
996
|
-
</div>
|
|
997
|
-
|
|
332
|
+
<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>)
|
|
333
|
+
<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>
|
|
998
334
|
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
335
|
+
<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>)
|
|
1004
336
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
<span class="ruby-
|
|
1009
|
-
<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>
|
|
1010
|
-
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Alignment</span>.<span class="ruby-identifier">new</span>
|
|
1011
|
-
<span class="ruby-keyword">yield</span>(<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span>)
|
|
1012
|
-
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">apply_alignment</span> = <span class="ruby-keyword">true</span>
|
|
337
|
+
<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>
|
|
338
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this border has never existed before, add it to collection.</span>
|
|
339
|
+
<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>] = <span class="ruby-identifier">new_border</span>
|
|
340
|
+
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">apply_border</span> = <span class="ruby-keyword">true</span>
|
|
1013
341
|
|
|
1014
342
|
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
|
1015
343
|
<span class="ruby-keyword">end</span></pre>
|
|
1016
344
|
</div>
|
|
1017
|
-
|
|
1018
345
|
</div>
|
|
1019
346
|
|
|
1020
|
-
|
|
1021
347
|
|
|
1022
|
-
|
|
1023
348
|
</div>
|
|
1024
349
|
|
|
1025
|
-
|
|
1026
|
-
<div id="method-i-modify_border" class="method-detail ">
|
|
1027
|
-
|
|
350
|
+
<div id="method-i-modify_border_color" class="method-detail ">
|
|
1028
351
|
<div class="method-heading">
|
|
1029
|
-
<span class="method-name">
|
|
1030
|
-
class="method-args">(style_index, direction,
|
|
1031
|
-
|
|
352
|
+
<span class="method-name">modify_border_color</span><span
|
|
353
|
+
class="method-args">(style_index, direction, color)</span>
|
|
1032
354
|
<span class="method-click-advice">click to toggle source</span>
|
|
1033
|
-
|
|
1034
355
|
</div>
|
|
1035
|
-
|
|
1036
356
|
|
|
1037
357
|
<div class="method-description">
|
|
1038
358
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
359
|
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
<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>)
|
|
360
|
+
<div class="method-source-code" id="modify_border_color-source">
|
|
361
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 98</span>
|
|
362
|
+
<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>)
|
|
1047
363
|
<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>
|
|
1048
364
|
<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>
|
|
1049
|
-
<span class="ruby-identifier">new_border</span>.<span class="ruby-identifier">
|
|
365
|
+
<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>)
|
|
1050
366
|
|
|
1051
367
|
<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>
|
|
1052
368
|
<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">borders</span>.<span class="ruby-identifier">size</span> <span class="ruby-comment"># If this border has never existed before, add it to collection.</span>
|
|
@@ -1056,73 +372,77 @@
|
|
|
1056
372
|
<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
|
|
1057
373
|
<span class="ruby-keyword">end</span></pre>
|
|
1058
374
|
</div>
|
|
1059
|
-
|
|
1060
375
|
</div>
|
|
1061
376
|
|
|
1062
|
-
|
|
1063
377
|
|
|
1064
|
-
|
|
1065
378
|
</div>
|
|
1066
379
|
|
|
1067
|
-
|
|
1068
380
|
<div id="method-i-modify_fill" class="method-detail ">
|
|
1069
|
-
|
|
1070
381
|
<div class="method-heading">
|
|
1071
382
|
<span class="method-name">modify_fill</span><span
|
|
1072
383
|
class="method-args">(style_index, rgb)</span>
|
|
1073
|
-
|
|
1074
384
|
<span class="method-click-advice">click to toggle source</span>
|
|
1075
|
-
|
|
1076
385
|
</div>
|
|
1077
|
-
|
|
1078
386
|
|
|
1079
387
|
<div class="method-description">
|
|
1080
388
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
389
|
|
|
1085
|
-
|
|
1086
390
|
<div class="method-source-code" id="modify_fill-source">
|
|
1087
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1088
|
-
<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>)
|
|
391
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 73</span>
|
|
392
|
+
<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>)
|
|
1089
393
|
<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>
|
|
1090
|
-
<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>
|
|
1091
|
-
<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>
|
|
1092
|
-
<span class="ruby-value">:fg_color</span>
|
|
394
|
+
<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>
|
|
395
|
+
<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>,
|
|
396
|
+
<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>)))
|
|
1093
397
|
<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>))
|
|
1094
398
|
<span class="ruby-keyword">end</span></pre>
|
|
1095
399
|
</div>
|
|
1096
|
-
|
|
1097
400
|
</div>
|
|
1098
401
|
|
|
1099
|
-
|
|
1100
402
|
|
|
1101
|
-
|
|
1102
403
|
</div>
|
|
1103
404
|
|
|
1104
|
-
|
|
405
|
+
<div id="method-i-password_hash" class="method-detail ">
|
|
406
|
+
<div class="method-heading">
|
|
407
|
+
<span class="method-name">password_hash</span><span
|
|
408
|
+
class="method-args">(pwd)</span>
|
|
409
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
410
|
+
</div>
|
|
411
|
+
|
|
412
|
+
<div class="method-description">
|
|
413
|
+
<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>
|
|
414
|
+
|
|
415
|
+
<div class="method-source-code" id="password_hash-source">
|
|
416
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 113</span>
|
|
417
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">password_hash</span>(<span class="ruby-identifier">pwd</span>)
|
|
418
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-value">0</span>
|
|
419
|
+
<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>
|
|
420
|
+
<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>
|
|
421
|
+
<span class="ruby-identifier">hsh</span> = <span class="ruby-identifier">hsh</span> <span class="ruby-operator"><<</span> <span class="ruby-value">1</span>
|
|
422
|
+
<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>
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
(<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>)
|
|
426
|
+
<span class="ruby-keyword">end</span></pre>
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
</div>
|
|
432
|
+
|
|
1105
433
|
<div id="method-i-register_new_fill" class="method-detail ">
|
|
1106
|
-
|
|
1107
434
|
<div class="method-heading">
|
|
1108
435
|
<span class="method-name">register_new_fill</span><span
|
|
1109
436
|
class="method-args">(new_fill, old_xf)</span>
|
|
1110
|
-
|
|
1111
437
|
<span class="method-click-advice">click to toggle source</span>
|
|
1112
|
-
|
|
1113
438
|
</div>
|
|
1114
|
-
|
|
1115
439
|
|
|
1116
440
|
<div class="method-description">
|
|
1117
441
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
442
|
|
|
1122
|
-
|
|
1123
443
|
<div class="method-source-code" id="register_new_fill-source">
|
|
1124
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1125
|
-
<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>)
|
|
444
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 33</span>
|
|
445
|
+
<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>)
|
|
1126
446
|
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
|
1127
447
|
<span class="ruby-identifier">new_xf</span>.<span class="ruby-identifier">apply_fill</span> = <span class="ruby-keyword">true</span>
|
|
1128
448
|
<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>
|
|
@@ -1131,36 +451,24 @@
|
|
|
1131
451
|
<span class="ruby-identifier">new_xf</span>
|
|
1132
452
|
<span class="ruby-keyword">end</span></pre>
|
|
1133
453
|
</div>
|
|
1134
|
-
|
|
1135
454
|
</div>
|
|
1136
455
|
|
|
1137
|
-
|
|
1138
456
|
|
|
1139
|
-
|
|
1140
457
|
</div>
|
|
1141
458
|
|
|
1142
|
-
|
|
1143
459
|
<div id="method-i-register_new_font" class="method-detail ">
|
|
1144
|
-
|
|
1145
460
|
<div class="method-heading">
|
|
1146
461
|
<span class="method-name">register_new_font</span><span
|
|
1147
462
|
class="method-args">(new_font, old_xf)</span>
|
|
1148
|
-
|
|
1149
463
|
<span class="method-click-advice">click to toggle source</span>
|
|
1150
|
-
|
|
1151
464
|
</div>
|
|
1152
|
-
|
|
1153
465
|
|
|
1154
466
|
<div class="method-description">
|
|
1155
467
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
468
|
|
|
1160
|
-
|
|
1161
469
|
<div class="method-source-code" id="register_new_font-source">
|
|
1162
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1163
|
-
<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>)
|
|
470
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 42</span>
|
|
471
|
+
<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>)
|
|
1164
472
|
<span class="ruby-identifier">new_xf</span> = <span class="ruby-identifier">old_xf</span>.<span class="ruby-identifier">dup</span>
|
|
1165
473
|
<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>
|
|
1166
474
|
<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>
|
|
@@ -1169,60 +477,44 @@
|
|
|
1169
477
|
<span class="ruby-identifier">new_xf</span>
|
|
1170
478
|
<span class="ruby-keyword">end</span></pre>
|
|
1171
479
|
</div>
|
|
1172
|
-
|
|
1173
480
|
</div>
|
|
1174
481
|
|
|
1175
|
-
|
|
1176
482
|
|
|
1177
|
-
|
|
1178
483
|
</div>
|
|
1179
484
|
|
|
1180
|
-
|
|
1181
485
|
<div id="method-i-register_new_xf" class="method-detail ">
|
|
1182
|
-
|
|
1183
486
|
<div class="method-heading">
|
|
1184
487
|
<span class="method-name">register_new_xf</span><span
|
|
1185
488
|
class="method-args">(new_xf)</span>
|
|
1186
|
-
|
|
1187
489
|
<span class="method-click-advice">click to toggle source</span>
|
|
1188
|
-
|
|
1189
490
|
</div>
|
|
1190
|
-
|
|
1191
491
|
|
|
1192
492
|
<div class="method-description">
|
|
1193
493
|
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
494
|
|
|
1198
|
-
|
|
1199
495
|
<div class="method-source-code" id="register_new_xf-source">
|
|
1200
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods.rb, line
|
|
1201
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
|
496
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/workbook.rb, line 51</span>
|
|
497
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">register_new_xf</span>(<span class="ruby-identifier">new_xf</span>)
|
|
1202
498
|
<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>
|
|
1203
499
|
<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>
|
|
1204
500
|
<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">new_xf_id</span>] = <span class="ruby-identifier">new_xf</span>
|
|
1205
501
|
<span class="ruby-identifier">new_xf_id</span>
|
|
1206
502
|
<span class="ruby-keyword">end</span></pre>
|
|
1207
503
|
</div>
|
|
1208
|
-
|
|
1209
504
|
</div>
|
|
1210
505
|
|
|
1211
|
-
|
|
1212
506
|
|
|
1213
|
-
|
|
1214
507
|
</div>
|
|
1215
508
|
|
|
1216
|
-
|
|
1217
509
|
</section>
|
|
1218
|
-
|
|
510
|
+
|
|
1219
511
|
</section>
|
|
1220
512
|
</main>
|
|
1221
513
|
|
|
1222
514
|
|
|
1223
515
|
<footer id="validator-badges" role="contentinfo">
|
|
1224
|
-
<p><a href="
|
|
1225
|
-
<p>Generated by <a href="
|
|
516
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
|
517
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
|
1226
518
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
1227
519
|
</footer>
|
|
1228
520
|
|