rubyXL-ptr 3.3.27
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 +7 -0
- data/Gemfile +17 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +229 -0
- data/Rakefile +103 -0
- data/VERSION +1 -0
- data/lib/rubyXL.rb +12 -0
- data/lib/rubyXL/cell.rb +54 -0
- data/lib/rubyXL/convenience_methods.rb +1122 -0
- data/lib/rubyXL/objects/border.rb +74 -0
- data/lib/rubyXL/objects/calculation_chain.rb +31 -0
- data/lib/rubyXL/objects/cell_style.rb +65 -0
- data/lib/rubyXL/objects/chartsheet.rb +92 -0
- data/lib/rubyXL/objects/color.rb +27 -0
- data/lib/rubyXL/objects/column_range.rb +92 -0
- data/lib/rubyXL/objects/comments.rb +47 -0
- data/lib/rubyXL/objects/container_nodes.rb +135 -0
- data/lib/rubyXL/objects/content_types.rb +77 -0
- data/lib/rubyXL/objects/data_validation.rb +37 -0
- data/lib/rubyXL/objects/document_properties.rb +159 -0
- data/lib/rubyXL/objects/extensions.rb +40 -0
- data/lib/rubyXL/objects/external_links.rb +85 -0
- data/lib/rubyXL/objects/fill.rb +55 -0
- data/lib/rubyXL/objects/filters.rb +120 -0
- data/lib/rubyXL/objects/font.rb +48 -0
- data/lib/rubyXL/objects/formula.rb +24 -0
- data/lib/rubyXL/objects/ooxml_object.rb +460 -0
- data/lib/rubyXL/objects/reference.rb +110 -0
- data/lib/rubyXL/objects/relationships.rb +213 -0
- data/lib/rubyXL/objects/root.rb +86 -0
- data/lib/rubyXL/objects/shared_strings.rb +70 -0
- data/lib/rubyXL/objects/sheet_common.rb +51 -0
- data/lib/rubyXL/objects/sheet_data.rb +188 -0
- data/lib/rubyXL/objects/simple_types.rb +232 -0
- data/lib/rubyXL/objects/storage.rb +182 -0
- data/lib/rubyXL/objects/stylesheet.rb +232 -0
- data/lib/rubyXL/objects/text.rb +94 -0
- data/lib/rubyXL/objects/theme.rb +1716 -0
- data/lib/rubyXL/objects/workbook.rb +464 -0
- data/lib/rubyXL/objects/worksheet.rb +748 -0
- data/lib/rubyXL/parser.rb +29 -0
- data/lib/rubyXL/worksheet.rb +105 -0
- data/rdoc/README_rdoc.html +475 -0
- data/rdoc/RubyXL.html +598 -0
- data/rdoc/RubyXL/AExtension.html +223 -0
- data/rdoc/RubyXL/AExtensionStorageArea.html +103 -0
- data/rdoc/RubyXL/ActiveX.html +182 -0
- data/rdoc/RubyXL/ActiveXBinary.html +117 -0
- data/rdoc/RubyXL/AdjustHandleList.html +106 -0
- data/rdoc/RubyXL/Alignment.html +106 -0
- data/rdoc/RubyXL/AlternateContent.html +103 -0
- data/rdoc/RubyXL/Authors.html +106 -0
- data/rdoc/RubyXL/AutoFilter.html +106 -0
- data/rdoc/RubyXL/AutoFilterColumn.html +106 -0
- data/rdoc/RubyXL/BinaryImageFile.html +122 -0
- data/rdoc/RubyXL/BodyProperties.html +106 -0
- data/rdoc/RubyXL/BooleanNode.html +103 -0
- data/rdoc/RubyXL/BooleanValue.html +103 -0
- data/rdoc/RubyXL/Border.html +275 -0
- data/rdoc/RubyXL/BorderEdge.html +189 -0
- data/rdoc/RubyXL/Borders.html +157 -0
- data/rdoc/RubyXL/Break.html +106 -0
- data/rdoc/RubyXL/BreakList.html +106 -0
- data/rdoc/RubyXL/CT_AdjPoint2D.html +106 -0
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +106 -0
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +106 -0
- data/rdoc/RubyXL/CT_Backdrop.html +106 -0
- data/rdoc/RubyXL/CT_Bevel.html +106 -0
- data/rdoc/RubyXL/CT_BiLevelEffect.html +106 -0
- data/rdoc/RubyXL/CT_BlendEffect.html +106 -0
- data/rdoc/RubyXL/CT_Blip.html +106 -0
- data/rdoc/RubyXL/CT_BlipFillProperties.html +106 -0
- data/rdoc/RubyXL/CT_BlurEffect.html +106 -0
- data/rdoc/RubyXL/CT_Camera.html +106 -0
- data/rdoc/RubyXL/CT_Color.html +106 -0
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +106 -0
- data/rdoc/RubyXL/CT_ColorMapping.html +106 -0
- data/rdoc/RubyXL/CT_ColorScheme.html +106 -0
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +106 -0
- data/rdoc/RubyXL/CT_ConnectionSite.html +106 -0
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +106 -0
- data/rdoc/RubyXL/CT_DashStop.html +106 -0
- data/rdoc/RubyXL/CT_DashStopList.html +106 -0
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +106 -0
- data/rdoc/RubyXL/CT_DuotoneEffect.html +106 -0
- data/rdoc/RubyXL/CT_EffectContainer.html +106 -0
- data/rdoc/RubyXL/CT_EffectList.html +106 -0
- data/rdoc/RubyXL/CT_EffectReference.html +106 -0
- data/rdoc/RubyXL/CT_EffectStyleItem.html +106 -0
- data/rdoc/RubyXL/CT_EffectStyleList.html +106 -0
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +106 -0
- data/rdoc/RubyXL/CT_FillEffect.html +106 -0
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +106 -0
- data/rdoc/RubyXL/CT_FillStyleList.html +106 -0
- data/rdoc/RubyXL/CT_FlatText.html +106 -0
- data/rdoc/RubyXL/CT_FontCollection.html +106 -0
- data/rdoc/RubyXL/CT_FontReference.html +106 -0
- data/rdoc/RubyXL/CT_GeomGuideList.html +106 -0
- data/rdoc/RubyXL/CT_GlowEffect.html +106 -0
- data/rdoc/RubyXL/CT_GradientFillProperties.html +106 -0
- data/rdoc/RubyXL/CT_GradientStop.html +106 -0
- data/rdoc/RubyXL/CT_GradientStopList.html +106 -0
- data/rdoc/RubyXL/CT_HSLEffect.html +106 -0
- data/rdoc/RubyXL/CT_HslColor.html +106 -0
- data/rdoc/RubyXL/CT_Hyperlink.html +106 -0
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +106 -0
- data/rdoc/RubyXL/CT_LightRig.html +106 -0
- data/rdoc/RubyXL/CT_LineEndProperties.html +106 -0
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +106 -0
- data/rdoc/RubyXL/CT_LineProperties.html +106 -0
- data/rdoc/RubyXL/CT_LineStyleList.html +106 -0
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +106 -0
- data/rdoc/RubyXL/CT_LuminanceEffect.html +106 -0
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +106 -0
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +106 -0
- data/rdoc/RubyXL/CT_Path2D.html +106 -0
- data/rdoc/RubyXL/CT_Path2DArcTo.html +106 -0
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +106 -0
- data/rdoc/RubyXL/CT_Path2DList.html +106 -0
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +106 -0
- data/rdoc/RubyXL/CT_Path2DTo.html +106 -0
- data/rdoc/RubyXL/CT_PathShadeProperties.html +106 -0
- data/rdoc/RubyXL/CT_PatternFillProperties.html +106 -0
- data/rdoc/RubyXL/CT_Point3D.html +106 -0
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +106 -0
- data/rdoc/RubyXL/CT_PresetColor.html +106 -0
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +106 -0
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +106 -0
- data/rdoc/RubyXL/CT_PresetTextShape.html +106 -0
- data/rdoc/RubyXL/CT_ReflectionEffect.html +106 -0
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +106 -0
- data/rdoc/RubyXL/CT_RelativeRect.html +106 -0
- data/rdoc/RubyXL/CT_SRgbColor.html +106 -0
- data/rdoc/RubyXL/CT_ScRgbColor.html +106 -0
- data/rdoc/RubyXL/CT_Scene3D.html +106 -0
- data/rdoc/RubyXL/CT_SchemeColor.html +106 -0
- data/rdoc/RubyXL/CT_Shape3D.html +106 -0
- data/rdoc/RubyXL/CT_ShapeStyle.html +106 -0
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +106 -0
- data/rdoc/RubyXL/CT_SphereCoords.html +106 -0
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +106 -0
- data/rdoc/RubyXL/CT_StyleMatrix.html +106 -0
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +106 -0
- data/rdoc/RubyXL/CT_SupplementalFont.html +106 -0
- data/rdoc/RubyXL/CT_SystemColor.html +106 -0
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +106 -0
- data/rdoc/RubyXL/CT_TextBlipBullet.html +106 -0
- data/rdoc/RubyXL/CT_TextCharBullet.html +106 -0
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +106 -0
- data/rdoc/RubyXL/CT_TextFont.html +106 -0
- data/rdoc/RubyXL/CT_TextListStyle.html +106 -0
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +106 -0
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +106 -0
- data/rdoc/RubyXL/CT_TextSpacing.html +106 -0
- data/rdoc/RubyXL/CT_TextTabStop.html +106 -0
- data/rdoc/RubyXL/CT_TextTabStopList.html +106 -0
- data/rdoc/RubyXL/CT_TileInfoProperties.html +106 -0
- data/rdoc/RubyXL/CT_TintEffect.html +106 -0
- data/rdoc/RubyXL/CT_Transform2D.html +106 -0
- data/rdoc/RubyXL/CT_TransformEffect.html +106 -0
- data/rdoc/RubyXL/CT_Vector3D.html +106 -0
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +106 -0
- data/rdoc/RubyXL/CalculationChain.html +176 -0
- data/rdoc/RubyXL/CalculationChainCell.html +106 -0
- data/rdoc/RubyXL/CalculationProperties.html +106 -0
- data/rdoc/RubyXL/Cell.html +558 -0
- data/rdoc/RubyXL/CellConvenienceMethods.html +1211 -0
- data/rdoc/RubyXL/CellExt.html +106 -0
- data/rdoc/RubyXL/CellSmartTag.html +106 -0
- data/rdoc/RubyXL/CellSmartTagProperty.html +106 -0
- data/rdoc/RubyXL/CellSmartTags.html +106 -0
- data/rdoc/RubyXL/CellStyle.html +106 -0
- data/rdoc/RubyXL/CellStyleXFs.html +157 -0
- data/rdoc/RubyXL/CellStyles.html +157 -0
- data/rdoc/RubyXL/CellValue.html +158 -0
- data/rdoc/RubyXL/CellWatch.html +106 -0
- data/rdoc/RubyXL/CellWatches.html +106 -0
- data/rdoc/RubyXL/CellXFs.html +161 -0
- data/rdoc/RubyXL/ChartColorsFile.html +122 -0
- data/rdoc/RubyXL/ChartFile.html +189 -0
- data/rdoc/RubyXL/ChartStyleFile.html +122 -0
- data/rdoc/RubyXL/ChartUserShapesFile.html +122 -0
- data/rdoc/RubyXL/Chartsheet.html +260 -0
- data/rdoc/RubyXL/ChartsheetPageSetup.html +106 -0
- data/rdoc/RubyXL/ChartsheetProperties.html +106 -0
- data/rdoc/RubyXL/ChartsheetProtection.html +106 -0
- data/rdoc/RubyXL/ChartsheetView.html +106 -0
- data/rdoc/RubyXL/ChartsheetViews.html +106 -0
- data/rdoc/RubyXL/Color.html +175 -0
- data/rdoc/RubyXL/ColorFilter.html +106 -0
- data/rdoc/RubyXL/ColorScale.html +106 -0
- data/rdoc/RubyXL/ColorSet.html +106 -0
- data/rdoc/RubyXL/Colors.html +106 -0
- data/rdoc/RubyXL/ColumnRange.html +245 -0
- data/rdoc/RubyXL/ColumnRanges.html +289 -0
- data/rdoc/RubyXL/Comment.html +106 -0
- data/rdoc/RubyXL/CommentList.html +106 -0
- data/rdoc/RubyXL/CommentsFile.html +197 -0
- data/rdoc/RubyXL/ConditionalFormatValue.html +106 -0
- data/rdoc/RubyXL/ConditionalFormatting.html +106 -0
- data/rdoc/RubyXL/ConditionalFormattingRule.html +106 -0
- data/rdoc/RubyXL/ContentTypeDefault.html +103 -0
- data/rdoc/RubyXL/ContentTypeOverride.html +103 -0
- data/rdoc/RubyXL/ContentTypes.html +248 -0
- data/rdoc/RubyXL/ControlPropertiesFile.html +117 -0
- data/rdoc/RubyXL/CorePropertiesFile.html +474 -0
- data/rdoc/RubyXL/CustomColor.html +106 -0
- data/rdoc/RubyXL/CustomColorList.html +106 -0
- data/rdoc/RubyXL/CustomFilter.html +106 -0
- data/rdoc/RubyXL/CustomFilters.html +106 -0
- data/rdoc/RubyXL/CustomGeometry.html +106 -0
- data/rdoc/RubyXL/CustomProperties.html +106 -0
- data/rdoc/RubyXL/CustomPropertiesFile.html +122 -0
- data/rdoc/RubyXL/CustomProperty.html +106 -0
- data/rdoc/RubyXL/CustomSheetView.html +106 -0
- data/rdoc/RubyXL/CustomSheetViews.html +106 -0
- data/rdoc/RubyXL/CustomWorkbookView.html +106 -0
- data/rdoc/RubyXL/CustomWorkbookViews.html +106 -0
- data/rdoc/RubyXL/CustomXMLFile.html +117 -0
- data/rdoc/RubyXL/DXF.html +106 -0
- data/rdoc/RubyXL/DXFs.html +106 -0
- data/rdoc/RubyXL/DataBar.html +106 -0
- data/rdoc/RubyXL/DataConsolidate.html +106 -0
- data/rdoc/RubyXL/DataConsolidationReference.html +106 -0
- data/rdoc/RubyXL/DataConsolidationReferences.html +106 -0
- data/rdoc/RubyXL/DataType.html +143 -0
- data/rdoc/RubyXL/DataValidation.html +106 -0
- data/rdoc/RubyXL/DataValidations.html +106 -0
- data/rdoc/RubyXL/DateGroupItem.html +106 -0
- data/rdoc/RubyXL/DefinedName.html +106 -0
- data/rdoc/RubyXL/DefinedNameExt.html +106 -0
- data/rdoc/RubyXL/DefinedNames.html +106 -0
- data/rdoc/RubyXL/DefinedNamesExt.html +106 -0
- data/rdoc/RubyXL/DocumentPropertiesFile.html +255 -0
- data/rdoc/RubyXL/DrawingFile.html +188 -0
- data/rdoc/RubyXL/DynamicFilter.html +106 -0
- data/rdoc/RubyXL/EmbeddedControl.html +106 -0
- data/rdoc/RubyXL/EmbeddedControls.html +106 -0
- data/rdoc/RubyXL/Extension.html +106 -0
- data/rdoc/RubyXL/ExtensionStorageArea.html +106 -0
- data/rdoc/RubyXL/Extents.html +106 -0
- data/rdoc/RubyXL/ExternalBook.html +106 -0
- data/rdoc/RubyXL/ExternalLinksFile.html +184 -0
- data/rdoc/RubyXL/ExternalReference.html +106 -0
- data/rdoc/RubyXL/ExternalReferences.html +106 -0
- data/rdoc/RubyXL/ExtraColorSchemeList.html +106 -0
- data/rdoc/RubyXL/FieldItem.html +106 -0
- data/rdoc/RubyXL/FileRecoveryProperties.html +106 -0
- data/rdoc/RubyXL/FileSharing.html +106 -0
- data/rdoc/RubyXL/FileVersion.html +106 -0
- data/rdoc/RubyXL/Fill.html +157 -0
- data/rdoc/RubyXL/Fills.html +157 -0
- data/rdoc/RubyXL/FilterContainer.html +106 -0
- data/rdoc/RubyXL/FloatNode.html +103 -0
- data/rdoc/RubyXL/FloatValue.html +103 -0
- data/rdoc/RubyXL/Font.html +184 -0
- data/rdoc/RubyXL/FontConvenienceMethods.html +603 -0
- data/rdoc/RubyXL/FontScheme.html +106 -0
- data/rdoc/RubyXL/Fonts.html +157 -0
- data/rdoc/RubyXL/Formula.html +106 -0
- data/rdoc/RubyXL/FunctionGroup.html +106 -0
- data/rdoc/RubyXL/FunctionGroups.html +106 -0
- data/rdoc/RubyXL/GenericStorageObject.html +298 -0
- data/rdoc/RubyXL/GradientFill.html +106 -0
- data/rdoc/RubyXL/HeaderFooterSettings.html +106 -0
- data/rdoc/RubyXL/Hyperlink.html +106 -0
- data/rdoc/RubyXL/HyperlinkRelFile.html +117 -0
- data/rdoc/RubyXL/Hyperlinks.html +106 -0
- data/rdoc/RubyXL/IconFilter.html +106 -0
- data/rdoc/RubyXL/IconSet.html +106 -0
- data/rdoc/RubyXL/IgnoredError.html +106 -0
- data/rdoc/RubyXL/IgnoredErrors.html +106 -0
- data/rdoc/RubyXL/IndexedColors.html +106 -0
- data/rdoc/RubyXL/InputCells.html +106 -0
- data/rdoc/RubyXL/IntegerNode.html +103 -0
- data/rdoc/RubyXL/IntegerValue.html +103 -0
- data/rdoc/RubyXL/LegacyCell.html +181 -0
- data/rdoc/RubyXL/LegacyWorksheet.html +355 -0
- data/rdoc/RubyXL/MRUColors.html +106 -0
- data/rdoc/RubyXL/MacrosFile.html +122 -0
- data/rdoc/RubyXL/MergedCell.html +106 -0
- data/rdoc/RubyXL/MergedCells.html +106 -0
- data/rdoc/RubyXL/NumFmt.html +106 -0
- data/rdoc/RubyXL/NumberFormat.html +158 -0
- data/rdoc/RubyXL/NumberFormats.html +172 -0
- data/rdoc/RubyXL/OLEObject.html +106 -0
- data/rdoc/RubyXL/OLEObjectFile.html +122 -0
- data/rdoc/RubyXL/OLEObjects.html +106 -0
- data/rdoc/RubyXL/OLESize.html +106 -0
- data/rdoc/RubyXL/OOXMLContainerObject.html +394 -0
- data/rdoc/RubyXL/OOXMLObject.html +118 -0
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +532 -0
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +564 -0
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +603 -0
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +384 -0
- data/rdoc/RubyXL/Offset.html +106 -0
- data/rdoc/RubyXL/OutlineProperties.html +106 -0
- data/rdoc/RubyXL/PageMargins.html +106 -0
- data/rdoc/RubyXL/PageSetup.html +106 -0
- data/rdoc/RubyXL/PageSetupProperties.html +106 -0
- data/rdoc/RubyXL/Pane.html +106 -0
- data/rdoc/RubyXL/Parser.html +204 -0
- data/rdoc/RubyXL/PatternFill.html +106 -0
- data/rdoc/RubyXL/PhoneticProperties.html +106 -0
- data/rdoc/RubyXL/PhoneticRun.html +106 -0
- data/rdoc/RubyXL/PivotArea.html +106 -0
- data/rdoc/RubyXL/PivotCache.html +106 -0
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +133 -0
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +122 -0
- data/rdoc/RubyXL/PivotCaches.html +106 -0
- data/rdoc/RubyXL/PivotReference.html +106 -0
- data/rdoc/RubyXL/PivotReferences.html +106 -0
- data/rdoc/RubyXL/PivotTableFile.html +133 -0
- data/rdoc/RubyXL/PivotTableSelection.html +106 -0
- data/rdoc/RubyXL/PresetGeometry.html +106 -0
- data/rdoc/RubyXL/PrintOptions.html +106 -0
- data/rdoc/RubyXL/PrinterSettingsFile.html +122 -0
- data/rdoc/RubyXL/ProtectedRange.html +106 -0
- data/rdoc/RubyXL/ProtectedRanges.html +106 -0
- data/rdoc/RubyXL/Protection.html +106 -0
- data/rdoc/RubyXL/RID.html +103 -0
- data/rdoc/RubyXL/RawOOXML.html +223 -0
- data/rdoc/RubyXL/Reference.html +640 -0
- data/rdoc/RubyXL/Relationship.html +103 -0
- data/rdoc/RubyXL/RelationshipSupport.html +419 -0
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +148 -0
- data/rdoc/RubyXL/RichText.html +159 -0
- data/rdoc/RubyXL/RichTextRun.html +157 -0
- data/rdoc/RubyXL/Row.html +439 -0
- data/rdoc/RubyXL/RowExt.html +106 -0
- data/rdoc/RubyXL/RunProperties.html +106 -0
- data/rdoc/RubyXL/Scenario.html +106 -0
- data/rdoc/RubyXL/Scenarios.html +106 -0
- data/rdoc/RubyXL/Selection.html +165 -0
- data/rdoc/RubyXL/ShapeGuide.html +106 -0
- data/rdoc/RubyXL/ShapeTextRectangle.html +106 -0
- data/rdoc/RubyXL/SharedStringsTable.html +424 -0
- data/rdoc/RubyXL/Sheet.html +106 -0
- data/rdoc/RubyXL/SheetCalculationProperties.html +106 -0
- data/rdoc/RubyXL/SheetData.html +192 -0
- data/rdoc/RubyXL/SheetDataExt.html +106 -0
- data/rdoc/RubyXL/SheetDataSet.html +106 -0
- data/rdoc/RubyXL/SheetName.html +106 -0
- data/rdoc/RubyXL/SheetNames.html +106 -0
- data/rdoc/RubyXL/Sheets.html +106 -0
- data/rdoc/RubyXL/SlicerCacheFile.html +122 -0
- data/rdoc/RubyXL/SlicerFile.html +122 -0
- data/rdoc/RubyXL/SmartTagProperties.html +106 -0
- data/rdoc/RubyXL/SmartTagType.html +106 -0
- data/rdoc/RubyXL/SmartTagTypes.html +106 -0
- data/rdoc/RubyXL/SmartTags.html +106 -0
- data/rdoc/RubyXL/SortCondition.html +106 -0
- data/rdoc/RubyXL/SortState.html +106 -0
- data/rdoc/RubyXL/Sqref.html +197 -0
- data/rdoc/RubyXL/Stop.html +106 -0
- data/rdoc/RubyXL/StringNode.html +103 -0
- data/rdoc/RubyXL/StringNodeW3C.html +197 -0
- data/rdoc/RubyXL/StringValue.html +103 -0
- data/rdoc/RubyXL/Stylesheet.html +354 -0
- data/rdoc/RubyXL/TableFile.html +122 -0
- data/rdoc/RubyXL/TableParts.html +103 -0
- data/rdoc/RubyXL/TableStyle.html +106 -0
- data/rdoc/RubyXL/TableStyles.html +106 -0
- data/rdoc/RubyXL/Text.html +216 -0
- data/rdoc/RubyXL/Theme.html +535 -0
- data/rdoc/RubyXL/ThemeElements.html +106 -0
- data/rdoc/RubyXL/ThumbnailFile.html +122 -0
- data/rdoc/RubyXL/Top10.html +106 -0
- data/rdoc/RubyXL/VMLDrawingFile.html +134 -0
- data/rdoc/RubyXL/Variant.html +106 -0
- data/rdoc/RubyXL/Vector.html +161 -0
- data/rdoc/RubyXL/VectorValue.html +103 -0
- data/rdoc/RubyXL/VisualProperties.html +106 -0
- data/rdoc/RubyXL/WebPublishObject.html +106 -0
- data/rdoc/RubyXL/WebPublishObjects.html +106 -0
- data/rdoc/RubyXL/WebPublishingItem.html +106 -0
- data/rdoc/RubyXL/WebPublishingItems.html +106 -0
- data/rdoc/RubyXL/WebPublishingProperties.html +106 -0
- data/rdoc/RubyXL/Workbook.html +633 -0
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1321 -0
- data/rdoc/RubyXL/WorkbookProperties.html +106 -0
- data/rdoc/RubyXL/WorkbookProtection.html +106 -0
- data/rdoc/RubyXL/WorkbookRoot.html +402 -0
- data/rdoc/RubyXL/WorkbookView.html +106 -0
- data/rdoc/RubyXL/WorkbookViews.html +106 -0
- data/rdoc/RubyXL/Worksheet.html +433 -0
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2861 -0
- data/rdoc/RubyXL/WorksheetDimensions.html +106 -0
- data/rdoc/RubyXL/WorksheetFormatProperties.html +103 -0
- data/rdoc/RubyXL/WorksheetProperties.html +106 -0
- data/rdoc/RubyXL/WorksheetProtection.html +106 -0
- data/rdoc/RubyXL/WorksheetView.html +106 -0
- data/rdoc/RubyXL/WorksheetViews.html +106 -0
- data/rdoc/RubyXL/XF.html +106 -0
- data/rdoc/created.rid +38 -0
- data/rdoc/css/fonts.css +167 -0
- data/rdoc/css/rdoc.css +590 -0
- data/rdoc/fonts/Lato-Light.ttf +0 -0
- data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +796 -0
- data/rdoc/js/darkfish.js +161 -0
- data/rdoc/js/jquery.js +4 -0
- data/rdoc/js/navigation.js +142 -0
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +109 -0
- data/rdoc/js/search_index.js +1 -0
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +229 -0
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +2758 -0
- data/rubyXL.gemspec +516 -0
- data/spec/lib/cell_spec.rb +515 -0
- data/spec/lib/color_spec.rb +13 -0
- data/spec/lib/parser_spec.rb +118 -0
- data/spec/lib/reference_spec.rb +28 -0
- data/spec/lib/stylesheet_spec.rb +28 -0
- data/spec/lib/text_spec.rb +29 -0
- data/spec/lib/workbook_spec.rb +174 -0
- data/spec/lib/worksheet_spec.rb +1363 -0
- data/spec/spec_helper.rb +11 -0
- data/test/input/.gitkeep +0 -0
- data/test/output/.gitkeep +0 -0
- data/test/test_parse_write.rb +15 -0
- data/tmp/.gitignore +1 -0
- metadata +615 -0
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class RubyXL::Workbook - rubyXL 3.3.27</title>
|
|
8
|
+
|
|
9
|
+
<script type="text/javascript">
|
|
10
|
+
var rdoc_rel_prefix = "../";
|
|
11
|
+
var index_rel_prefix = "../";
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<script src="../js/jquery.js"></script>
|
|
15
|
+
<script src="../js/darkfish.js"></script>
|
|
16
|
+
|
|
17
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
|
18
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<body id="top" role="document" class="class">
|
|
23
|
+
<nav role="navigation">
|
|
24
|
+
<div id="project-navigation">
|
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
|
26
|
+
<h2>
|
|
27
|
+
<a href="../index.html" rel="home">Home</a>
|
|
28
|
+
</h2>
|
|
29
|
+
|
|
30
|
+
<div id="table-of-contents-navigation">
|
|
31
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
|
32
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
|
33
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
39
|
+
<div id="search-field-wrapper">
|
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
|
47
|
+
aria-busy="false" aria-expanded="false"
|
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
49
|
+
</form>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<div id="class-metadata">
|
|
57
|
+
|
|
58
|
+
<div id="parent-class-section" class="nav-section">
|
|
59
|
+
<h3>Parent</h3>
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
<p class="link"><a href="OOXMLTopLevelObject.html">RubyXL::OOXMLTopLevelObject</a>
|
|
63
|
+
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div id="includes-section" class="nav-section">
|
|
67
|
+
<h3>Included Modules</h3>
|
|
68
|
+
|
|
69
|
+
<ul class="link-list">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<li><a class="include" href="RelationshipSupport.html">RubyXL::RelationshipSupport</a>
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<li><span class="include">Enumerable</span>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<li><a class="include" href="WorkbookConvenienceMethods.html">RubyXL::WorkbookConvenienceMethods</a>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
</ul>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<!-- Method Quickref -->
|
|
88
|
+
<div id="method-list-section" class="nav-section">
|
|
89
|
+
<h3>Methods</h3>
|
|
90
|
+
|
|
91
|
+
<ul class="link-list" role="directory">
|
|
92
|
+
|
|
93
|
+
<li class="calls-super" ><a href="#method-c-new">::new</a>
|
|
94
|
+
|
|
95
|
+
<li ><a href="#method-i-before_write_xml">#before_write_xml</a>
|
|
96
|
+
|
|
97
|
+
<li ><a href="#method-i-content_type">#content_type</a>
|
|
98
|
+
|
|
99
|
+
<li ><a href="#method-i-date_to_num">#date_to_num</a>
|
|
100
|
+
|
|
101
|
+
<li ><a href="#method-i-num_to_date">#num_to_date</a>
|
|
102
|
+
|
|
103
|
+
<li ><a href="#method-i-related_objects">#related_objects</a>
|
|
104
|
+
|
|
105
|
+
<li ><a href="#method-i-save">#save</a>
|
|
106
|
+
|
|
107
|
+
<li ><a href="#method-i-stream">#stream</a>
|
|
108
|
+
|
|
109
|
+
<li ><a href="#method-i-write">#write</a>
|
|
110
|
+
|
|
111
|
+
<li ><a href="#method-i-xlsx_path">#xlsx_path</a>
|
|
112
|
+
|
|
113
|
+
</ul>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
</nav>
|
|
118
|
+
|
|
119
|
+
<main role="main" aria-labelledby="class-RubyXL::Workbook">
|
|
120
|
+
<h1 id="class-RubyXL::Workbook" class="class">
|
|
121
|
+
class RubyXL::Workbook
|
|
122
|
+
</h1>
|
|
123
|
+
|
|
124
|
+
<section class="description">
|
|
125
|
+
|
|
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>
|
|
128
|
+
|
|
129
|
+
</section>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<section class="constants-list">
|
|
141
|
+
<header>
|
|
142
|
+
<h3>Constants</h3>
|
|
143
|
+
</header>
|
|
144
|
+
<dl>
|
|
145
|
+
|
|
146
|
+
<dt id="APPLICATION">APPLICATION
|
|
147
|
+
|
|
148
|
+
<dd>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<dt id="APPVERSION">APPVERSION
|
|
152
|
+
|
|
153
|
+
<dd>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<dt id="CONTENT_TYPE">CONTENT_TYPE
|
|
157
|
+
|
|
158
|
+
<dd>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<dt id="CONTENT_TYPE_WITH_MACROS">CONTENT_TYPE_WITH_MACROS
|
|
162
|
+
|
|
163
|
+
<dd>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<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
|
+
|
|
172
|
+
<dt id="DATE1904">DATE1904
|
|
173
|
+
|
|
174
|
+
<dd>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<dt id="MARCH_1_1900">MARCH_1_1900
|
|
178
|
+
|
|
179
|
+
<dd>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<dt id="REL_TYPE">REL_TYPE
|
|
183
|
+
|
|
184
|
+
<dd>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<dt id="SHEET_NAME_FORBIDDEN_CHARS">SHEET_NAME_FORBIDDEN_CHARS
|
|
188
|
+
|
|
189
|
+
<dd><p><a
|
|
190
|
+
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>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
</dl>
|
|
194
|
+
</section>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
<section class="attribute-method-details" class="method-section">
|
|
199
|
+
<header>
|
|
200
|
+
<h3>Attributes</h3>
|
|
201
|
+
</header>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<div id="attribute-i-worksheets" class="method-detail">
|
|
205
|
+
<div class="method-heading attribute-method-heading">
|
|
206
|
+
<span class="method-name">worksheets</span><span
|
|
207
|
+
class="attribute-access-type">[RW]</span>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<div class="method-description">
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
</section>
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
|
222
|
+
<header>
|
|
223
|
+
<h3>Public Class Methods</h3>
|
|
224
|
+
</header>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<div id="method-c-new" class="method-detail ">
|
|
228
|
+
|
|
229
|
+
<div class="method-heading">
|
|
230
|
+
<span class="method-name">new</span><span
|
|
231
|
+
class="method-args">(worksheets = [], src_file_path = nil, creator = nil, modifier = nil, created_at = nil, company = '', application = APPLICATION, appversion = APPVERSION, date1904 = 0)</span>
|
|
232
|
+
|
|
233
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
234
|
+
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
<div class="method-description">
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
<div class="method-calls-super">
|
|
244
|
+
Calls superclass method
|
|
245
|
+
<a href="OOXMLObjectInstanceMethods.html#method-c-new">RubyXL::OOXMLObjectInstanceMethods.new</a>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<div class="method-source-code" id="new-source">
|
|
251
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 432</span>
|
|
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>)
|
|
254
|
+
<span class="ruby-keyword">super</span>()
|
|
255
|
+
|
|
256
|
+
<span class="ruby-comment"># Order of sheets in the +worksheets+ array corresponds to the order of pages in Excel UI.</span>
|
|
257
|
+
<span class="ruby-comment"># SheetId's, rId's, etc. are completely unrelated to ordering.</span>
|
|
258
|
+
<span class="ruby-ivar">@worksheets</span> = <span class="ruby-identifier">worksheets</span>
|
|
259
|
+
<span class="ruby-identifier">add_worksheet</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@worksheets</span>.<span class="ruby-identifier">empty?</span>
|
|
260
|
+
|
|
261
|
+
<span class="ruby-ivar">@theme</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Theme</span>.<span class="ruby-identifier">default</span>
|
|
262
|
+
<span class="ruby-ivar">@shared_strings_container</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">SharedStringsTable</span>.<span class="ruby-identifier">new</span>
|
|
263
|
+
<span class="ruby-ivar">@stylesheet</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Stylesheet</span>.<span class="ruby-identifier">default</span>
|
|
264
|
+
<span class="ruby-ivar">@relationship_container</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">OOXMLRelationshipsFile</span>.<span class="ruby-identifier">new</span>
|
|
265
|
+
<span class="ruby-ivar">@root</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkbookRoot</span>.<span class="ruby-identifier">default</span>
|
|
266
|
+
<span class="ruby-ivar">@root</span>.<span class="ruby-identifier">workbook</span> = <span class="ruby-keyword">self</span>
|
|
267
|
+
<span class="ruby-ivar">@root</span>.<span class="ruby-identifier">source_file_path</span> = <span class="ruby-identifier">src_file_path</span>
|
|
268
|
+
|
|
269
|
+
<span class="ruby-identifier">creation_time</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">created_at</span>) <span class="ruby-keyword">rescue</span> <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">now</span>
|
|
270
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">created_at</span> = <span class="ruby-identifier">creation_time</span>
|
|
271
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">modified_at</span> = <span class="ruby-identifier">creation_time</span>
|
|
272
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">company</span> = <span class="ruby-identifier">company</span>
|
|
273
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">application</span> = <span class="ruby-identifier">application</span>
|
|
274
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">appversion</span> = <span class="ruby-identifier">appversion</span>
|
|
275
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">creator</span> = <span class="ruby-identifier">creator</span>
|
|
276
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">modifier</span> = <span class="ruby-identifier">modifier</span>
|
|
277
|
+
<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>
|
|
278
|
+
<span class="ruby-keyword">end</span></pre>
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
</div>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
</section>
|
|
290
|
+
|
|
291
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
292
|
+
<header>
|
|
293
|
+
<h3>Public Instance Methods</h3>
|
|
294
|
+
</header>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
<div id="method-i-before_write_xml" class="method-detail ">
|
|
298
|
+
|
|
299
|
+
<div class="method-heading">
|
|
300
|
+
<span class="method-name">before_write_xml</span><span
|
|
301
|
+
class="method-args">()</span>
|
|
302
|
+
|
|
303
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
304
|
+
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
<div class="method-description">
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
<div class="method-source-code" id="before_write_xml-source">
|
|
316
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 361</span>
|
|
317
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">before_write_xml</span>
|
|
318
|
+
<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
|
+
|
|
320
|
+
<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>
|
|
321
|
+
|
|
322
|
+
<span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">sheet</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
|
323
|
+
<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
|
+
|
|
325
|
+
<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>
|
|
326
|
+
|
|
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> =<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>
|
|
328
|
+
<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>),
|
|
329
|
+
<span class="ruby-value">:state</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sheet</span>.<span class="ruby-identifier">state</span>,
|
|
330
|
+
<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
|
+
}
|
|
332
|
+
|
|
333
|
+
<span class="ruby-keyword">true</span>
|
|
334
|
+
<span class="ruby-keyword">end</span></pre>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
<div id="method-i-content_type" class="method-detail ">
|
|
346
|
+
|
|
347
|
+
<div class="method-heading">
|
|
348
|
+
<span class="method-name">content_type</span><span
|
|
349
|
+
class="method-args">()</span>
|
|
350
|
+
|
|
351
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
352
|
+
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
<div class="method-description">
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
<div class="method-source-code" id="content_type-source">
|
|
364
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 311</span>
|
|
365
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">content_type</span>
|
|
366
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">macros</span> <span class="ruby-keyword">then</span> <span class="ruby-constant">CONTENT_TYPE_WITH_MACROS</span> <span class="ruby-keyword">else</span> <span class="ruby-constant">CONTENT_TYPE</span> <span class="ruby-keyword">end</span>
|
|
367
|
+
<span class="ruby-keyword">end</span></pre>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
<div id="method-i-date_to_num" class="method-detail ">
|
|
379
|
+
|
|
380
|
+
<div class="method-heading">
|
|
381
|
+
<span class="method-name">date_to_num</span><span
|
|
382
|
+
class="method-args">(date)</span>
|
|
383
|
+
|
|
384
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
385
|
+
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
<div class="method-description">
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
<div class="method-source-code" id="date_to_num-source">
|
|
397
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 414</span>
|
|
398
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">date_to_num</span>(<span class="ruby-identifier">date</span>)
|
|
399
|
+
<span class="ruby-identifier">date</span> <span class="ruby-operator">&&</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>
|
|
400
|
+
<span class="ruby-keyword">end</span></pre>
|
|
401
|
+
</div>
|
|
402
|
+
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
<div id="method-i-num_to_date" class="method-detail ">
|
|
412
|
+
|
|
413
|
+
<div class="method-heading">
|
|
414
|
+
<span class="method-name">num_to_date</span><span
|
|
415
|
+
class="method-args">(num)</span>
|
|
416
|
+
|
|
417
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
418
|
+
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
<div class="method-description">
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
<div class="method-source-code" id="num_to_date-source">
|
|
430
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 418</span>
|
|
431
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">num_to_date</span>(<span class="ruby-identifier">num</span>)
|
|
432
|
+
<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">&&</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
|
+
<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
|
+
<span class="ruby-keyword">end</span>
|
|
436
|
+
|
|
437
|
+
<span class="ruby-identifier">num</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">base_date</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">num</span>)
|
|
438
|
+
<span class="ruby-keyword">end</span></pre>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
</div>
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
<div id="method-i-related_objects" class="method-detail ">
|
|
450
|
+
|
|
451
|
+
<div class="method-heading">
|
|
452
|
+
<span class="method-name">related_objects</span><span
|
|
453
|
+
class="method-args">()</span>
|
|
454
|
+
|
|
455
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
456
|
+
|
|
457
|
+
</div>
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
<div class="method-description">
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
<div class="method-source-code" id="related_objects-source">
|
|
468
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 315</span>
|
|
469
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">related_objects</span>
|
|
470
|
+
[ <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
|
+
<span class="ruby-keyword">end</span></pre>
|
|
472
|
+
</div>
|
|
473
|
+
|
|
474
|
+
</div>
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
<div id="method-i-save" class="method-detail ">
|
|
483
|
+
|
|
484
|
+
<div class="method-heading">
|
|
485
|
+
<span class="method-name">save</span><span
|
|
486
|
+
class="method-args">(dst_file_path = nil)</span>
|
|
487
|
+
|
|
488
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
489
|
+
|
|
490
|
+
</div>
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
<div class="method-description">
|
|
494
|
+
|
|
495
|
+
<p>Save the resulting XLSX file to the specified location</p>
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
<div class="method-source-code" id="save-source">
|
|
501
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 390</span>
|
|
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>)
|
|
503
|
+
<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
|
+
|
|
505
|
+
<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 .xlsm files are supported)."</span>
|
|
508
|
+
<span class="ruby-keyword">end</span>
|
|
509
|
+
|
|
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">"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
|
+
|
|
512
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">dst_file_path</span>
|
|
513
|
+
<span class="ruby-keyword">end</span></pre>
|
|
514
|
+
</div>
|
|
515
|
+
|
|
516
|
+
</div>
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
<div class="aliases">
|
|
520
|
+
Also aliased as: <a href="Workbook.html#method-i-write">write</a>
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
</div>
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
<div id="method-i-stream" class="method-detail ">
|
|
529
|
+
|
|
530
|
+
<div class="method-heading">
|
|
531
|
+
<span class="method-name">stream</span><span
|
|
532
|
+
class="method-args">()</span>
|
|
533
|
+
|
|
534
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
535
|
+
|
|
536
|
+
</div>
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
<div class="method-description">
|
|
540
|
+
|
|
541
|
+
<p>Return the resulting XLSX file in a stream (useful for sending over HTTP)</p>
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
<div class="method-source-code" id="stream-source">
|
|
547
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 385</span>
|
|
548
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">stream</span>
|
|
549
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">stream</span>
|
|
550
|
+
<span class="ruby-keyword">end</span></pre>
|
|
551
|
+
</div>
|
|
552
|
+
|
|
553
|
+
</div>
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
<div id="method-i-write" class="method-detail method-alias">
|
|
562
|
+
|
|
563
|
+
<div class="method-heading">
|
|
564
|
+
<span class="method-name">write</span><span
|
|
565
|
+
class="method-args">(dst_file_path = nil)</span>
|
|
566
|
+
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
<div class="method-description">
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
</div>
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
<div class="aliases">
|
|
583
|
+
Alias for: <a href="Workbook.html#method-i-save">save</a>
|
|
584
|
+
</div>
|
|
585
|
+
|
|
586
|
+
</div>
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
<div id="method-i-xlsx_path" class="method-detail ">
|
|
590
|
+
|
|
591
|
+
<div class="method-heading">
|
|
592
|
+
<span class="method-name">xlsx_path</span><span
|
|
593
|
+
class="method-args">()</span>
|
|
594
|
+
|
|
595
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
596
|
+
|
|
597
|
+
</div>
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
<div class="method-description">
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
<div class="method-source-code" id="xlsx_path-source">
|
|
608
|
+
<pre><span class="ruby-comment"># File lib/rubyXL/objects/workbook.rb, line 380</span>
|
|
609
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">xlsx_path</span>
|
|
610
|
+
<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
|
+
<span class="ruby-keyword">end</span></pre>
|
|
612
|
+
</div>
|
|
613
|
+
|
|
614
|
+
</div>
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
</div>
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
</section>
|
|
623
|
+
|
|
624
|
+
</section>
|
|
625
|
+
</main>
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
<footer id="validator-badges" role="contentinfo">
|
|
629
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
630
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.1.0.
|
|
631
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
632
|
+
</footer>
|
|
633
|
+
|