rubyXL-ptr 3.3.27
Sign up to get free protection for your applications and to get access to all the features.
- 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,748 @@
|
|
1
|
+
require 'rubyXL/objects/ooxml_object'
|
2
|
+
require 'rubyXL/objects/simple_types'
|
3
|
+
require 'rubyXL/objects/extensions'
|
4
|
+
require 'rubyXL/objects/relationships'
|
5
|
+
require 'rubyXL/objects/sheet_common'
|
6
|
+
require 'rubyXL/objects/text'
|
7
|
+
require 'rubyXL/objects/formula'
|
8
|
+
require 'rubyXL/objects/sheet_data'
|
9
|
+
require 'rubyXL/objects/column_range'
|
10
|
+
require 'rubyXL/objects/filters'
|
11
|
+
require 'rubyXL/objects/data_validation'
|
12
|
+
require 'rubyXL/objects/comments'
|
13
|
+
require 'rubyXL/worksheet'
|
14
|
+
require 'rubyXL/convenience_methods'
|
15
|
+
|
16
|
+
module RubyXL
|
17
|
+
|
18
|
+
# Eventually, the entire code for Worksheet will be moved here. One small step at a time!
|
19
|
+
|
20
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_outlinePr-1.html
|
21
|
+
class OutlineProperties < OOXMLObject
|
22
|
+
define_attribute(:applyStyles, :bool, :default => false)
|
23
|
+
define_attribute(:summaryBelow, :bool, :default => true)
|
24
|
+
define_attribute(:summaryRight, :bool, :default => true)
|
25
|
+
define_attribute(:showOutlineSymbols, :bool, :default => true)
|
26
|
+
define_element_name 'outlinePr'
|
27
|
+
end
|
28
|
+
|
29
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_pageSetUpPr-1.html
|
30
|
+
class PageSetupProperties < OOXMLObject
|
31
|
+
define_attribute(:autoPageBreaks, :bool, :default => true)
|
32
|
+
define_attribute(:fitToPage, :bool, :default => false)
|
33
|
+
define_element_name 'pageSetUpPr'
|
34
|
+
end
|
35
|
+
|
36
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_sheetPr-3.html
|
37
|
+
class WorksheetProperties < OOXMLObject
|
38
|
+
define_attribute(:syncHorizontal, :bool, :default => false)
|
39
|
+
define_attribute(:syncVertical, :bool, :default => false)
|
40
|
+
define_attribute(:syncRef, :ref)
|
41
|
+
define_attribute(:transitionEvaluation, :bool, :default => false)
|
42
|
+
define_attribute(:transitionEntry, :bool, :default => false)
|
43
|
+
define_attribute(:published, :bool, :default => true)
|
44
|
+
define_attribute(:codeName, :string)
|
45
|
+
define_attribute(:filterMode, :bool, :default => false)
|
46
|
+
define_attribute(:enableFormatConditionsCalculation, :bool, :default => true)
|
47
|
+
define_child_node(RubyXL::Color, :node_name => :tabColor)
|
48
|
+
define_child_node(RubyXL::OutlineProperties)
|
49
|
+
define_child_node(RubyXL::PageSetupProperties)
|
50
|
+
define_element_name 'sheetPr'
|
51
|
+
end
|
52
|
+
|
53
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_dimension-3.html
|
54
|
+
class WorksheetDimensions < OOXMLObject
|
55
|
+
define_attribute(:ref, :ref)
|
56
|
+
define_element_name 'dimension'
|
57
|
+
end
|
58
|
+
|
59
|
+
class WorksheetFormatProperties < OOXMLObject
|
60
|
+
define_attribute(:baseColWidth, :int, :default => 8)
|
61
|
+
define_attribute(:defaultColWidth, :double)
|
62
|
+
define_attribute(:defaultRowHeight, :double, :required => true)
|
63
|
+
define_attribute(:customHeight, :bool, :default => false)
|
64
|
+
define_attribute(:zeroHeight, :bool, :default => false)
|
65
|
+
define_attribute(:thickTop, :bool, :default => false)
|
66
|
+
define_attribute(:thickBottom, :bool, :default => false)
|
67
|
+
define_attribute(:outlineLevelRow, :int, :default => 0)
|
68
|
+
define_attribute(:outlineLevelCol, :int, :default => 0)
|
69
|
+
define_element_name 'sheetFormatPr'
|
70
|
+
end
|
71
|
+
|
72
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_pageSetup-1.html
|
73
|
+
class PageSetup < OOXMLObject
|
74
|
+
define_attribute(:paperSize, :int, :default => 1)
|
75
|
+
define_attribute(:scale, :int, :default => 100)
|
76
|
+
define_attribute(:firstPageNumber, :int, :default => 1)
|
77
|
+
define_attribute(:fitToWidth, :int, :default => 1)
|
78
|
+
define_attribute(:fitToHeight, :int, :default => 1)
|
79
|
+
define_attribute(:pageOrder, RubyXL::ST_PageOrder, :default => 'downThenOver')
|
80
|
+
define_attribute(:orientation, RubyXL::ST_Orientation, :default => 'default')
|
81
|
+
define_attribute(:usePrinterDefaults, :bool, :default => true)
|
82
|
+
define_attribute(:blackAndWhite, :bool, :default => false)
|
83
|
+
define_attribute(:draft, :bool, :default => false)
|
84
|
+
define_attribute(:cellComments, RubyXL::ST_CellComments, :default => 'none')
|
85
|
+
define_attribute(:useFirstPageNumber, :bool, :default => false)
|
86
|
+
define_attribute(:errors, RubyXL::ST_PrintError, :default => 'displayed')
|
87
|
+
define_attribute(:horizontalDpi, :int, :default => 600)
|
88
|
+
define_attribute(:verticalDpi, :int, :default => 600)
|
89
|
+
define_attribute(:copies, :int, :default => 1)
|
90
|
+
define_attribute(:'r:id', :string)
|
91
|
+
define_element_name 'pageSetup'
|
92
|
+
end
|
93
|
+
|
94
|
+
class TableParts < OOXMLContainerObject
|
95
|
+
define_child_node(RubyXL::RID, :collection => :with_count, :node_name => :tablePart)
|
96
|
+
define_element_name 'tableParts'
|
97
|
+
end
|
98
|
+
|
99
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_mergeCell-1.html
|
100
|
+
class MergedCell < OOXMLObject
|
101
|
+
define_attribute(:ref, :ref)
|
102
|
+
define_element_name 'mergeCell'
|
103
|
+
end
|
104
|
+
|
105
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_mergeCells-1.html
|
106
|
+
class MergedCells < OOXMLContainerObject
|
107
|
+
define_child_node(RubyXL::MergedCell, :collection => :with_count)
|
108
|
+
define_element_name 'mergeCells'
|
109
|
+
end
|
110
|
+
|
111
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_printOptions-1.html
|
112
|
+
class PrintOptions < OOXMLObject
|
113
|
+
define_attribute(:horizontalCentered, :bool, :default => false)
|
114
|
+
define_attribute(:verticalCentered, :bool, :default => false)
|
115
|
+
define_attribute(:headings, :bool, :default => false)
|
116
|
+
define_attribute(:gridLines, :bool, :default => false)
|
117
|
+
define_attribute(:gridLinesSet, :bool, :default => true)
|
118
|
+
define_element_name 'printOptions'
|
119
|
+
end
|
120
|
+
|
121
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_sheetCalcPr-1.html
|
122
|
+
class SheetCalculationProperties < OOXMLObject
|
123
|
+
define_attribute(:fullCalcOnLoad, :bool, :default => false)
|
124
|
+
define_element_name 'sheetCalcPr'
|
125
|
+
end
|
126
|
+
|
127
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_protectedRange-1.html
|
128
|
+
class ProtectedRange < OOXMLObject
|
129
|
+
define_attribute(:password, RubyXL::ST_UnsignedShortHex)
|
130
|
+
define_attribute(:sqref, :sqref, :required => true)
|
131
|
+
define_attribute(:name, :string, :required => true)
|
132
|
+
define_attribute(:securityDescriptor, :string)
|
133
|
+
define_element_name 'protectedRange'
|
134
|
+
end
|
135
|
+
|
136
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_protectedRanges-1.html
|
137
|
+
class ProtectedRanges < OOXMLContainerObject
|
138
|
+
define_child_node(RubyXL::ProtectedRange, :collection => true)
|
139
|
+
define_element_name 'protectedRanges'
|
140
|
+
end
|
141
|
+
|
142
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_sheetProtection-1.html
|
143
|
+
class WorksheetProtection < OOXMLObject
|
144
|
+
define_attribute(:password, RubyXL::ST_UnsignedShortHex)
|
145
|
+
define_attribute(:sheet, :bool, :default => false)
|
146
|
+
define_attribute(:objects, :bool, :default => false)
|
147
|
+
define_attribute(:scenarios, :bool, :default => false)
|
148
|
+
define_attribute(:formatCells, :bool, :default => true)
|
149
|
+
define_attribute(:formatColumns, :bool, :default => true)
|
150
|
+
define_attribute(:formatRows, :bool, :default => true)
|
151
|
+
define_attribute(:insertColumns, :bool, :default => true)
|
152
|
+
define_attribute(:insertRows, :bool, :default => true)
|
153
|
+
define_attribute(:insertHyperlinks, :bool, :default => true)
|
154
|
+
define_attribute(:deleteColumns, :bool, :default => true)
|
155
|
+
define_attribute(:deleteRows, :bool, :default => true)
|
156
|
+
define_attribute(:selectLockedCells, :bool, :default => false)
|
157
|
+
define_attribute(:sort, :bool, :default => true)
|
158
|
+
define_attribute(:autoFilter, :bool, :default => true)
|
159
|
+
define_attribute(:pivotTables, :bool, :default => true)
|
160
|
+
define_attribute(:selectUnlockedCells, :bool, :default => false)
|
161
|
+
define_element_name 'sheetProtection'
|
162
|
+
end
|
163
|
+
|
164
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cfvo-1.html
|
165
|
+
class ConditionalFormatValue < OOXMLObject
|
166
|
+
define_attribute(:type, RubyXL::ST_CfvoType, :required => true)
|
167
|
+
define_attribute(:val, :string)
|
168
|
+
define_attribute(:gte, :bool, :default => true)
|
169
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
170
|
+
define_element_name 'cfvo'
|
171
|
+
end
|
172
|
+
|
173
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_colorScale-1.html
|
174
|
+
class ColorScale < OOXMLObject
|
175
|
+
define_child_node(RubyXL::ConditionalFormatValue, :collection => true, :accessor => :cfvo)
|
176
|
+
define_child_node(RubyXL::Color)
|
177
|
+
define_element_name 'colorScale'
|
178
|
+
end
|
179
|
+
|
180
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_dataBar-1.html
|
181
|
+
class DataBar < OOXMLObject
|
182
|
+
define_attribute(:minLength, :int, :default => 10)
|
183
|
+
define_attribute(:maxLength, :int, :default => 90)
|
184
|
+
define_attribute(:showValue, :bool, :default => true)
|
185
|
+
define_child_node(RubyXL::ConditionalFormatValue, :collection => true, :accessor => :cfvo)
|
186
|
+
define_child_node(RubyXL::Color)
|
187
|
+
define_element_name 'dataBar'
|
188
|
+
end
|
189
|
+
|
190
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_iconSet-1.html
|
191
|
+
class IconSet < OOXMLObject
|
192
|
+
define_attribute(:iconSet, RubyXL::ST_IconSetType, :default => '3TrafficLights1')
|
193
|
+
define_attribute(:showValue, :bool, :default => true)
|
194
|
+
define_attribute(:percent, :bool, :default => true)
|
195
|
+
define_attribute(:reverse, :bool, :default => false)
|
196
|
+
define_child_node(RubyXL::ConditionalFormatValue, :collection => [2..-1], :accessor => :cfvo)
|
197
|
+
define_element_name 'iconSet'
|
198
|
+
end
|
199
|
+
|
200
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cfRule-1.html
|
201
|
+
class ConditionalFormattingRule < OOXMLObject
|
202
|
+
define_attribute(:type, RubyXL::ST_CfType)
|
203
|
+
define_attribute(:dxfId, :int)
|
204
|
+
define_attribute(:priority, :int, :required => true)
|
205
|
+
define_attribute(:stopIfTrue, :bool, :default => false)
|
206
|
+
define_attribute(:aboveAverage, :bool, :default => true)
|
207
|
+
define_attribute(:percent, :bool, :default => false)
|
208
|
+
define_attribute(:bottom, :bool, :default => false)
|
209
|
+
define_attribute(:operator, RubyXL::ST_ConditionalFormattingOperator)
|
210
|
+
define_attribute(:text, :string)
|
211
|
+
define_attribute(:timePeriod, RubyXL::ST_TimePeriod)
|
212
|
+
define_attribute(:rank, :int)
|
213
|
+
define_attribute(:stdDev, :int)
|
214
|
+
define_attribute(:equalAverage, :bool, :default => false)
|
215
|
+
define_child_node(RubyXL::Formula, :collection => true, :node_name => :formula, :accessor => :formulas)
|
216
|
+
define_child_node(RubyXL::ColorScale)
|
217
|
+
define_child_node(RubyXL::DataBar)
|
218
|
+
define_child_node(RubyXL::IconSet)
|
219
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
220
|
+
define_element_name 'cfRule'
|
221
|
+
end
|
222
|
+
|
223
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_brk-1.html
|
224
|
+
class Break < OOXMLObject
|
225
|
+
define_attribute(:id, :int, :default => 0)
|
226
|
+
define_attribute(:min, :int, :default => 0)
|
227
|
+
define_attribute(:max, :int, :default => 0)
|
228
|
+
define_attribute(:man, :bool, :default => false)
|
229
|
+
define_attribute(:pt, :bool, :default => false)
|
230
|
+
define_element_name 'brk'
|
231
|
+
end
|
232
|
+
|
233
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_rowBreaks-1.html
|
234
|
+
class BreakList < OOXMLContainerObject
|
235
|
+
define_attribute(:manualBreakCount, :int, :default => 0)
|
236
|
+
define_child_node(RubyXL::Break, :collection => :with_count)
|
237
|
+
end
|
238
|
+
|
239
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_conditionalFormatting-1.html
|
240
|
+
class ConditionalFormatting < OOXMLObject
|
241
|
+
define_attribute(:pivot, :bool, :default => false)
|
242
|
+
define_attribute(:sqref, :sqref)
|
243
|
+
define_child_node(RubyXL::ConditionalFormattingRule, :collection => true)
|
244
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
245
|
+
define_element_name 'conditionalFormatting'
|
246
|
+
end
|
247
|
+
|
248
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_inputCells-1.html
|
249
|
+
class InputCells < OOXMLObject
|
250
|
+
define_attribute(:r, :ref, :required => true)
|
251
|
+
define_attribute(:deleted, :bool, :default => false)
|
252
|
+
define_attribute(:undone, :bool, :default => false)
|
253
|
+
define_attribute(:val, :string, :required => true)
|
254
|
+
define_attribute(:numFmtId, :int)
|
255
|
+
define_element_name 'inputCells'
|
256
|
+
end
|
257
|
+
|
258
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_scenario-1.html
|
259
|
+
class Scenario < OOXMLContainerObject
|
260
|
+
define_attribute(:name, :string)
|
261
|
+
define_attribute(:locked, :bool, :default => false)
|
262
|
+
define_attribute(:hidden, :bool, :default => false)
|
263
|
+
define_attribute(:user, :string)
|
264
|
+
define_attribute(:comment, :string)
|
265
|
+
define_child_node(RubyXL::InputCells, :collection => :with_count)
|
266
|
+
define_element_name 'scenario'
|
267
|
+
end
|
268
|
+
|
269
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_scenarios-1.html
|
270
|
+
class Scenarios < OOXMLContainerObject
|
271
|
+
define_attribute(:current, :int)
|
272
|
+
define_attribute(:show, :int)
|
273
|
+
define_attribute(:sqref, :sqref)
|
274
|
+
define_child_node(RubyXL::Scenario, :collection => true)
|
275
|
+
define_element_name 'scenarios'
|
276
|
+
end
|
277
|
+
|
278
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_ignoredError-1.html
|
279
|
+
class IgnoredError < OOXMLObject
|
280
|
+
define_attribute(:sqref, :sqref, :required => true)
|
281
|
+
define_attribute(:pivot, :bool, :default => false)
|
282
|
+
define_attribute(:evalError, :bool, :default => false)
|
283
|
+
define_attribute(:twoDigitTextYear, :bool, :default => false)
|
284
|
+
define_attribute(:numberStoredAsText, :bool, :default => false)
|
285
|
+
define_attribute(:formula, :bool, :default => false)
|
286
|
+
define_attribute(:formulaRange, :bool, :default => false)
|
287
|
+
define_attribute(:unlockedFormula, :bool, :default => false)
|
288
|
+
define_attribute(:emptyCellReference, :bool, :default => false)
|
289
|
+
define_attribute(:listDataValidation, :bool, :default => false)
|
290
|
+
define_attribute(:calculatedColumn, :bool, :default => false)
|
291
|
+
define_element_name 'ignoredError'
|
292
|
+
end
|
293
|
+
|
294
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_ignoredErrors-1.html
|
295
|
+
class IgnoredErrors < OOXMLContainerObject
|
296
|
+
define_child_node(RubyXL::IgnoredError, :collection => true)
|
297
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
298
|
+
define_element_name 'ignoredErrors'
|
299
|
+
end
|
300
|
+
|
301
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_hyperlink-1.html
|
302
|
+
class Hyperlink < OOXMLObject
|
303
|
+
define_attribute(:ref, :ref, :required => true)
|
304
|
+
define_attribute(:'r:id', :string)
|
305
|
+
define_attribute(:location, :string)
|
306
|
+
define_attribute(:tooltip, :string)
|
307
|
+
define_attribute(:display, :string)
|
308
|
+
define_element_name 'hyperlink'
|
309
|
+
end
|
310
|
+
|
311
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_hyperlinks-1.html
|
312
|
+
class Hyperlinks < OOXMLContainerObject
|
313
|
+
define_child_node(RubyXL::Hyperlink, :collection => true)
|
314
|
+
define_element_name 'hyperlinks'
|
315
|
+
end
|
316
|
+
|
317
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_oleObject-1.html
|
318
|
+
class OLEObject < OOXMLObject
|
319
|
+
define_attribute(:progId, :string)
|
320
|
+
define_attribute(:dvAspect, RubyXL::ST_DvAspect, :default => 'DVASPECT_CONTENT')
|
321
|
+
define_attribute(:link, :string)
|
322
|
+
define_attribute(:oleUpdate, RubyXL::ST_OleUpdate)
|
323
|
+
define_attribute(:autoLoad, :bool, :default => false)
|
324
|
+
define_attribute(:shapeId, :int, :required => true)
|
325
|
+
define_attribute(:'r:id', :string)
|
326
|
+
define_element_name 'oleObject'
|
327
|
+
end
|
328
|
+
|
329
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_oleObjects-1.html
|
330
|
+
class OLEObjects < OOXMLContainerObject
|
331
|
+
define_child_node(RubyXL::OLEObject, :collection => true)
|
332
|
+
define_child_node(RubyXL::AlternateContent)
|
333
|
+
define_element_name 'oleObjects'
|
334
|
+
end
|
335
|
+
|
336
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_dataRef-1.html
|
337
|
+
class DataConsolidationReference < OOXMLObject
|
338
|
+
define_attribute(:ref, :ref)
|
339
|
+
define_attribute(:name, :string)
|
340
|
+
define_attribute(:sheet, :string)
|
341
|
+
define_attribute(:'r:id', :string)
|
342
|
+
define_element_name 'dataRef'
|
343
|
+
end
|
344
|
+
|
345
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_dataRefs-1.html
|
346
|
+
class DataConsolidationReferences < OOXMLContainerObject
|
347
|
+
define_child_node(RubyXL::DataConsolidationReference, :collection => :with_count)
|
348
|
+
define_element_name 'dataRefs'
|
349
|
+
end
|
350
|
+
|
351
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_dataConsolidate-1.html
|
352
|
+
class DataConsolidate < OOXMLObject
|
353
|
+
define_attribute(:function, RubyXL::ST_DataConsolidateFunction, :default => 'sum')
|
354
|
+
define_attribute(:leftLabels, :bool, :default => false)
|
355
|
+
define_attribute(:topLabels, :bool, :default => false)
|
356
|
+
define_attribute(:link, :bool, :default => false)
|
357
|
+
define_child_node(RubyXL::DataConsolidationReferences)
|
358
|
+
define_element_name 'dataConsolidate'
|
359
|
+
end
|
360
|
+
|
361
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_pane-1.html
|
362
|
+
class Pane < OOXMLObject
|
363
|
+
define_attribute(:xSplit, :double)
|
364
|
+
define_attribute(:ySplit, :double)
|
365
|
+
define_attribute(:topLeftCell, :string)
|
366
|
+
define_attribute(:activePane, RubyXL::ST_Pane, :default => 'topLeft', )
|
367
|
+
define_attribute(:state, RubyXL::ST_PaneState, :default=> 'split')
|
368
|
+
define_element_name 'pane'
|
369
|
+
end
|
370
|
+
|
371
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_selection-1.html
|
372
|
+
class Selection < OOXMLObject
|
373
|
+
define_attribute(:pane, RubyXL::ST_Pane)
|
374
|
+
define_attribute(:activeCell, :ref)
|
375
|
+
define_attribute(:activeCellId, :int) # 0-based index of @active_cell in @sqref
|
376
|
+
define_attribute(:sqref, :sqref) # Array of references to the selected cells.
|
377
|
+
define_element_name 'selection'
|
378
|
+
|
379
|
+
def before_write_xml
|
380
|
+
# Normally, rindex of activeCellId in sqref:
|
381
|
+
# <selection activeCell="E12" activeCellId="9" sqref="A4 B6 C8 D10 E12 A4 B6 C8 D10 E12"/>
|
382
|
+
if @active_cell_id.nil? && !@active_cell.nil? && @sqref.size > 1 then
|
383
|
+
# But, things can be more complex:
|
384
|
+
# <selection activeCell="E8" activeCellId="2" sqref="A4:B4 C6:D6 E8:F8"/>
|
385
|
+
# Not using .reverse.each here to avoid memory reallocation.
|
386
|
+
@sqref.each_with_index { |ref, ind| @active_cell_id = ind if ref.cover?(@active_cell) }
|
387
|
+
end
|
388
|
+
true
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_customSheetView-1.html
|
393
|
+
class CustomSheetView < OOXMLObject
|
394
|
+
define_attribute(:guid, :string, :required => true)
|
395
|
+
define_attribute(:scale, :int, :default => 100)
|
396
|
+
define_attribute(:colorId, :int, :default => 64)
|
397
|
+
define_attribute(:showPageBreaks, :bool, :default => false)
|
398
|
+
define_attribute(:showFormulas, :bool, :default => false)
|
399
|
+
define_attribute(:showGridLines, :bool, :default => true)
|
400
|
+
define_attribute(:showRowCol, :bool, :default => true)
|
401
|
+
define_attribute(:outlineSymbols, :bool, :default => true)
|
402
|
+
define_attribute(:zeroValues, :bool, :default => true)
|
403
|
+
define_attribute(:fitToPage, :bool, :default => false)
|
404
|
+
define_attribute(:printArea, :bool, :default => false)
|
405
|
+
define_attribute(:filter, :bool, :default => false)
|
406
|
+
define_attribute(:showAutoFilter, :bool, :default => false)
|
407
|
+
define_attribute(:hiddenRows, :bool, :default => false)
|
408
|
+
define_attribute(:hiddenColumns, :bool, :default => false)
|
409
|
+
define_attribute(:state, RubyXL::ST_Visibility, :default => 'visible')
|
410
|
+
define_attribute(:filterUnique, :bool, :default => false)
|
411
|
+
define_attribute(:view, RubyXL::ST_SheetViewType, :default => 'normal')
|
412
|
+
define_attribute(:showRuler, :bool, :default => true)
|
413
|
+
define_attribute(:topLeftCell, :ref)
|
414
|
+
define_child_node(RubyXL::Pane)
|
415
|
+
define_child_node(RubyXL::Selection)
|
416
|
+
define_child_node(RubyXL::BreakList, :node_name => :rowBreaks)
|
417
|
+
define_child_node(RubyXL::BreakList, :node_name => :colBreaks)
|
418
|
+
define_child_node(RubyXL::PageMargins)
|
419
|
+
define_child_node(RubyXL::PrintOptions)
|
420
|
+
define_child_node(RubyXL::PageSetup)
|
421
|
+
define_child_node(RubyXL::HeaderFooterSettings)
|
422
|
+
define_child_node(RubyXL::AutoFilter)
|
423
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
424
|
+
define_element_name 'customSheetView'
|
425
|
+
end
|
426
|
+
|
427
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_customSheetViews-1.html
|
428
|
+
class CustomSheetViews < OOXMLContainerObject
|
429
|
+
define_child_node(RubyXL::CustomSheetView, :collection => true)
|
430
|
+
define_element_name 'customSheetViews'
|
431
|
+
end
|
432
|
+
|
433
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_control-1.html
|
434
|
+
class EmbeddedControl < OOXMLObject
|
435
|
+
define_attribute(:shapeId, :int, :required => true)
|
436
|
+
define_attribute(:'r:id', :string, :required => true)
|
437
|
+
define_attribute(:name, :string)
|
438
|
+
define_element_name 'control'
|
439
|
+
end
|
440
|
+
|
441
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_controls-1.html
|
442
|
+
class EmbeddedControls < OOXMLContainerObject
|
443
|
+
define_child_node(RubyXL::EmbeddedControl, :collection => true)
|
444
|
+
define_child_node(RubyXL::AlternateContent)
|
445
|
+
define_element_name 'controls'
|
446
|
+
end
|
447
|
+
|
448
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cellWatch-1.html
|
449
|
+
class CellWatch < OOXMLObject
|
450
|
+
define_attribute(:r, :ref)
|
451
|
+
define_element_name 'cellWatch'
|
452
|
+
end
|
453
|
+
|
454
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cellWatches-1.html
|
455
|
+
class CellWatches < OOXMLContainerObject
|
456
|
+
define_child_node(RubyXL::CellWatch, :collection => true)
|
457
|
+
define_element_name 'cellWatches'
|
458
|
+
end
|
459
|
+
|
460
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cellSmartTagPr-1.html
|
461
|
+
class CellSmartTagProperty < OOXMLObject
|
462
|
+
define_attribute(:key, :string, :required => true)
|
463
|
+
define_attribute(:val, :string, :required => true)
|
464
|
+
define_element_name 'cellSmartTagPr'
|
465
|
+
end
|
466
|
+
|
467
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cellSmartTag-1.html
|
468
|
+
class CellSmartTag < OOXMLObject
|
469
|
+
define_attribute(:type, :int, :required => true)
|
470
|
+
define_attribute(:deleted, :bool, :default => false)
|
471
|
+
define_attribute(:xmlBased, :bool, :default => false)
|
472
|
+
define_child_node(RubyXL::CellSmartTagProperty, :collection => true, :accessor => :smart_tag_props)
|
473
|
+
define_element_name 'cellSmartTag'
|
474
|
+
end
|
475
|
+
|
476
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_cellSmartTags-1.html
|
477
|
+
class CellSmartTags < OOXMLContainerObject
|
478
|
+
define_attribute(:r, :ref, :accessor => :ref)
|
479
|
+
define_child_node(RubyXL::CellSmartTag, :collection => true)
|
480
|
+
define_element_name 'cellSmartTags'
|
481
|
+
end
|
482
|
+
|
483
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_smartTags-1.html
|
484
|
+
class SmartTags < OOXMLContainerObject
|
485
|
+
define_child_node(RubyXL::CellSmartTags, :collection => true)
|
486
|
+
define_element_name 'smartTags'
|
487
|
+
end
|
488
|
+
|
489
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_customPr-1.html
|
490
|
+
class CustomProperty < OOXMLObject
|
491
|
+
define_attribute(:name, :string, :required => true)
|
492
|
+
define_attribute(:'r:id', :string, :required => true)
|
493
|
+
define_element_name 'customPr'
|
494
|
+
end
|
495
|
+
|
496
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_customProperties-1.html
|
497
|
+
class CustomProperties < OOXMLContainerObject
|
498
|
+
define_child_node(RubyXL::CustomProperty, :collection => true)
|
499
|
+
define_element_name 'customProperties'
|
500
|
+
end
|
501
|
+
|
502
|
+
# http://www.datypic.com/sc/ooxml/t-ssml_CT_Index.html
|
503
|
+
class FieldItem < OOXMLObject
|
504
|
+
define_attribute(:v, :uint, :required => true)
|
505
|
+
define_element_name 'x'
|
506
|
+
end
|
507
|
+
|
508
|
+
# http://www.datypic.com/sc/ooxml/t-ssml_CT_PivotAreaReference.html
|
509
|
+
class PivotReference < OOXMLObject
|
510
|
+
define_attribute(:field, :uint)
|
511
|
+
define_attribute(:selected, :bool, :default => true)
|
512
|
+
define_attribute(:byPosition, :bool, :default => false)
|
513
|
+
define_attribute(:relative, :bool, :default => false)
|
514
|
+
define_attribute(:defaultSubtotal, :bool, :default => false)
|
515
|
+
define_attribute(:sumSubtotal, :bool, :default => false)
|
516
|
+
define_attribute(:countASubtotal, :bool, :default => false)
|
517
|
+
define_attribute(:avgSubtotal, :bool, :default => false)
|
518
|
+
define_attribute(:maxSubtotal, :bool, :default => false)
|
519
|
+
define_attribute(:minSubtotal, :bool, :default => false)
|
520
|
+
define_attribute(:productSubtotal, :bool, :default => false)
|
521
|
+
define_attribute(:countSubtotal, :bool, :default => false)
|
522
|
+
define_attribute(:stdDevSubtotal, :bool, :default => false)
|
523
|
+
define_attribute(:stdDevPSubtotal, :bool, :default => false)
|
524
|
+
define_attribute(:varSubtotal, :bool, :default => false)
|
525
|
+
define_attribute(:varPSubtotal, :bool, :default => false)
|
526
|
+
define_child_node(RubyXL::FieldItem, :collection => :with_count, :accessor => :field_items)
|
527
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
528
|
+
define_element_name 'reference'
|
529
|
+
end
|
530
|
+
|
531
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_references-1.html
|
532
|
+
class PivotReferences < OOXMLContainerObject
|
533
|
+
define_child_node(RubyXL::PivotReference, :collection => :with_count)
|
534
|
+
define_element_name 'references'
|
535
|
+
end
|
536
|
+
|
537
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_pivotArea-4.html
|
538
|
+
class PivotArea < OOXMLObject
|
539
|
+
define_attribute(:field, :int)
|
540
|
+
define_attribute(:type, RubyXL::ST_PivotAreaType, :default => 'normal')
|
541
|
+
define_attribute(:dataOnly, :bool, :default => true)
|
542
|
+
define_attribute(:labelOnly, :bool, :default => false)
|
543
|
+
define_attribute(:grandRow, :bool, :default => false)
|
544
|
+
define_attribute(:grandCol, :bool, :default => false)
|
545
|
+
define_attribute(:cacheIndex, :bool, :default => false)
|
546
|
+
define_attribute(:outline, :bool, :default => true)
|
547
|
+
define_attribute(:offset, :ref)
|
548
|
+
define_attribute(:collapsedLevelsAreSubtotals, :bool, :default => false)
|
549
|
+
define_attribute(:axis, RubyXL::ST_Axis)
|
550
|
+
define_attribute(:fieldPosition, :int, :default => 0)
|
551
|
+
define_child_node(RubyXL::PivotReferences)
|
552
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
553
|
+
define_element_name 'pivotArea'
|
554
|
+
end
|
555
|
+
|
556
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_pivotSelection-1.html
|
557
|
+
class PivotTableSelection < OOXMLObject
|
558
|
+
define_attribute(:pane, RubyXL::ST_Pane, :default => 'topLeft')
|
559
|
+
define_attribute(:showHeader, :bool, :default => false)
|
560
|
+
define_attribute(:label, :bool, :default => false)
|
561
|
+
define_attribute(:data, :bool, :default => false)
|
562
|
+
define_attribute(:extendable, :bool, :default => false)
|
563
|
+
define_attribute(:count, :uint, :default => 0)
|
564
|
+
define_attribute(:axis, RubyXL::ST_Axis)
|
565
|
+
define_attribute(:dimension, :uint, :default => 0)
|
566
|
+
define_attribute(:start, :uint, :default => 0)
|
567
|
+
define_attribute(:min, :uint, :default => 0)
|
568
|
+
define_attribute(:max, :uint, :default => 0)
|
569
|
+
define_attribute(:activeRow, :uint, :default => 0)
|
570
|
+
define_attribute(:activeCol, :uint, :default => 0)
|
571
|
+
define_attribute(:previousRow, :uint, :default => 0)
|
572
|
+
define_attribute(:previousCol, :uint, :default => 0)
|
573
|
+
define_attribute(:click, :uint, :default => 0)
|
574
|
+
define_attribute(:'r:id', :string)
|
575
|
+
define_child_node(RubyXL::PivotArea)
|
576
|
+
define_element_name 'pivotSelection'
|
577
|
+
end
|
578
|
+
|
579
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_sheetView-1.html
|
580
|
+
class WorksheetView < OOXMLObject
|
581
|
+
define_attribute(:windowProtection, :bool, :default => false)
|
582
|
+
define_attribute(:showFormulas, :bool, :default => false)
|
583
|
+
define_attribute(:showGridLines, :bool, :default => true)
|
584
|
+
define_attribute(:showRowColHeaders, :bool, :default => true)
|
585
|
+
define_attribute(:showZeros, :bool, :default => true)
|
586
|
+
define_attribute(:rightToLeft, :bool, :default => false)
|
587
|
+
define_attribute(:tabSelected, :bool, :default => false)
|
588
|
+
define_attribute(:showRuler, :bool, :default => true)
|
589
|
+
define_attribute(:showOutlineSymbols, :bool, :default => true)
|
590
|
+
define_attribute(:defaultGridColor, :bool, :default => true)
|
591
|
+
define_attribute(:showWhiteSpace, :bool, :default => true)
|
592
|
+
define_attribute(:view, RubyXL::ST_SheetViewType, :default => 'normal')
|
593
|
+
define_attribute(:topLeftCell, :ref)
|
594
|
+
define_attribute(:colorId, :uint, :default => 64)
|
595
|
+
define_attribute(:zoomScale, :uint, :default => 100)
|
596
|
+
define_attribute(:zoomScaleNormal, :uint, :default => 0)
|
597
|
+
define_attribute(:zoomScaleSheetLayoutView, :uint, :default => 0)
|
598
|
+
define_attribute(:zoomScalePageLayoutView, :uint, :default => 0)
|
599
|
+
define_attribute(:workbookViewId, :uint, :required => true, :default => 0 )
|
600
|
+
define_child_node(RubyXL::Pane)
|
601
|
+
define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections)
|
602
|
+
define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections )
|
603
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
604
|
+
define_element_name 'sheetView'
|
605
|
+
end
|
606
|
+
|
607
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_sheetViews-3.html
|
608
|
+
class WorksheetViews < OOXMLContainerObject
|
609
|
+
define_child_node(RubyXL::WorksheetView, :collection => true)
|
610
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
611
|
+
define_element_name 'sheetViews'
|
612
|
+
end
|
613
|
+
|
614
|
+
# http://www.datypic.com/sc/ooxml/e-ssml_worksheet.html
|
615
|
+
class Worksheet < OOXMLTopLevelObject
|
616
|
+
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'
|
617
|
+
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'
|
618
|
+
|
619
|
+
include RubyXL::RelationshipSupport
|
620
|
+
|
621
|
+
def related_objects
|
622
|
+
comments + printer_settings
|
623
|
+
end
|
624
|
+
|
625
|
+
define_relationship(RubyXL::PrinterSettingsFile, :printer_settings)
|
626
|
+
define_relationship(RubyXL::CommentsFile, :comments)
|
627
|
+
define_relationship(RubyXL::VMLDrawingFile)
|
628
|
+
define_relationship(RubyXL::DrawingFile)
|
629
|
+
define_relationship(RubyXL::BinaryImageFile)
|
630
|
+
define_relationship(RubyXL::PivotTableFile)
|
631
|
+
define_relationship(RubyXL::TableFile)
|
632
|
+
define_relationship(RubyXL::ControlPropertiesFile)
|
633
|
+
define_relationship(RubyXL::SlicerFile)
|
634
|
+
define_relationship(RubyXL::OLEObjectFile)
|
635
|
+
define_relationship(RubyXL::ActiveX)
|
636
|
+
|
637
|
+
define_child_node(RubyXL::WorksheetProperties)
|
638
|
+
define_child_node(RubyXL::WorksheetDimensions)
|
639
|
+
define_child_node(RubyXL::WorksheetViews)
|
640
|
+
define_child_node(RubyXL::WorksheetFormatProperties)
|
641
|
+
define_child_node(RubyXL::ColumnRanges)
|
642
|
+
define_child_node(RubyXL::SheetData)
|
643
|
+
define_child_node(RubyXL::SheetCalculationProperties)
|
644
|
+
define_child_node(RubyXL::WorksheetProtection)
|
645
|
+
define_child_node(RubyXL::ProtectedRanges)
|
646
|
+
define_child_node(RubyXL::Scenarios)
|
647
|
+
define_child_node(RubyXL::AutoFilter)
|
648
|
+
define_child_node(RubyXL::SortState)
|
649
|
+
define_child_node(RubyXL::DataConsolidate)
|
650
|
+
define_child_node(RubyXL::CustomSheetViews)
|
651
|
+
define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
|
652
|
+
define_child_node(RubyXL::PhoneticProperties)
|
653
|
+
define_child_node(RubyXL::ConditionalFormatting, :collection => [0..-1])
|
654
|
+
define_child_node(RubyXL::DataValidations)
|
655
|
+
define_child_node(RubyXL::Hyperlinks)
|
656
|
+
define_child_node(RubyXL::PrintOptions)
|
657
|
+
define_child_node(RubyXL::PageMargins)
|
658
|
+
define_child_node(RubyXL::PageSetup)
|
659
|
+
define_child_node(RubyXL::HeaderFooterSettings)
|
660
|
+
define_child_node(RubyXL::BreakList, :node_name => :rowBreaks)
|
661
|
+
define_child_node(RubyXL::BreakList, :node_name => :colBreaks)
|
662
|
+
define_child_node(RubyXL::CustomProperties)
|
663
|
+
define_child_node(RubyXL::CellWatches)
|
664
|
+
define_child_node(RubyXL::IgnoredErrors)
|
665
|
+
define_child_node(RubyXL::SmartTags)
|
666
|
+
define_child_node(RubyXL::RID, :node_name => :drawing)
|
667
|
+
define_child_node(RubyXL::RID, :node_name => :legacyDrawing)
|
668
|
+
define_child_node(RubyXL::RID, :node_name => :legacyDrawingHF)
|
669
|
+
define_child_node(RubyXL::RID, :node_name => :picture)
|
670
|
+
define_child_node(RubyXL::OLEObjects)
|
671
|
+
define_child_node(RubyXL::EmbeddedControls)
|
672
|
+
define_child_node(RubyXL::WebPublishingItems)
|
673
|
+
define_child_node(RubyXL::TableParts)
|
674
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
675
|
+
define_child_node(RubyXL::AlternateContent)
|
676
|
+
define_element_name 'worksheet'
|
677
|
+
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
|
678
|
+
'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r',
|
679
|
+
'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
|
680
|
+
'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
|
681
|
+
'urn:schemas-microsoft-com:mac:vml' => 'mv')
|
682
|
+
|
683
|
+
attr_accessor :workbook, :state, :sheet_name, :sheet_id, :rels
|
684
|
+
|
685
|
+
def before_write_xml # This method may need to be moved higher in the hierarchy
|
686
|
+
first_nonempty_row = nil
|
687
|
+
last_nonempty_row = 0
|
688
|
+
first_nonempty_column = nil
|
689
|
+
last_nonempty_column = 0
|
690
|
+
|
691
|
+
if sheet_data then
|
692
|
+
sheet_data.rows.each_with_index { |row, row_index|
|
693
|
+
next if row.nil? || row.cells.empty?
|
694
|
+
|
695
|
+
first_nonempty_cell = nil
|
696
|
+
last_nonempty_cell = 0
|
697
|
+
|
698
|
+
row.cells.each_with_index { |cell, col_index|
|
699
|
+
next if cell.nil?
|
700
|
+
cell.r = RubyXL::Reference.new(row_index, col_index)
|
701
|
+
|
702
|
+
first_nonempty_cell ||= col_index
|
703
|
+
last_nonempty_cell = col_index
|
704
|
+
}
|
705
|
+
|
706
|
+
if first_nonempty_cell then # If there's nothing in this row, then +first_nonempty_cell+ will be +nil+.
|
707
|
+
last_nonempty_row = row_index
|
708
|
+
first_nonempty_row ||= row_index
|
709
|
+
|
710
|
+
first_nonempty_column ||= first_nonempty_cell
|
711
|
+
last_nonempty_column = last_nonempty_cell if last_nonempty_cell > last_nonempty_column
|
712
|
+
end
|
713
|
+
|
714
|
+
row.r = row_index + 1
|
715
|
+
row.spans = "#{first_nonempty_cell + 1}:#{last_nonempty_cell + 1}" unless first_nonempty_cell.nil?
|
716
|
+
row.custom_format = (row.style_index.to_i != 0)
|
717
|
+
}
|
718
|
+
|
719
|
+
if first_nonempty_row then
|
720
|
+
self.dimension ||= RubyXL::WorksheetDimensions.new
|
721
|
+
self.dimension.ref = RubyXL::Reference.new(first_nonempty_row, last_nonempty_row,
|
722
|
+
first_nonempty_column, last_nonempty_column)
|
723
|
+
end
|
724
|
+
|
725
|
+
end
|
726
|
+
|
727
|
+
true
|
728
|
+
end
|
729
|
+
|
730
|
+
def xlsx_path
|
731
|
+
ROOT.join('xl', 'worksheets', "sheet#{file_index}.xml")
|
732
|
+
end
|
733
|
+
|
734
|
+
def self.parse(param)
|
735
|
+
sheet_obj = super
|
736
|
+
sheet_obj.sheet_data.rows.each { |r|
|
737
|
+
next if r.nil?
|
738
|
+
r.worksheet = sheet_obj
|
739
|
+
r.cells.each { |c| c.worksheet = sheet_obj unless c.nil? }
|
740
|
+
}
|
741
|
+
sheet_obj
|
742
|
+
end
|
743
|
+
|
744
|
+
include LegacyWorksheet
|
745
|
+
include WorksheetConvenienceMethods
|
746
|
+
end
|
747
|
+
|
748
|
+
end
|