rubyXL 3.3.33 → 3.4.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +60 -0
- data/Gemfile +9 -8
- data/Gemfile.lock +124 -0
- data/LICENSE.txt +1 -1
- data/README.rdoc +46 -22
- data/Rakefile +29 -29
- data/VERSION +1 -1
- data/lib/rubyXL/cell.rb +2 -29
- 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 -1301
- data/lib/rubyXL/objects/border.rb +0 -3
- data/lib/rubyXL/objects/calculation_chain.rb +2 -2
- data/lib/rubyXL/objects/cell_style.rb +1 -3
- data/lib/rubyXL/objects/chartsheet.rb +8 -12
- data/lib/rubyXL/objects/color.rb +3 -7
- data/lib/rubyXL/objects/column_range.rb +0 -3
- data/lib/rubyXL/objects/comments.rb +1 -4
- data/lib/rubyXL/objects/connection.rb +175 -0
- data/lib/rubyXL/objects/container_nodes.rb +1 -5
- data/lib/rubyXL/objects/content_types.rb +3 -6
- data/lib/rubyXL/objects/data_validation.rb +2 -2
- data/lib/rubyXL/objects/document_properties.rb +11 -15
- data/lib/rubyXL/objects/extensions.rb +0 -2
- data/lib/rubyXL/objects/external_links.rb +30 -8
- data/lib/rubyXL/objects/fill.rb +2 -5
- data/lib/rubyXL/objects/filters.rb +5 -7
- data/lib/rubyXL/objects/font.rb +2 -7
- data/lib/rubyXL/objects/formula.rb +3 -5
- data/lib/rubyXL/objects/ooxml_object.rb +26 -19
- 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 +3 -6
- data/lib/rubyXL/objects/sheet_common.rb +1 -3
- data/lib/rubyXL/objects/sheet_data.rb +38 -11
- data/lib/rubyXL/objects/simple_types.rb +16 -1
- data/lib/rubyXL/objects/storage.rb +51 -50
- data/lib/rubyXL/objects/stylesheet.rb +8 -15
- data/lib/rubyXL/objects/text.rb +5 -7
- data/lib/rubyXL/objects/theme.rb +5 -8
- data/lib/rubyXL/objects/workbook.rb +140 -33
- data/lib/rubyXL/objects/worksheet.rb +44 -31
- data/lib/rubyXL/parser.rb +1 -3
- data/lib/rubyXL/worksheet.rb +83 -91
- data/lib/rubyXL.rb +1 -1
- data/rdoc/README_rdoc.html +111 -126
- data/rdoc/RubyXL/AExtension.html +20 -60
- data/rdoc/RubyXL/AExtensionStorageArea.html +11 -17
- data/rdoc/RubyXL/ActiveX.html +19 -47
- data/rdoc/RubyXL/ActiveXBinary.html +11 -22
- data/rdoc/RubyXL/AdjustHandleList.html +12 -19
- data/rdoc/RubyXL/Alignment.html +12 -19
- data/rdoc/RubyXL/AlternateContent.html +11 -17
- data/rdoc/RubyXL/Authors.html +12 -19
- data/rdoc/RubyXL/AutoFilter.html +12 -19
- data/rdoc/RubyXL/AutoFilterColumn.html +12 -19
- data/rdoc/RubyXL/BinaryImageFile.html +11 -25
- data/rdoc/RubyXL/BodyProperties.html +12 -19
- data/rdoc/RubyXL/BooleanNode.html +11 -17
- data/rdoc/RubyXL/BooleanValue.html +11 -17
- data/rdoc/RubyXL/Border.html +24 -84
- data/rdoc/RubyXL/BorderEdge.html +19 -52
- data/rdoc/RubyXL/Borders.html +18 -39
- data/rdoc/RubyXL/Break.html +12 -19
- data/rdoc/RubyXL/BreakList.html +12 -19
- data/rdoc/RubyXL/CT_AdjPoint2D.html +12 -19
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +12 -19
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +12 -19
- data/rdoc/RubyXL/CT_Backdrop.html +12 -19
- data/rdoc/RubyXL/CT_Bevel.html +12 -19
- data/rdoc/RubyXL/CT_BiLevelEffect.html +12 -19
- data/rdoc/RubyXL/CT_BlendEffect.html +12 -19
- data/rdoc/RubyXL/CT_Blip.html +12 -19
- data/rdoc/RubyXL/CT_BlipFillProperties.html +12 -19
- data/rdoc/RubyXL/CT_BlurEffect.html +12 -19
- data/rdoc/RubyXL/CT_Camera.html +12 -19
- data/rdoc/RubyXL/CT_Color.html +12 -19
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +12 -19
- data/rdoc/RubyXL/CT_ColorMapping.html +12 -19
- data/rdoc/RubyXL/CT_ColorScheme.html +12 -19
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +12 -19
- data/rdoc/RubyXL/CT_ConnectionSite.html +12 -19
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +12 -19
- data/rdoc/RubyXL/CT_DashStop.html +12 -19
- data/rdoc/RubyXL/CT_DashStopList.html +12 -19
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +12 -19
- data/rdoc/RubyXL/CT_DuotoneEffect.html +12 -19
- data/rdoc/RubyXL/CT_EffectContainer.html +12 -19
- data/rdoc/RubyXL/CT_EffectList.html +12 -19
- data/rdoc/RubyXL/CT_EffectReference.html +12 -19
- data/rdoc/RubyXL/CT_EffectStyleItem.html +12 -19
- data/rdoc/RubyXL/CT_EffectStyleList.html +12 -19
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +12 -19
- data/rdoc/RubyXL/CT_FillEffect.html +12 -19
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +12 -19
- data/rdoc/RubyXL/CT_FillStyleList.html +12 -19
- data/rdoc/RubyXL/CT_FlatText.html +12 -19
- data/rdoc/RubyXL/CT_FontCollection.html +12 -19
- data/rdoc/RubyXL/CT_FontReference.html +12 -19
- data/rdoc/RubyXL/CT_GeomGuideList.html +12 -19
- data/rdoc/RubyXL/CT_GlowEffect.html +12 -19
- data/rdoc/RubyXL/CT_GradientFillProperties.html +12 -19
- data/rdoc/RubyXL/CT_GradientStop.html +12 -19
- data/rdoc/RubyXL/CT_GradientStopList.html +12 -19
- data/rdoc/RubyXL/CT_HSLEffect.html +12 -19
- data/rdoc/RubyXL/CT_HslColor.html +12 -19
- data/rdoc/RubyXL/CT_Hyperlink.html +12 -19
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +12 -19
- data/rdoc/RubyXL/CT_LightRig.html +12 -19
- data/rdoc/RubyXL/CT_LineEndProperties.html +12 -19
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +12 -19
- data/rdoc/RubyXL/CT_LineProperties.html +12 -19
- data/rdoc/RubyXL/CT_LineStyleList.html +12 -19
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +12 -19
- data/rdoc/RubyXL/CT_LuminanceEffect.html +12 -19
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +12 -19
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +12 -19
- data/rdoc/RubyXL/CT_Path2D.html +12 -19
- data/rdoc/RubyXL/CT_Path2DArcTo.html +12 -19
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +12 -19
- data/rdoc/RubyXL/CT_Path2DList.html +12 -19
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +12 -19
- data/rdoc/RubyXL/CT_Path2DTo.html +12 -19
- data/rdoc/RubyXL/CT_PathShadeProperties.html +12 -19
- data/rdoc/RubyXL/CT_PatternFillProperties.html +12 -19
- data/rdoc/RubyXL/CT_Point3D.html +12 -19
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +12 -19
- data/rdoc/RubyXL/CT_PresetColor.html +12 -19
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +12 -19
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +12 -19
- data/rdoc/RubyXL/CT_PresetTextShape.html +12 -19
- data/rdoc/RubyXL/CT_ReflectionEffect.html +12 -19
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +12 -19
- data/rdoc/RubyXL/CT_RelativeRect.html +12 -19
- data/rdoc/RubyXL/CT_SRgbColor.html +12 -19
- data/rdoc/RubyXL/CT_ScRgbColor.html +12 -19
- data/rdoc/RubyXL/CT_Scene3D.html +12 -19
- data/rdoc/RubyXL/CT_SchemeColor.html +12 -19
- data/rdoc/RubyXL/CT_Shape3D.html +12 -19
- data/rdoc/RubyXL/CT_ShapeStyle.html +12 -19
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +12 -19
- data/rdoc/RubyXL/CT_SphereCoords.html +12 -19
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +12 -19
- data/rdoc/RubyXL/CT_StyleMatrix.html +12 -19
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +12 -19
- data/rdoc/RubyXL/CT_SupplementalFont.html +12 -19
- data/rdoc/RubyXL/CT_SystemColor.html +12 -19
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +12 -19
- data/rdoc/RubyXL/CT_TextBlipBullet.html +12 -19
- data/rdoc/RubyXL/CT_TextCharBullet.html +12 -19
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +12 -19
- data/rdoc/RubyXL/CT_TextFont.html +12 -19
- data/rdoc/RubyXL/CT_TextListStyle.html +12 -19
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +12 -19
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +12 -19
- data/rdoc/RubyXL/CT_TextSpacing.html +12 -19
- data/rdoc/RubyXL/CT_TextTabStop.html +12 -19
- data/rdoc/RubyXL/CT_TextTabStopList.html +12 -19
- data/rdoc/RubyXL/CT_TileInfoProperties.html +12 -19
- data/rdoc/RubyXL/CT_TintEffect.html +12 -19
- data/rdoc/RubyXL/CT_Transform2D.html +12 -19
- data/rdoc/RubyXL/CT_TransformEffect.html +12 -19
- data/rdoc/RubyXL/CT_Vector3D.html +12 -19
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +12 -19
- data/rdoc/RubyXL/CalculationChain.html +16 -45
- data/rdoc/RubyXL/CalculationChainCell.html +12 -19
- data/rdoc/RubyXL/CalculationProperties.html +12 -19
- data/rdoc/RubyXL/Cell.html +133 -209
- data/rdoc/RubyXL/CellConvenienceMethods.html +168 -522
- data/rdoc/RubyXL/CellExt.html +12 -19
- data/rdoc/RubyXL/CellSmartTag.html +12 -19
- data/rdoc/RubyXL/CellSmartTagProperty.html +12 -19
- data/rdoc/RubyXL/CellSmartTags.html +12 -19
- data/rdoc/RubyXL/CellStyle.html +12 -19
- data/rdoc/RubyXL/CellStyleXFs.html +18 -39
- data/rdoc/RubyXL/CellStyles.html +18 -39
- data/rdoc/RubyXL/CellValue.html +17 -38
- data/rdoc/RubyXL/CellWatch.html +12 -19
- data/rdoc/RubyXL/CellWatches.html +12 -19
- data/rdoc/RubyXL/CellXFs.html +19 -42
- data/rdoc/RubyXL/ChartColorsFile.html +11 -25
- data/rdoc/RubyXL/ChartFile.html +18 -49
- data/rdoc/RubyXL/ChartStyleFile.html +11 -25
- data/rdoc/RubyXL/ChartUserShapesFile.html +11 -25
- data/rdoc/RubyXL/Chartsheet.html +19 -68
- data/rdoc/RubyXL/ChartsheetPageSetup.html +12 -19
- data/rdoc/RubyXL/ChartsheetProperties.html +12 -19
- data/rdoc/RubyXL/ChartsheetProtection.html +12 -19
- data/rdoc/RubyXL/ChartsheetView.html +12 -19
- data/rdoc/RubyXL/ChartsheetViews.html +12 -19
- data/rdoc/RubyXL/Color.html +18 -55
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +18 -65
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +28 -88
- data/rdoc/RubyXL/ColorConvenienceClasses.html +9 -14
- data/rdoc/RubyXL/ColorConvenienceMethods.html +14 -33
- data/rdoc/RubyXL/ColorFilter.html +12 -19
- data/rdoc/RubyXL/ColorScale.html +12 -19
- data/rdoc/RubyXL/ColorSet.html +12 -19
- data/rdoc/RubyXL/Colors.html +12 -19
- data/rdoc/RubyXL/ColumnRange.html +22 -74
- data/rdoc/RubyXL/ColumnRanges.html +23 -83
- data/rdoc/RubyXL/Comment.html +12 -19
- data/rdoc/RubyXL/CommentList.html +12 -19
- data/rdoc/RubyXL/CommentsFile.html +17 -51
- data/rdoc/RubyXL/ConditionalFormatValue.html +12 -19
- data/rdoc/RubyXL/ConditionalFormatting.html +12 -19
- data/rdoc/RubyXL/ConditionalFormattingRule.html +12 -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 +11 -17
- data/rdoc/RubyXL/ContentTypeOverride.html +11 -17
- data/rdoc/RubyXL/ContentTypes.html +22 -63
- data/rdoc/RubyXL/ControlPropertiesFile.html +13 -22
- data/rdoc/RubyXL/CorePropertiesFile.html +34 -171
- data/rdoc/RubyXL/CustomColor.html +12 -19
- data/rdoc/RubyXL/CustomColorList.html +12 -19
- data/rdoc/RubyXL/CustomFilter.html +12 -19
- data/rdoc/RubyXL/CustomFilters.html +12 -19
- data/rdoc/RubyXL/CustomGeometry.html +12 -19
- data/rdoc/RubyXL/CustomProperties.html +12 -19
- data/rdoc/RubyXL/CustomPropertiesFile.html +11 -25
- data/rdoc/RubyXL/CustomProperty.html +12 -19
- data/rdoc/RubyXL/CustomPropertyFile.html +11 -25
- data/rdoc/RubyXL/CustomSheetView.html +12 -19
- data/rdoc/RubyXL/CustomSheetViews.html +12 -19
- data/rdoc/RubyXL/CustomWorkbookView.html +12 -19
- data/rdoc/RubyXL/CustomWorkbookViews.html +12 -19
- data/rdoc/RubyXL/CustomXMLFile.html +11 -22
- data/rdoc/RubyXL/DXF.html +12 -19
- data/rdoc/RubyXL/DXFs.html +12 -19
- data/rdoc/RubyXL/DataBar.html +12 -19
- data/rdoc/RubyXL/DataConsolidate.html +12 -19
- data/rdoc/RubyXL/DataConsolidationReference.html +12 -19
- data/rdoc/RubyXL/DataConsolidationReferences.html +12 -19
- data/rdoc/RubyXL/DataType.html +10 -39
- data/rdoc/RubyXL/DataValidation.html +12 -19
- data/rdoc/RubyXL/DataValidations.html +12 -19
- data/rdoc/RubyXL/DateGroupItem.html +12 -19
- data/rdoc/RubyXL/DefinedName.html +12 -19
- data/rdoc/RubyXL/DefinedNameExt.html +12 -19
- data/rdoc/RubyXL/DefinedNames.html +12 -19
- data/rdoc/RubyXL/DefinedNamesExt.html +12 -19
- data/rdoc/RubyXL/DocumentPropertiesFile.html +21 -68
- data/rdoc/RubyXL/DrawingFile.html +18 -49
- data/rdoc/RubyXL/DynamicFilter.html +12 -19
- data/rdoc/RubyXL/EmbeddedControl.html +12 -19
- data/rdoc/RubyXL/EmbeddedControls.html +12 -19
- data/rdoc/RubyXL/Extension.html +12 -19
- data/rdoc/RubyXL/ExtensionStorageArea.html +12 -19
- data/rdoc/RubyXL/Extents.html +12 -19
- data/rdoc/RubyXL/ExternalBook.html +12 -19
- data/rdoc/RubyXL/ExternalLinksFile.html +18 -49
- data/rdoc/RubyXL/ExternalReference.html +12 -19
- data/rdoc/RubyXL/ExternalReferences.html +12 -19
- data/rdoc/RubyXL/ExtraColorSchemeList.html +12 -19
- data/rdoc/RubyXL/FieldItem.html +12 -19
- data/rdoc/RubyXL/FileRecoveryProperties.html +12 -19
- data/rdoc/RubyXL/FileSharing.html +12 -19
- data/rdoc/RubyXL/FileVersion.html +12 -19
- data/rdoc/RubyXL/Fill.html +18 -39
- data/rdoc/RubyXL/Fills.html +18 -39
- data/rdoc/RubyXL/FilterContainer.html +12 -19
- data/rdoc/RubyXL/FloatNode.html +11 -17
- data/rdoc/RubyXL/FloatValue.html +11 -17
- data/rdoc/RubyXL/Font.html +21 -59
- data/rdoc/RubyXL/FontConvenienceMethods.html +48 -237
- data/rdoc/RubyXL/FontScheme.html +12 -19
- data/rdoc/RubyXL/Fonts.html +18 -39
- data/rdoc/RubyXL/Formula.html +12 -19
- data/rdoc/RubyXL/FunctionGroup.html +12 -19
- data/rdoc/RubyXL/FunctionGroups.html +12 -19
- data/rdoc/RubyXL/GenericStorageObject.html +21 -84
- data/rdoc/RubyXL/GradientFill.html +12 -19
- data/rdoc/RubyXL/HeaderFooterSettings.html +12 -19
- data/rdoc/RubyXL/Hyperlink.html +12 -19
- data/rdoc/RubyXL/HyperlinkRelFile.html +11 -22
- data/rdoc/RubyXL/Hyperlinks.html +12 -19
- data/rdoc/RubyXL/IconFilter.html +12 -19
- data/rdoc/RubyXL/IconSet.html +12 -19
- data/rdoc/RubyXL/IgnoredError.html +12 -19
- data/rdoc/RubyXL/IgnoredErrors.html +12 -19
- data/rdoc/RubyXL/IndexedColors.html +12 -19
- data/rdoc/RubyXL/InputCells.html +12 -19
- data/rdoc/RubyXL/IntegerNode.html +11 -17
- data/rdoc/RubyXL/IntegerValue.html +11 -17
- data/rdoc/RubyXL/LegacyCell.html +13 -66
- data/rdoc/RubyXL/LegacyWorksheet.html +25 -99
- data/rdoc/RubyXL/MRUColors.html +12 -19
- data/rdoc/RubyXL/MacrosFile.html +11 -25
- data/rdoc/RubyXL/MergedCell.html +12 -19
- data/rdoc/RubyXL/MergedCells.html +12 -19
- data/rdoc/RubyXL/NumFmt.html +12 -19
- data/rdoc/RubyXL/NumberFormat.html +18 -39
- data/rdoc/RubyXL/NumberFormats.html +18 -45
- data/rdoc/RubyXL/OLEObject.html +12 -19
- data/rdoc/RubyXL/OLEObjectFile.html +11 -25
- data/rdoc/RubyXL/OLEObjects.html +12 -19
- data/rdoc/RubyXL/OLESize.html +12 -19
- data/rdoc/RubyXL/OOXMLContainerObject.html +35 -132
- data/rdoc/RubyXL/OOXMLIgnored.html +19 -53
- data/rdoc/RubyXL/OOXMLObject.html +14 -25
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +91 -183
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +48 -185
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +47 -200
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +36 -133
- data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
- data/rdoc/RubyXL/Offset.html +12 -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 +12 -19
- data/rdoc/RubyXL/PageMargins.html +12 -19
- data/rdoc/RubyXL/PageSetup.html +12 -19
- data/rdoc/RubyXL/PageSetupProperties.html +12 -19
- data/rdoc/RubyXL/Pane.html +12 -19
- data/rdoc/RubyXL/Parser.html +22 -56
- data/rdoc/RubyXL/PatternFill.html +12 -19
- data/rdoc/RubyXL/PhoneticProperties.html +12 -19
- data/rdoc/RubyXL/PhoneticRun.html +12 -19
- data/rdoc/RubyXL/PivotArea.html +12 -19
- data/rdoc/RubyXL/PivotCache.html +12 -19
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +13 -30
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +11 -25
- data/rdoc/RubyXL/PivotCaches.html +12 -19
- data/rdoc/RubyXL/PivotReference.html +12 -19
- data/rdoc/RubyXL/PivotReferences.html +12 -19
- data/rdoc/RubyXL/PivotTableFile.html +13 -30
- data/rdoc/RubyXL/PivotTableSelection.html +12 -19
- data/rdoc/RubyXL/PresetGeometry.html +12 -19
- data/rdoc/RubyXL/PrintOptions.html +12 -19
- data/rdoc/RubyXL/PrinterSettingsFile.html +11 -25
- data/rdoc/RubyXL/ProtectedRange.html +12 -19
- data/rdoc/RubyXL/ProtectedRanges.html +12 -19
- data/rdoc/RubyXL/Protection.html +12 -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 +11 -17
- data/rdoc/RubyXL/RawOOXML.html +20 -60
- data/rdoc/RubyXL/Reference.html +62 -228
- data/rdoc/RubyXL/Relationship.html +11 -17
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +13 -32
- data/rdoc/RubyXL/RelationshipSupport.html +25 -120
- data/rdoc/RubyXL/RevisionPointer.html +12 -22
- data/rdoc/RubyXL/RichText.html +19 -39
- data/rdoc/RubyXL/RichTextRun.html +17 -38
- data/rdoc/RubyXL/Row.html +33 -168
- data/rdoc/RubyXL/RowExt.html +12 -19
- data/rdoc/RubyXL/RunProperties.html +12 -19
- data/rdoc/RubyXL/Scenario.html +12 -19
- data/rdoc/RubyXL/Scenarios.html +12 -19
- data/rdoc/RubyXL/Selection.html +16 -37
- data/rdoc/RubyXL/ShapeGuide.html +12 -19
- data/rdoc/RubyXL/ShapeTextRectangle.html +12 -19
- data/rdoc/RubyXL/SharedStringsTable.html +37 -147
- data/rdoc/RubyXL/Sheet.html +12 -19
- data/rdoc/RubyXL/SheetCalculationProperties.html +12 -19
- data/rdoc/RubyXL/SheetData.html +19 -53
- data/rdoc/RubyXL/SheetDataExt.html +12 -19
- data/rdoc/RubyXL/SheetDataSet.html +12 -19
- data/rdoc/RubyXL/SheetMetadata.html +108 -0
- data/rdoc/RubyXL/SheetName.html +12 -19
- data/rdoc/RubyXL/SheetNames.html +12 -19
- data/rdoc/RubyXL/Sheets.html +12 -19
- data/rdoc/RubyXL/SlicerCacheFile.html +11 -25
- data/rdoc/RubyXL/SlicerFile.html +11 -25
- data/rdoc/RubyXL/SmartTagProperties.html +12 -19
- data/rdoc/RubyXL/SmartTagType.html +12 -19
- data/rdoc/RubyXL/SmartTagTypes.html +12 -19
- data/rdoc/RubyXL/SmartTags.html +12 -19
- data/rdoc/RubyXL/SortCondition.html +12 -19
- data/rdoc/RubyXL/SortState.html +12 -19
- data/rdoc/RubyXL/Sqref.html +19 -53
- data/rdoc/RubyXL/Stop.html +12 -19
- data/rdoc/RubyXL/StringNode.html +11 -17
- data/rdoc/RubyXL/StringNodeW3C.html +20 -54
- data/rdoc/RubyXL/StringValue.html +11 -17
- data/rdoc/RubyXL/Stylesheet.html +34 -117
- data/rdoc/RubyXL/TableFile.html +11 -25
- data/rdoc/RubyXL/TableParts.html +11 -17
- data/rdoc/RubyXL/TableStyle.html +12 -19
- data/rdoc/RubyXL/TableStyles.html +12 -19
- data/rdoc/RubyXL/Text.html +22 -67
- data/rdoc/RubyXL/TextImportSettings.html +99 -0
- data/rdoc/RubyXL/Theme.html +19 -75
- data/rdoc/RubyXL/ThemeElements.html +12 -19
- data/rdoc/RubyXL/ThumbnailFile.html +11 -25
- data/rdoc/RubyXL/Top10.html +12 -19
- data/rdoc/RubyXL/VMLDrawingFile.html +14 -32
- data/rdoc/RubyXL/Variant.html +12 -19
- data/rdoc/RubyXL/Vector.html +17 -38
- data/rdoc/RubyXL/VectorValue.html +11 -17
- data/rdoc/RubyXL/VisualProperties.html +12 -19
- data/rdoc/RubyXL/WebPublishObject.html +12 -19
- data/rdoc/RubyXL/WebPublishObjects.html +12 -19
- data/rdoc/RubyXL/WebPublishingItem.html +12 -19
- data/rdoc/RubyXL/WebPublishingItems.html +12 -19
- data/rdoc/RubyXL/WebPublishingProperties.html +12 -19
- data/rdoc/RubyXL/WebQueryProperties.html +99 -0
- data/rdoc/RubyXL/Workbook.html +486 -227
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +130 -888
- data/rdoc/RubyXL/WorkbookProperties.html +12 -19
- data/rdoc/RubyXL/WorkbookProtection.html +12 -19
- data/rdoc/RubyXL/WorkbookRoot.html +27 -114
- data/rdoc/RubyXL/WorkbookView.html +12 -19
- data/rdoc/RubyXL/WorkbookViews.html +12 -19
- data/rdoc/RubyXL/Worksheet.html +92 -121
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +298 -1109
- data/rdoc/RubyXL/WorksheetDimensions.html +12 -19
- data/rdoc/RubyXL/WorksheetFormatProperties.html +11 -17
- data/rdoc/RubyXL/WorksheetProperties.html +12 -19
- data/rdoc/RubyXL/WorksheetProtection.html +12 -19
- data/rdoc/RubyXL/WorksheetView.html +12 -19
- data/rdoc/RubyXL/WorksheetViews.html +12 -19
- data/rdoc/RubyXL/XF.html +12 -19
- data/rdoc/RubyXL.html +39 -318
- data/rdoc/created.rid +45 -38
- 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 +33 -373
- data/rdoc/js/darkfish.js +22 -99
- 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 +6 -6
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +205 -45
- data/rubyXL.gemspec +53 -29
- data/spec/lib/cell_spec.rb +57 -6
- 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 +1 -5
- data/spec/lib/workbook_spec.rb +25 -4
- data/spec/lib/worksheet_spec.rb +873 -479
- data/spec/spec_helper.rb +2 -0
- data/test/test_parse_write.rb +15 -15
- metadata +54 -10
- data/rdoc/js/jquery.js +0 -4
data/rdoc/RubyXL/Workbook.html
CHANGED
@@ -4,21 +4,23 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>class RubyXL::Workbook - rubyXL 3.
|
7
|
+
<title>class RubyXL::Workbook - rubyXL 3.4.25</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "../";
|
11
11
|
var index_rel_prefix = "../";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="../js/
|
15
|
-
<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>
|
16
19
|
|
17
20
|
<link href="../css/fonts.css" rel="stylesheet">
|
18
21
|
<link href="../css/rdoc.css" rel="stylesheet">
|
19
22
|
|
20
23
|
|
21
|
-
|
22
24
|
<body id="top" role="document" class="class">
|
23
25
|
<nav role="navigation">
|
24
26
|
<div id="project-navigation">
|
@@ -55,61 +57,58 @@
|
|
55
57
|
|
56
58
|
<div id="class-metadata">
|
57
59
|
|
58
|
-
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
59
62
|
<h3>Parent</h3>
|
60
63
|
|
61
|
-
|
62
64
|
<p class="link"><a href="OOXMLTopLevelObject.html">RubyXL::OOXMLTopLevelObject</a>
|
63
|
-
|
64
65
|
</div>
|
65
66
|
|
66
|
-
|
67
|
+
|
68
|
+
<div id="includes-section" class="nav-section">
|
67
69
|
<h3>Included Modules</h3>
|
68
70
|
|
69
71
|
<ul class="link-list">
|
70
|
-
|
71
|
-
|
72
72
|
<li><a class="include" href="RelationshipSupport.html">RubyXL::RelationshipSupport</a>
|
73
|
-
|
74
|
-
|
75
|
-
|
76
73
|
<li><span class="include">Enumerable</span>
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<li><a class="include" href="WorkbookConvenienceMethods.html">RubyXL::WorkbookConvenienceMethods</a>
|
81
|
-
|
82
|
-
|
83
74
|
</ul>
|
84
75
|
</div>
|
85
76
|
|
86
77
|
|
87
|
-
|
78
|
+
|
79
|
+
<!-- Method Quickref -->
|
88
80
|
<div id="method-list-section" class="nav-section">
|
89
81
|
<h3>Methods</h3>
|
90
82
|
|
91
83
|
<ul class="link-list" role="directory">
|
92
|
-
|
93
84
|
<li class="calls-super" ><a href="#method-c-new">::new</a>
|
94
|
-
|
85
|
+
<li ><a href="#method-i-5B-5D">#[]</a>
|
86
|
+
<li ><a href="#method-i-add_worksheet">#add_worksheet</a>
|
87
|
+
<li ><a href="#method-i-application">#application</a>
|
88
|
+
<li ><a href="#method-i-application-3D">#application=</a>
|
89
|
+
<li ><a href="#method-i-appversion">#appversion</a>
|
90
|
+
<li ><a href="#method-i-appversion-3D">#appversion=</a>
|
95
91
|
<li ><a href="#method-i-before_write_xml">#before_write_xml</a>
|
96
|
-
|
92
|
+
<li ><a href="#method-i-company">#company</a>
|
93
|
+
<li ><a href="#method-i-company-3D">#company=</a>
|
97
94
|
<li ><a href="#method-i-content_type">#content_type</a>
|
98
|
-
|
95
|
+
<li ><a href="#method-i-created_at">#created_at</a>
|
96
|
+
<li ><a href="#method-i-created_at-3D">#created_at=</a>
|
97
|
+
<li ><a href="#method-i-creator">#creator</a>
|
98
|
+
<li ><a href="#method-i-creator-3D">#creator=</a>
|
99
|
+
<li ><a href="#method-i-date1904">#date1904</a>
|
100
|
+
<li ><a href="#method-i-date1904-3D">#date1904=</a>
|
99
101
|
<li ><a href="#method-i-date_to_num">#date_to_num</a>
|
100
|
-
|
102
|
+
<li ><a href="#method-i-modified_at">#modified_at</a>
|
103
|
+
<li ><a href="#method-i-modified_at-3D">#modified_at=</a>
|
104
|
+
<li ><a href="#method-i-modifier">#modifier</a>
|
105
|
+
<li ><a href="#method-i-modifier-3D">#modifier=</a>
|
101
106
|
<li ><a href="#method-i-num_to_date">#num_to_date</a>
|
102
|
-
|
103
107
|
<li ><a href="#method-i-related_objects">#related_objects</a>
|
104
|
-
|
105
108
|
<li ><a href="#method-i-save">#save</a>
|
106
|
-
|
107
109
|
<li ><a href="#method-i-stream">#stream</a>
|
108
|
-
|
109
110
|
<li ><a href="#method-i-write">#write</a>
|
110
|
-
|
111
111
|
<li ><a href="#method-i-xlsx_path">#xlsx_path</a>
|
112
|
-
|
113
112
|
</ul>
|
114
113
|
</div>
|
115
114
|
|
@@ -123,84 +122,62 @@
|
|
123
122
|
|
124
123
|
<section class="description">
|
125
124
|
|
126
|
-
<p><a
|
127
|
-
href="http://www.datypic.com/sc/ooxml/e-ssml_workbook.html">www.datypic.com/sc/ooxml/e-ssml_workbook.html</a></p>
|
125
|
+
<p><a href="http://www.datypic.com/sc/ooxml/e-ssml_workbook.html">www.datypic.com/sc/ooxml/e-ssml_workbook.html</a></p>
|
128
126
|
|
129
127
|
</section>
|
130
128
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
129
|
<section id="5Buntitled-5D" class="documentation-section">
|
135
|
-
|
136
130
|
|
137
|
-
|
138
131
|
|
139
|
-
|
140
132
|
<section class="constants-list">
|
141
133
|
<header>
|
142
134
|
<h3>Constants</h3>
|
143
135
|
</header>
|
144
136
|
<dl>
|
145
|
-
|
146
137
|
<dt id="APPLICATION">APPLICATION
|
147
|
-
|
148
138
|
<dd>
|
149
|
-
|
150
|
-
|
151
139
|
<dt id="APPVERSION">APPVERSION
|
152
|
-
|
153
140
|
<dd>
|
154
|
-
|
155
|
-
|
156
141
|
<dt id="CONTENT_TYPE">CONTENT_TYPE
|
157
|
-
|
158
142
|
<dd>
|
159
|
-
|
160
|
-
|
143
|
+
<dt id="CONTENT_TYPE_TEMPLATE">CONTENT_TYPE_TEMPLATE
|
144
|
+
<dd>
|
145
|
+
<dt id="CONTENT_TYPE_TEMPLATE_WITH_MACROS">CONTENT_TYPE_TEMPLATE_WITH_MACROS
|
146
|
+
<dd>
|
161
147
|
<dt id="CONTENT_TYPE_WITH_MACROS">CONTENT_TYPE_WITH_MACROS
|
162
|
-
|
163
148
|
<dd>
|
164
|
-
|
165
|
-
|
166
149
|
<dt id="DATE1899">DATE1899
|
167
|
-
|
168
|
-
<dd><p>Subtracting one day to accomodate for erroneous 1900 leap year
|
169
|
-
compatibility only for 1900 based dates</p>
|
170
|
-
|
171
|
-
|
150
|
+
<dd><p>Subtracting one day to accomodate for erroneous 1900 leap year compatibility only for 1900 based dates</p>
|
172
151
|
<dt id="DATE1904">DATE1904
|
173
|
-
|
174
152
|
<dd>
|
175
|
-
|
176
|
-
|
177
153
|
<dt id="MARCH_1_1900">MARCH_1_1900
|
178
|
-
|
179
154
|
<dd>
|
180
|
-
|
181
|
-
|
182
155
|
<dt id="REL_TYPE">REL_TYPE
|
183
|
-
|
184
156
|
<dd>
|
185
|
-
|
186
|
-
|
187
157
|
<dt id="SHEET_NAME_FORBIDDEN_CHARS">SHEET_NAME_FORBIDDEN_CHARS
|
188
|
-
|
189
|
-
<
|
190
|
-
href="
|
191
|
-
|
192
|
-
|
158
|
+
<dd><p><a href="http://www.accountingweb.com/technology/excel/seven-characters-you-cant-use-in-worksheet-names">www.accountingweb.com/technology/excel/seven-characters-you-cant-use-in-worksheet-names</a></p>
|
159
|
+
<dt id="SHEET_NAME_FORBIDDEN_NAMES">SHEET_NAME_FORBIDDEN_NAMES
|
160
|
+
<dd><p><a href="https://answers.microsoft.com/en-us/msoffice/forum/all/excel-history-is-a-reserved-name-help/f8a398a4-b72c-48e3-82da-4f132c305e91">answers.microsoft.com/en-us/msoffice/forum/all/excel-history-is-a-reserved-name-help/f8a398a4-b72c-48e3-82da-4f132c305e91</a></p>
|
161
|
+
<dt id="SHEET_NAME_TEMPLATE">SHEET_NAME_TEMPLATE
|
162
|
+
<dd>
|
193
163
|
</dl>
|
194
164
|
</section>
|
195
|
-
|
196
165
|
|
197
|
-
|
198
166
|
<section class="attribute-method-details" class="method-section">
|
199
167
|
<header>
|
200
168
|
<h3>Attributes</h3>
|
201
169
|
</header>
|
202
170
|
|
203
|
-
|
171
|
+
<div id="attribute-i-is_template" class="method-detail">
|
172
|
+
<div class="method-heading attribute-method-heading">
|
173
|
+
<span class="method-name">is_template</span><span
|
174
|
+
class="attribute-access-type">[RW]</span>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<div class="method-description">
|
178
|
+
|
179
|
+
</div>
|
180
|
+
</div>
|
204
181
|
<div id="attribute-i-worksheets" class="method-detail">
|
205
182
|
<div class="method-heading attribute-method-heading">
|
206
183
|
<span class="method-name">worksheets</span><span
|
@@ -209,48 +186,35 @@ href="http://www.accountingweb.com/technology/excel/seven-characters-you-cant-us
|
|
209
186
|
|
210
187
|
<div class="method-description">
|
211
188
|
|
212
|
-
|
213
|
-
|
214
189
|
</div>
|
215
190
|
</div>
|
216
|
-
|
217
191
|
</section>
|
218
|
-
|
219
192
|
|
220
|
-
|
193
|
+
|
221
194
|
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
222
195
|
<header>
|
223
196
|
<h3>Public Class Methods</h3>
|
224
197
|
</header>
|
225
198
|
|
226
|
-
|
227
199
|
<div id="method-c-new" class="method-detail ">
|
228
|
-
|
229
200
|
<div class="method-heading">
|
230
201
|
<span class="method-name">new</span><span
|
231
|
-
class="method-args">(worksheets = [], src_file_path = nil, creator = nil, modifier = nil, created_at = nil, company =
|
232
|
-
|
202
|
+
class="method-args">(worksheets = [], src_file_path = nil, creator = nil, modifier = nil, created_at = nil, company = '', application = APPLICATION, appversion = APPVERSION, date1904 = 0, is_template = false)</span>
|
233
203
|
<span class="method-click-advice">click to toggle source</span>
|
234
|
-
|
235
204
|
</div>
|
236
|
-
|
237
205
|
|
238
206
|
<div class="method-description">
|
239
207
|
|
240
|
-
|
241
|
-
|
242
|
-
|
243
208
|
<div class="method-calls-super">
|
244
209
|
Calls superclass method
|
245
|
-
<a href="OOXMLObjectInstanceMethods.html#method-c-new">RubyXL::OOXMLObjectInstanceMethods
|
210
|
+
<a href="OOXMLObjectInstanceMethods.html#method-c-new"><code>RubyXL::OOXMLObjectInstanceMethods::new</code></a>
|
246
211
|
</div>
|
247
|
-
|
248
212
|
|
249
|
-
|
250
213
|
<div class="method-source-code" id="new-source">
|
251
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
252
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">worksheets</span> = [], <span class="ruby-identifier">src_file_path</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">creator</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">modifier</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">created_at</span> = <span class="ruby-keyword">nil</span>,
|
253
|
-
<span class="ruby-identifier">company</span> = <span class="ruby-string">''</span>, <span class="ruby-identifier">application</span> = <span class="ruby-constant">APPLICATION</span>, <span class="ruby-identifier">appversion</span> = <span class="ruby-constant">APPVERSION</span>, <span class="ruby-identifier">date1904</span> = <span class="ruby-value">0</span
|
214
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 446</span>
|
215
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">worksheets</span> = [], <span class="ruby-identifier">src_file_path</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">creator</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">modifier</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">created_at</span> = <span class="ruby-keyword">nil</span>,
|
216
|
+
<span class="ruby-identifier">company</span> = <span class="ruby-string">''</span>, <span class="ruby-identifier">application</span> = <span class="ruby-constant">APPLICATION</span>, <span class="ruby-identifier">appversion</span> = <span class="ruby-constant">APPVERSION</span>, <span class="ruby-identifier">date1904</span> = <span class="ruby-value">0</span>,
|
217
|
+
<span class="ruby-identifier">is_template</span> = <span class="ruby-keyword">false</span>)
|
254
218
|
<span class="ruby-keyword">super</span>()
|
255
219
|
|
256
220
|
<span class="ruby-comment"># Order of sheets in the +worksheets+ array corresponds to the order of pages in Excel UI.</span>
|
@@ -275,46 +239,177 @@ href="http://www.accountingweb.com/technology/excel/seven-characters-you-cant-us
|
|
275
239
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">creator</span> = <span class="ruby-identifier">creator</span>
|
276
240
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">modifier</span> = <span class="ruby-identifier">modifier</span>
|
277
241
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">date1904</span> = <span class="ruby-identifier">date1904</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
242
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_template</span> = <span class="ruby-identifier">is_template</span>
|
278
243
|
<span class="ruby-keyword">end</span></pre>
|
279
244
|
</div>
|
280
|
-
|
281
245
|
</div>
|
282
246
|
|
283
|
-
|
284
247
|
|
285
|
-
|
286
248
|
</div>
|
287
249
|
|
288
|
-
|
289
250
|
</section>
|
290
|
-
|
251
|
+
|
291
252
|
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
292
253
|
<header>
|
293
254
|
<h3>Public Instance Methods</h3>
|
294
255
|
</header>
|
295
256
|
|
296
|
-
|
297
|
-
<div id="method-i-before_write_xml" class="method-detail ">
|
298
|
-
|
257
|
+
<div id="method-i-5B-5D" class="method-detail ">
|
299
258
|
<div class="method-heading">
|
300
|
-
<span class="method-name">
|
259
|
+
<span class="method-name">[]</span><span
|
260
|
+
class="method-args">(ind)</span>
|
261
|
+
<span class="method-click-advice">click to toggle source</span>
|
262
|
+
</div>
|
263
|
+
|
264
|
+
<div class="method-description">
|
265
|
+
<p>Finds worksheet by its name or numerical index</p>
|
266
|
+
|
267
|
+
<div class="method-source-code" id="5B-5D-source">
|
268
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 479</span>
|
269
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">[]</span>(<span class="ruby-identifier">ind</span>)
|
270
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">ind</span>
|
271
|
+
<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>]
|
272
|
+
<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> }
|
273
|
+
<span class="ruby-keyword">end</span>
|
274
|
+
<span class="ruby-keyword">end</span></pre>
|
275
|
+
</div>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div id="method-i-add_worksheet" class="method-detail ">
|
282
|
+
<div class="method-heading">
|
283
|
+
<span class="method-name">add_worksheet</span><span
|
284
|
+
class="method-args">(name = nil)</span>
|
285
|
+
<span class="method-click-advice">click to toggle source</span>
|
286
|
+
</div>
|
287
|
+
|
288
|
+
<div class="method-description">
|
289
|
+
<p>Create new simple worksheet and add it to the workbook worksheets</p>
|
290
|
+
|
291
|
+
<p>@param [String] The name for the new worksheet</p>
|
292
|
+
|
293
|
+
<div class="method-source-code" id="add_worksheet-source">
|
294
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 489</span>
|
295
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_worksheet</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span>)
|
296
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
|
297
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-value">0</span>
|
298
|
+
|
299
|
+
<span class="ruby-keyword">begin</span>
|
300
|
+
<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>)
|
301
|
+
<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>
|
302
|
+
<span class="ruby-keyword">end</span>
|
303
|
+
|
304
|
+
<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>)
|
305
|
+
<span class="ruby-identifier">worksheets</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_worksheet</span>
|
306
|
+
<span class="ruby-identifier">new_worksheet</span>
|
307
|
+
<span class="ruby-keyword">end</span></pre>
|
308
|
+
</div>
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div id="method-i-application" class="method-detail ">
|
315
|
+
<div class="method-heading">
|
316
|
+
<span class="method-name">application</span><span
|
301
317
|
class="method-args">()</span>
|
302
|
-
|
303
318
|
<span class="method-click-advice">click to toggle source</span>
|
304
|
-
|
305
319
|
</div>
|
306
|
-
|
307
320
|
|
308
321
|
<div class="method-description">
|
309
322
|
|
323
|
+
|
324
|
+
<div class="method-source-code" id="application-source">
|
325
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 528</span>
|
326
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">application</span>
|
327
|
+
<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>
|
328
|
+
<span class="ruby-keyword">end</span></pre>
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
|
333
|
+
</div>
|
334
|
+
|
335
|
+
<div id="method-i-application-3D" class="method-detail ">
|
336
|
+
<div class="method-heading">
|
337
|
+
<span class="method-name">application=</span><span
|
338
|
+
class="method-args">(v)</span>
|
339
|
+
<span class="method-click-advice">click to toggle source</span>
|
340
|
+
</div>
|
341
|
+
|
342
|
+
<div class="method-description">
|
310
343
|
|
344
|
+
|
345
|
+
<div class="method-source-code" id="application-3D-source">
|
346
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 532</span>
|
347
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">application=</span>(<span class="ruby-identifier">v</span>)
|
348
|
+
<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>
|
349
|
+
<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>
|
350
|
+
<span class="ruby-keyword">end</span></pre>
|
351
|
+
</div>
|
352
|
+
</div>
|
353
|
+
|
354
|
+
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div id="method-i-appversion" class="method-detail ">
|
358
|
+
<div class="method-heading">
|
359
|
+
<span class="method-name">appversion</span><span
|
360
|
+
class="method-args">()</span>
|
361
|
+
<span class="method-click-advice">click to toggle source</span>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div class="method-description">
|
311
365
|
|
366
|
+
|
367
|
+
<div class="method-source-code" id="appversion-source">
|
368
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 537</span>
|
369
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">appversion</span>
|
370
|
+
<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>
|
371
|
+
<span class="ruby-keyword">end</span></pre>
|
372
|
+
</div>
|
373
|
+
</div>
|
374
|
+
|
375
|
+
|
376
|
+
</div>
|
377
|
+
|
378
|
+
<div id="method-i-appversion-3D" class="method-detail ">
|
379
|
+
<div class="method-heading">
|
380
|
+
<span class="method-name">appversion=</span><span
|
381
|
+
class="method-args">(v)</span>
|
382
|
+
<span class="method-click-advice">click to toggle source</span>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
<div class="method-description">
|
312
386
|
|
313
387
|
|
388
|
+
<div class="method-source-code" id="appversion-3D-source">
|
389
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 541</span>
|
390
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">appversion=</span>(<span class="ruby-identifier">v</span>)
|
391
|
+
<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>
|
392
|
+
<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>
|
393
|
+
<span class="ruby-keyword">end</span></pre>
|
394
|
+
</div>
|
395
|
+
</div>
|
396
|
+
|
397
|
+
|
398
|
+
</div>
|
399
|
+
|
400
|
+
<div id="method-i-before_write_xml" class="method-detail ">
|
401
|
+
<div class="method-heading">
|
402
|
+
<span class="method-name">before_write_xml</span><span
|
403
|
+
class="method-args">()</span>
|
404
|
+
<span class="method-click-advice">click to toggle source</span>
|
405
|
+
</div>
|
406
|
+
|
407
|
+
<div class="method-description">
|
314
408
|
|
409
|
+
|
315
410
|
<div class="method-source-code" id="before_write_xml-source">
|
316
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
317
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">before_write_xml</span>
|
411
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 368</span>
|
412
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">before_write_xml</span>
|
318
413
|
<span class="ruby-identifier">max_sheet_id</span> = <span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">collect</span>(<span class="ruby-operator">&</span><span class="ruby-value">:sheet_id</span>).<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">max</span> <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
|
319
414
|
|
320
415
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">sheets</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Sheets</span>.<span class="ruby-identifier">new</span>
|
@@ -323,311 +418,475 @@ href="http://www.accountingweb.com/technology/excel/seven-characters-you-cant-us
|
|
323
418
|
<span class="ruby-identifier">rel</span> = <span class="ruby-identifier">relationship_container</span>.<span class="ruby-identifier">find_by_target</span>(<span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">xlsx_path</span>)
|
324
419
|
|
325
420
|
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Worksheet name '#{sheet.sheet_name}' contains forbidden characters"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_name</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">SHEET_NAME_FORBIDDEN_CHARS</span>
|
421
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Worksheet name '#{sheet.sheet_name}' is forbidden"</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">SHEET_NAME_FORBIDDEN_NAMES</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_name</span>)
|
326
422
|
|
327
|
-
<span class="ruby-identifier">sheets</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Sheet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:name</span>
|
328
|
-
<span class="ruby-value">:sheet_id</span>
|
329
|
-
<span class="ruby-value">:state</span>
|
330
|
-
<span class="ruby-value">:r_id</span>
|
423
|
+
<span class="ruby-identifier">sheets</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Sheet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:name</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_name</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">30</span>], <span class="ruby-comment"># Max sheet name length is 31 char</span>
|
424
|
+
<span class="ruby-value">:sheet_id</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">sheet_id</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">max_sheet_id</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>),
|
425
|
+
<span class="ruby-value">:state</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">state</span>,
|
426
|
+
<span class="ruby-value">:r_id</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">rel</span>.<span class="ruby-identifier">id</span>)
|
331
427
|
}
|
332
428
|
|
333
429
|
<span class="ruby-keyword">true</span>
|
334
430
|
<span class="ruby-keyword">end</span></pre>
|
335
431
|
</div>
|
432
|
+
</div>
|
433
|
+
|
434
|
+
|
435
|
+
</div>
|
436
|
+
|
437
|
+
<div id="method-i-company" class="method-detail ">
|
438
|
+
<div class="method-heading">
|
439
|
+
<span class="method-name">company</span><span
|
440
|
+
class="method-args">()</span>
|
441
|
+
<span class="method-click-advice">click to toggle source</span>
|
442
|
+
</div>
|
443
|
+
|
444
|
+
<div class="method-description">
|
445
|
+
|
446
|
+
|
447
|
+
<div class="method-source-code" id="company-source">
|
448
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 519</span>
|
449
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">company</span>
|
450
|
+
<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>
|
451
|
+
<span class="ruby-keyword">end</span></pre>
|
452
|
+
</div>
|
453
|
+
</div>
|
454
|
+
|
455
|
+
|
456
|
+
</div>
|
457
|
+
|
458
|
+
<div id="method-i-company-3D" class="method-detail ">
|
459
|
+
<div class="method-heading">
|
460
|
+
<span class="method-name">company=</span><span
|
461
|
+
class="method-args">(v)</span>
|
462
|
+
<span class="method-click-advice">click to toggle source</span>
|
463
|
+
</div>
|
464
|
+
|
465
|
+
<div class="method-description">
|
336
466
|
|
467
|
+
|
468
|
+
<div class="method-source-code" id="company-3D-source">
|
469
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 523</span>
|
470
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">company=</span>(<span class="ruby-identifier">v</span>)
|
471
|
+
<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>
|
472
|
+
<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>
|
473
|
+
<span class="ruby-keyword">end</span></pre>
|
474
|
+
</div>
|
337
475
|
</div>
|
338
476
|
|
339
|
-
|
340
477
|
|
341
|
-
|
342
478
|
</div>
|
343
479
|
|
344
|
-
|
345
480
|
<div id="method-i-content_type" class="method-detail ">
|
346
|
-
|
347
481
|
<div class="method-heading">
|
348
482
|
<span class="method-name">content_type</span><span
|
349
483
|
class="method-args">()</span>
|
350
|
-
|
351
484
|
<span class="method-click-advice">click to toggle source</span>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
<div class="method-description">
|
352
488
|
|
489
|
+
|
490
|
+
<div class="method-source-code" id="content_type-source">
|
491
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 313</span>
|
492
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">content_type</span>
|
493
|
+
<span class="ruby-identifier">content_type_name</span> = <span class="ruby-string">'CONTENT_TYPE'</span>
|
494
|
+
<span class="ruby-identifier">content_type_name</span> <span class="ruby-operator"><<</span> <span class="ruby-string">'_TEMPLATE'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_template</span>
|
495
|
+
<span class="ruby-identifier">content_type_name</span> <span class="ruby-operator"><<</span> <span class="ruby-string">'_WITH_MACROS'</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">macros</span>
|
496
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">content_type_name</span>)
|
497
|
+
<span class="ruby-keyword">end</span></pre>
|
498
|
+
</div>
|
499
|
+
</div>
|
500
|
+
|
501
|
+
|
502
|
+
</div>
|
503
|
+
|
504
|
+
<div id="method-i-created_at" class="method-detail ">
|
505
|
+
<div class="method-heading">
|
506
|
+
<span class="method-name">created_at</span><span
|
507
|
+
class="method-args">()</span>
|
508
|
+
<span class="method-click-advice">click to toggle source</span>
|
353
509
|
</div>
|
354
|
-
|
355
510
|
|
356
511
|
<div class="method-description">
|
357
512
|
|
513
|
+
|
514
|
+
<div class="method-source-code" id="created_at-source">
|
515
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 503</span>
|
516
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">created_at</span>
|
517
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">created_at</span>
|
518
|
+
<span class="ruby-keyword">end</span></pre>
|
519
|
+
</div>
|
520
|
+
</div>
|
521
|
+
|
522
|
+
|
523
|
+
</div>
|
524
|
+
|
525
|
+
<div id="method-i-created_at-3D" class="method-detail ">
|
526
|
+
<div class="method-heading">
|
527
|
+
<span class="method-name">created_at=</span><span
|
528
|
+
class="method-args">(v)</span>
|
529
|
+
<span class="method-click-advice">click to toggle source</span>
|
530
|
+
</div>
|
531
|
+
|
532
|
+
<div class="method-description">
|
358
533
|
|
534
|
+
|
535
|
+
<div class="method-source-code" id="created_at-3D-source">
|
536
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 507</span>
|
537
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">created_at=</span>(<span class="ruby-identifier">v</span>)
|
538
|
+
<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>
|
539
|
+
<span class="ruby-keyword">end</span></pre>
|
540
|
+
</div>
|
541
|
+
</div>
|
542
|
+
|
543
|
+
|
544
|
+
</div>
|
545
|
+
|
546
|
+
<div id="method-i-creator" class="method-detail ">
|
547
|
+
<div class="method-heading">
|
548
|
+
<span class="method-name">creator</span><span
|
549
|
+
class="method-args">()</span>
|
550
|
+
<span class="method-click-advice">click to toggle source</span>
|
551
|
+
</div>
|
552
|
+
|
553
|
+
<div class="method-description">
|
359
554
|
|
555
|
+
|
556
|
+
<div class="method-source-code" id="creator-source">
|
557
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 546</span>
|
558
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">creator</span>
|
559
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">creator</span>
|
560
|
+
<span class="ruby-keyword">end</span></pre>
|
561
|
+
</div>
|
562
|
+
</div>
|
563
|
+
|
564
|
+
|
565
|
+
</div>
|
566
|
+
|
567
|
+
<div id="method-i-creator-3D" class="method-detail ">
|
568
|
+
<div class="method-heading">
|
569
|
+
<span class="method-name">creator=</span><span
|
570
|
+
class="method-args">(v)</span>
|
571
|
+
<span class="method-click-advice">click to toggle source</span>
|
572
|
+
</div>
|
573
|
+
|
574
|
+
<div class="method-description">
|
360
575
|
|
361
576
|
|
577
|
+
<div class="method-source-code" id="creator-3D-source">
|
578
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 550</span>
|
579
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">creator=</span>(<span class="ruby-identifier">v</span>)
|
580
|
+
<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>
|
581
|
+
<span class="ruby-keyword">end</span></pre>
|
582
|
+
</div>
|
583
|
+
</div>
|
584
|
+
|
585
|
+
|
586
|
+
</div>
|
587
|
+
|
588
|
+
<div id="method-i-date1904" class="method-detail ">
|
589
|
+
<div class="method-heading">
|
590
|
+
<span class="method-name">date1904</span><span
|
591
|
+
class="method-args">()</span>
|
592
|
+
<span class="method-click-advice">click to toggle source</span>
|
593
|
+
</div>
|
594
|
+
|
595
|
+
<div class="method-description">
|
362
596
|
|
363
|
-
|
364
|
-
|
365
|
-
<span class="ruby-
|
366
|
-
|
597
|
+
|
598
|
+
<div class="method-source-code" id="date1904-source">
|
599
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 562</span>
|
600
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">date1904</span>
|
601
|
+
<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>
|
367
602
|
<span class="ruby-keyword">end</span></pre>
|
368
603
|
</div>
|
604
|
+
</div>
|
605
|
+
|
606
|
+
|
607
|
+
</div>
|
608
|
+
|
609
|
+
<div id="method-i-date1904-3D" class="method-detail ">
|
610
|
+
<div class="method-heading">
|
611
|
+
<span class="method-name">date1904=</span><span
|
612
|
+
class="method-args">(v)</span>
|
613
|
+
<span class="method-click-advice">click to toggle source</span>
|
614
|
+
</div>
|
615
|
+
|
616
|
+
<div class="method-description">
|
369
617
|
|
618
|
+
|
619
|
+
<div class="method-source-code" id="date1904-3D-source">
|
620
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 566</span>
|
621
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">date1904=</span>(<span class="ruby-identifier">v</span>)
|
622
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">workbook_properties</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkbookProperties</span>.<span class="ruby-identifier">new</span>
|
623
|
+
<span class="ruby-identifier">workbook_properties</span>.<span class="ruby-identifier">date1904</span> = <span class="ruby-identifier">v</span>
|
624
|
+
<span class="ruby-keyword">end</span></pre>
|
625
|
+
</div>
|
370
626
|
</div>
|
371
627
|
|
372
|
-
|
373
628
|
|
374
|
-
|
375
629
|
</div>
|
376
630
|
|
377
|
-
|
378
631
|
<div id="method-i-date_to_num" class="method-detail ">
|
379
|
-
|
380
632
|
<div class="method-heading">
|
381
633
|
<span class="method-name">date_to_num</span><span
|
382
634
|
class="method-args">(date)</span>
|
383
|
-
|
384
635
|
<span class="method-click-advice">click to toggle source</span>
|
385
|
-
|
386
636
|
</div>
|
387
|
-
|
388
637
|
|
389
638
|
<div class="method-description">
|
390
639
|
|
640
|
+
|
641
|
+
<div class="method-source-code" id="date_to_num-source">
|
642
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 422</span>
|
643
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">date_to_num</span>(<span class="ruby-identifier">date</span>)
|
644
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">date</span>
|
645
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Date</span>, <span class="ruby-constant">DateTime</span> <span class="ruby-keyword">then</span> (<span class="ruby-identifier">date</span>.<span class="ruby-identifier">ajd</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">base_date</span>.<span class="ruby-identifier">ajd</span>).<span class="ruby-identifier">to_f</span>
|
646
|
+
<span class="ruby-keyword">when</span> <span class="ruby-constant">Time</span> <span class="ruby-keyword">then</span> ((<span class="ruby-identifier">date</span>.<span class="ruby-identifier">to_r</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">base_date</span>.<span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_r</span>) <span class="ruby-operator">/</span> <span class="ruby-value">86400</span>).<span class="ruby-identifier">to_f</span>
|
647
|
+
<span class="ruby-keyword">end</span>
|
648
|
+
<span class="ruby-keyword">end</span></pre>
|
649
|
+
</div>
|
650
|
+
</div>
|
651
|
+
|
652
|
+
|
653
|
+
</div>
|
654
|
+
|
655
|
+
<div id="method-i-modified_at" class="method-detail ">
|
656
|
+
<div class="method-heading">
|
657
|
+
<span class="method-name">modified_at</span><span
|
658
|
+
class="method-args">()</span>
|
659
|
+
<span class="method-click-advice">click to toggle source</span>
|
660
|
+
</div>
|
661
|
+
|
662
|
+
<div class="method-description">
|
391
663
|
|
664
|
+
|
665
|
+
<div class="method-source-code" id="modified_at-source">
|
666
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 511</span>
|
667
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modified_at</span>
|
668
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modified_at</span>
|
669
|
+
<span class="ruby-keyword">end</span></pre>
|
670
|
+
</div>
|
671
|
+
</div>
|
672
|
+
|
673
|
+
|
674
|
+
</div>
|
675
|
+
|
676
|
+
<div id="method-i-modified_at-3D" class="method-detail ">
|
677
|
+
<div class="method-heading">
|
678
|
+
<span class="method-name">modified_at=</span><span
|
679
|
+
class="method-args">(v)</span>
|
680
|
+
<span class="method-click-advice">click to toggle source</span>
|
681
|
+
</div>
|
682
|
+
|
683
|
+
<div class="method-description">
|
392
684
|
|
393
|
-
|
394
685
|
|
686
|
+
<div class="method-source-code" id="modified_at-3D-source">
|
687
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 515</span>
|
688
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modified_at=</span>(<span class="ruby-identifier">v</span>)
|
689
|
+
<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>
|
690
|
+
<span class="ruby-keyword">end</span></pre>
|
691
|
+
</div>
|
692
|
+
</div>
|
693
|
+
|
694
|
+
|
695
|
+
</div>
|
696
|
+
|
697
|
+
<div id="method-i-modifier" class="method-detail ">
|
698
|
+
<div class="method-heading">
|
699
|
+
<span class="method-name">modifier</span><span
|
700
|
+
class="method-args">()</span>
|
701
|
+
<span class="method-click-advice">click to toggle source</span>
|
702
|
+
</div>
|
703
|
+
|
704
|
+
<div class="method-description">
|
395
705
|
|
396
|
-
|
397
|
-
|
398
|
-
<span class="ruby-
|
399
|
-
|
706
|
+
|
707
|
+
<div class="method-source-code" id="modifier-source">
|
708
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 554</span>
|
709
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modifier</span>
|
710
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">core_properties</span>.<span class="ruby-identifier">modifier</span>
|
400
711
|
<span class="ruby-keyword">end</span></pre>
|
401
712
|
</div>
|
713
|
+
</div>
|
714
|
+
|
715
|
+
|
716
|
+
</div>
|
717
|
+
|
718
|
+
<div id="method-i-modifier-3D" class="method-detail ">
|
719
|
+
<div class="method-heading">
|
720
|
+
<span class="method-name">modifier=</span><span
|
721
|
+
class="method-args">(v)</span>
|
722
|
+
<span class="method-click-advice">click to toggle source</span>
|
723
|
+
</div>
|
724
|
+
|
725
|
+
<div class="method-description">
|
402
726
|
|
727
|
+
|
728
|
+
<div class="method-source-code" id="modifier-3D-source">
|
729
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 558</span>
|
730
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">modifier=</span>(<span class="ruby-identifier">v</span>)
|
731
|
+
<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>
|
732
|
+
<span class="ruby-keyword">end</span></pre>
|
733
|
+
</div>
|
403
734
|
</div>
|
404
735
|
|
405
|
-
|
406
736
|
|
407
|
-
|
408
737
|
</div>
|
409
738
|
|
410
|
-
|
411
739
|
<div id="method-i-num_to_date" class="method-detail ">
|
412
|
-
|
413
740
|
<div class="method-heading">
|
414
741
|
<span class="method-name">num_to_date</span><span
|
415
742
|
class="method-args">(num)</span>
|
416
|
-
|
417
743
|
<span class="method-click-advice">click to toggle source</span>
|
418
|
-
|
419
744
|
</div>
|
420
|
-
|
421
745
|
|
422
746
|
<div class="method-description">
|
423
747
|
|
424
|
-
|
425
|
-
|
426
|
-
|
427
748
|
|
428
|
-
|
429
749
|
<div class="method-source-code" id="num_to_date-source">
|
430
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
431
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">num_to_date</span>(<span class="ruby-identifier">num</span>)
|
750
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 429</span>
|
751
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">num_to_date</span>(<span class="ruby-identifier">num</span>)
|
752
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">num</span>.<span class="ruby-identifier">nil?</span>
|
753
|
+
|
432
754
|
<span class="ruby-comment"># Bug-for-bug Excel compatibility (https://support.microsoft.com/kb/214058/)</span>
|
433
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">num</span> <span class="ruby-operator">&
|
755
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">num</span> <span class="ruby-operator"><</span> <span class="ruby-constant">MARCH_1_1900</span> <span class="ruby-keyword">then</span>
|
434
756
|
<span class="ruby-identifier">num</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <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>
|
435
757
|
<span class="ruby-keyword">end</span>
|
436
758
|
|
437
|
-
<span class="ruby-identifier">
|
759
|
+
<span class="ruby-identifier">dateparts</span> = <span class="ruby-identifier">num</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-value">1</span>)
|
760
|
+
<span class="ruby-identifier">base_date</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">dateparts</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+</span> (<span class="ruby-identifier">dateparts</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">*</span> <span class="ruby-value">86400</span>).<span class="ruby-identifier">round</span>(<span class="ruby-value">6</span>) <span class="ruby-operator">/</span> <span class="ruby-value">86400</span>)
|
438
761
|
<span class="ruby-keyword">end</span></pre>
|
439
762
|
</div>
|
440
|
-
|
441
763
|
</div>
|
442
764
|
|
443
|
-
|
444
765
|
|
445
|
-
|
446
766
|
</div>
|
447
767
|
|
448
|
-
|
449
768
|
<div id="method-i-related_objects" class="method-detail ">
|
450
|
-
|
451
769
|
<div class="method-heading">
|
452
770
|
<span class="method-name">related_objects</span><span
|
453
771
|
class="method-args">()</span>
|
454
|
-
|
455
772
|
<span class="method-click-advice">click to toggle source</span>
|
456
|
-
|
457
773
|
</div>
|
458
|
-
|
459
774
|
|
460
775
|
<div class="method-description">
|
461
776
|
|
462
|
-
|
463
|
-
|
464
|
-
|
465
777
|
|
466
|
-
|
467
778
|
<div class="method-source-code" id="related_objects-source">
|
468
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
469
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">related_objects</span>
|
779
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 320</span>
|
780
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">related_objects</span>
|
470
781
|
[ <span class="ruby-identifier">calculation_chain</span>, <span class="ruby-identifier">stylesheet</span>, <span class="ruby-identifier">theme</span>, <span class="ruby-identifier">shared_strings_container</span>, <span class="ruby-identifier">macros</span> ] <span class="ruby-operator">+</span> <span class="ruby-ivar">@worksheets</span>
|
471
782
|
<span class="ruby-keyword">end</span></pre>
|
472
783
|
</div>
|
473
|
-
|
474
784
|
</div>
|
475
785
|
|
476
|
-
|
477
786
|
|
478
|
-
|
479
787
|
</div>
|
480
788
|
|
481
|
-
|
482
789
|
<div id="method-i-save" class="method-detail ">
|
483
|
-
|
484
790
|
<div class="method-heading">
|
485
791
|
<span class="method-name">save</span><span
|
486
792
|
class="method-args">(dst_file_path = nil)</span>
|
487
|
-
|
488
793
|
<span class="method-click-advice">click to toggle source</span>
|
489
|
-
|
490
794
|
</div>
|
491
|
-
|
492
795
|
|
493
796
|
<div class="method-description">
|
494
|
-
|
495
797
|
<p>Save the resulting XLSX file to the specified location</p>
|
496
|
-
|
497
|
-
|
498
798
|
|
499
|
-
|
500
799
|
<div class="method-source-code" id="save-source">
|
501
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
502
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">dst_file_path</span> = <span class="ruby-keyword">nil</span>)
|
800
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 398</span>
|
801
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">save</span>(<span class="ruby-identifier">dst_file_path</span> = <span class="ruby-keyword">nil</span>)
|
503
802
|
<span class="ruby-identifier">dst_file_path</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">root</span>.<span class="ruby-identifier">source_file_path</span>
|
504
803
|
|
505
804
|
<span class="ruby-identifier">extension</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">dst_file_path</span>)
|
506
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-node">%w{.xlsx .xlsm}</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">extension</span>.<span class="ruby-identifier">downcase</span>)
|
507
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unsupported extension: #{extension} (only .xlsx and .
|
805
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-node">%w{.xlsx .xlsm .xltx .xltm}</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">extension</span>.<span class="ruby-identifier">downcase</span>)
|
806
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"Unsupported extension: #{extension} (only .xlsx, .xlsm, .xltx and .xltm files are supported)."</span>
|
508
807
|
<span class="ruby-keyword">end</span>
|
509
808
|
|
510
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dst_file_path</span>, <span class="ruby-string"
|
809
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dst_file_path</span>, <span class="ruby-string">'wb'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">output_file</span><span class="ruby-operator">|</span> <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_stream</span>(<span class="ruby-identifier">root</span>.<span class="ruby-identifier">stream</span>, <span class="ruby-identifier">output_file</span>) }
|
511
810
|
|
512
811
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">dst_file_path</span>
|
513
812
|
<span class="ruby-keyword">end</span></pre>
|
514
813
|
</div>
|
515
|
-
|
516
814
|
</div>
|
517
815
|
|
518
|
-
|
519
816
|
<div class="aliases">
|
520
817
|
Also aliased as: <a href="Workbook.html#method-i-write">write</a>
|
521
818
|
</div>
|
522
|
-
|
523
819
|
|
524
|
-
|
525
820
|
</div>
|
526
821
|
|
527
|
-
|
528
822
|
<div id="method-i-stream" class="method-detail ">
|
529
|
-
|
530
823
|
<div class="method-heading">
|
531
824
|
<span class="method-name">stream</span><span
|
532
825
|
class="method-args">()</span>
|
533
|
-
|
534
826
|
<span class="method-click-advice">click to toggle source</span>
|
535
|
-
|
536
827
|
</div>
|
537
|
-
|
538
828
|
|
539
829
|
<div class="method-description">
|
540
|
-
|
541
830
|
<p>Return the resulting XLSX file in a stream (useful for sending over HTTP)</p>
|
542
|
-
|
543
|
-
|
544
831
|
|
545
|
-
|
546
832
|
<div class="method-source-code" id="stream-source">
|
547
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
548
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">stream</span>
|
833
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 393</span>
|
834
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">stream</span>
|
549
835
|
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">stream</span>
|
550
836
|
<span class="ruby-keyword">end</span></pre>
|
551
837
|
</div>
|
552
|
-
|
553
838
|
</div>
|
554
839
|
|
555
|
-
|
556
840
|
|
557
|
-
|
558
841
|
</div>
|
559
842
|
|
560
|
-
|
561
843
|
<div id="method-i-write" class="method-detail method-alias">
|
562
|
-
|
563
844
|
<div class="method-heading">
|
564
845
|
<span class="method-name">write</span><span
|
565
846
|
class="method-args">(dst_file_path = nil)</span>
|
566
|
-
|
567
847
|
</div>
|
568
|
-
|
569
848
|
|
570
849
|
<div class="method-description">
|
571
850
|
|
572
|
-
|
573
|
-
|
574
|
-
|
575
851
|
|
576
|
-
|
577
852
|
</div>
|
578
853
|
|
579
|
-
|
580
854
|
|
581
|
-
|
582
855
|
<div class="aliases">
|
583
856
|
Alias for: <a href="Workbook.html#method-i-save">save</a>
|
584
857
|
</div>
|
585
|
-
|
586
858
|
</div>
|
587
859
|
|
588
|
-
|
589
860
|
<div id="method-i-xlsx_path" class="method-detail ">
|
590
|
-
|
591
861
|
<div class="method-heading">
|
592
862
|
<span class="method-name">xlsx_path</span><span
|
593
863
|
class="method-args">()</span>
|
594
|
-
|
595
864
|
<span class="method-click-advice">click to toggle source</span>
|
596
|
-
|
597
865
|
</div>
|
598
|
-
|
599
866
|
|
600
867
|
<div class="method-description">
|
601
868
|
|
602
|
-
|
603
|
-
|
604
|
-
|
605
869
|
|
606
|
-
|
607
870
|
<div class="method-source-code" id="xlsx_path-source">
|
608
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line
|
609
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">xlsx_path</span>
|
871
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 388</span>
|
872
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">xlsx_path</span>
|
610
873
|
<span class="ruby-constant">ROOT</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">'xl'</span>, <span class="ruby-string">'workbook.xml'</span>)
|
611
874
|
<span class="ruby-keyword">end</span></pre>
|
612
875
|
</div>
|
613
|
-
|
614
876
|
</div>
|
615
877
|
|
616
|
-
|
617
878
|
|
618
|
-
|
619
879
|
</div>
|
620
880
|
|
621
|
-
|
622
881
|
</section>
|
623
|
-
|
882
|
+
|
624
883
|
</section>
|
625
884
|
</main>
|
626
885
|
|
627
886
|
|
628
887
|
<footer id="validator-badges" role="contentinfo">
|
629
|
-
<p><a href="
|
630
|
-
<p>Generated by <a href="https://
|
888
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
889
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.
|
631
890
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
632
891
|
</footer>
|
633
892
|
|