rubyXL 1.2.10 → 3.4.33
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/.circleci/config.yml +60 -0
- data/.codeclimate.yml +3 -0
- data/.rubocop.yml +124 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +18 -14
- data/LICENSE.txt +1 -1
- data/README.rdoc +170 -100
- data/Rakefile +76 -26
- data/VERSION +1 -1
- data/lib/rubyXL/cell.rb +13 -447
- data/lib/rubyXL/convenience_methods/cell.rb +276 -0
- data/lib/rubyXL/convenience_methods/color.rb +156 -0
- data/lib/rubyXL/convenience_methods/font.rb +63 -0
- data/lib/rubyXL/convenience_methods/workbook.rb +137 -0
- data/lib/rubyXL/convenience_methods/worksheet.rb +734 -0
- data/lib/rubyXL/convenience_methods.rb +5 -0
- data/lib/rubyXL/objects/border.rb +71 -0
- data/lib/rubyXL/objects/calculation_chain.rb +31 -0
- data/lib/rubyXL/objects/cell_style.rb +63 -0
- data/lib/rubyXL/objects/chartsheet.rb +88 -0
- data/lib/rubyXL/objects/color.rb +25 -0
- data/lib/rubyXL/objects/column_range.rb +93 -0
- data/lib/rubyXL/objects/comments.rb +44 -0
- data/lib/rubyXL/objects/connection.rb +175 -0
- data/lib/rubyXL/objects/container_nodes.rb +131 -0
- data/lib/rubyXL/objects/content_types.rb +74 -0
- data/lib/rubyXL/objects/data_validation.rb +37 -0
- data/lib/rubyXL/objects/document_properties.rb +156 -0
- data/lib/rubyXL/objects/extensions.rb +51 -0
- data/lib/rubyXL/objects/external_links.rb +115 -0
- data/lib/rubyXL/objects/fill.rb +52 -0
- data/lib/rubyXL/objects/filters.rb +118 -0
- data/lib/rubyXL/objects/font.rb +43 -0
- data/lib/rubyXL/objects/formula.rb +22 -0
- data/lib/rubyXL/objects/ooxml_object.rb +469 -0
- data/lib/rubyXL/objects/query_table.rb +106 -0
- data/lib/rubyXL/objects/reference.rb +119 -0
- data/lib/rubyXL/objects/relationships.rb +213 -0
- data/lib/rubyXL/objects/root.rb +84 -0
- data/lib/rubyXL/objects/shared_strings.rb +67 -0
- data/lib/rubyXL/objects/sheet_common.rb +49 -0
- data/lib/rubyXL/objects/sheet_data.rb +219 -0
- data/lib/rubyXL/objects/simple_types.rb +249 -0
- data/lib/rubyXL/objects/storage.rb +193 -0
- data/lib/rubyXL/objects/stylesheet.rb +224 -0
- data/lib/rubyXL/objects/text.rb +92 -0
- data/lib/rubyXL/objects/theme.rb +1730 -0
- data/lib/rubyXL/objects/workbook.rb +572 -0
- data/lib/rubyXL/objects/worksheet.rb +762 -0
- data/lib/rubyXL/parser.rb +18 -459
- data/lib/rubyXL/worksheet.rb +73 -1461
- data/lib/rubyXL.rb +9 -7
- data/rdoc/README_rdoc.html +534 -0
- data/rdoc/RubyXL/AExtension.html +187 -0
- data/rdoc/RubyXL/AExtensionStorageArea.html +97 -0
- data/rdoc/RubyXL/ActiveX.html +156 -0
- data/rdoc/RubyXL/ActiveXBinary.html +106 -0
- data/rdoc/RubyXL/AdjustHandleList.html +99 -0
- data/rdoc/RubyXL/Alignment.html +99 -0
- data/rdoc/RubyXL/AlternateContent.html +97 -0
- data/rdoc/RubyXL/AlternateUrls.html +99 -0
- data/rdoc/RubyXL/Authors.html +99 -0
- data/rdoc/RubyXL/AutoFilter.html +99 -0
- data/rdoc/RubyXL/AutoFilterColumn.html +99 -0
- data/rdoc/RubyXL/BinaryImageFile.html +108 -0
- data/rdoc/RubyXL/BodyProperties.html +99 -0
- data/rdoc/RubyXL/BooleanNode.html +97 -0
- data/rdoc/RubyXL/BooleanValue.html +97 -0
- data/rdoc/RubyXL/Border.html +223 -0
- data/rdoc/RubyXL/BorderEdge.html +160 -0
- data/rdoc/RubyXL/Borders.html +138 -0
- data/rdoc/RubyXL/Break.html +99 -0
- data/rdoc/RubyXL/BreakList.html +99 -0
- data/rdoc/RubyXL/CT_AdjPoint2D.html +99 -0
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +99 -0
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +99 -0
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +99 -0
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +99 -0
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +99 -0
- data/rdoc/RubyXL/CT_Backdrop.html +99 -0
- data/rdoc/RubyXL/CT_Bevel.html +99 -0
- data/rdoc/RubyXL/CT_BiLevelEffect.html +99 -0
- data/rdoc/RubyXL/CT_BlendEffect.html +99 -0
- data/rdoc/RubyXL/CT_Blip.html +99 -0
- data/rdoc/RubyXL/CT_BlipFillProperties.html +99 -0
- data/rdoc/RubyXL/CT_BlurEffect.html +99 -0
- data/rdoc/RubyXL/CT_Camera.html +99 -0
- data/rdoc/RubyXL/CT_Color.html +99 -0
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +99 -0
- data/rdoc/RubyXL/CT_ColorMapping.html +99 -0
- data/rdoc/RubyXL/CT_ColorScheme.html +99 -0
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +99 -0
- data/rdoc/RubyXL/CT_ConnectionSite.html +99 -0
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +99 -0
- data/rdoc/RubyXL/CT_DashStop.html +99 -0
- data/rdoc/RubyXL/CT_DashStopList.html +99 -0
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +99 -0
- data/rdoc/RubyXL/CT_DuotoneEffect.html +99 -0
- data/rdoc/RubyXL/CT_EffectContainer.html +99 -0
- data/rdoc/RubyXL/CT_EffectList.html +99 -0
- data/rdoc/RubyXL/CT_EffectReference.html +99 -0
- data/rdoc/RubyXL/CT_EffectStyleItem.html +99 -0
- data/rdoc/RubyXL/CT_EffectStyleList.html +99 -0
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +99 -0
- data/rdoc/RubyXL/CT_FillEffect.html +99 -0
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +99 -0
- data/rdoc/RubyXL/CT_FillStyleList.html +99 -0
- data/rdoc/RubyXL/CT_FlatText.html +99 -0
- data/rdoc/RubyXL/CT_FontCollection.html +99 -0
- data/rdoc/RubyXL/CT_FontReference.html +99 -0
- data/rdoc/RubyXL/CT_GeomGuideList.html +99 -0
- data/rdoc/RubyXL/CT_GlowEffect.html +99 -0
- data/rdoc/RubyXL/CT_GradientFillProperties.html +99 -0
- data/rdoc/RubyXL/CT_GradientStop.html +99 -0
- data/rdoc/RubyXL/CT_GradientStopList.html +99 -0
- data/rdoc/RubyXL/CT_HSLEffect.html +99 -0
- data/rdoc/RubyXL/CT_HslColor.html +99 -0
- data/rdoc/RubyXL/CT_Hyperlink.html +99 -0
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +99 -0
- data/rdoc/RubyXL/CT_LightRig.html +99 -0
- data/rdoc/RubyXL/CT_LineEndProperties.html +99 -0
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +99 -0
- data/rdoc/RubyXL/CT_LineProperties.html +99 -0
- data/rdoc/RubyXL/CT_LineStyleList.html +99 -0
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +99 -0
- data/rdoc/RubyXL/CT_LuminanceEffect.html +99 -0
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +99 -0
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +99 -0
- data/rdoc/RubyXL/CT_Path2D.html +99 -0
- data/rdoc/RubyXL/CT_Path2DArcTo.html +99 -0
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +99 -0
- data/rdoc/RubyXL/CT_Path2DList.html +99 -0
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +99 -0
- data/rdoc/RubyXL/CT_Path2DTo.html +99 -0
- data/rdoc/RubyXL/CT_PathShadeProperties.html +99 -0
- data/rdoc/RubyXL/CT_PatternFillProperties.html +99 -0
- data/rdoc/RubyXL/CT_Point3D.html +99 -0
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +99 -0
- data/rdoc/RubyXL/CT_PresetColor.html +99 -0
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +99 -0
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +99 -0
- data/rdoc/RubyXL/CT_PresetTextShape.html +99 -0
- data/rdoc/RubyXL/CT_ReflectionEffect.html +99 -0
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +99 -0
- data/rdoc/RubyXL/CT_RelativeRect.html +99 -0
- data/rdoc/RubyXL/CT_SRgbColor.html +99 -0
- data/rdoc/RubyXL/CT_ScRgbColor.html +99 -0
- data/rdoc/RubyXL/CT_Scene3D.html +99 -0
- data/rdoc/RubyXL/CT_SchemeColor.html +99 -0
- data/rdoc/RubyXL/CT_Shape3D.html +99 -0
- data/rdoc/RubyXL/CT_ShapeStyle.html +99 -0
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +99 -0
- data/rdoc/RubyXL/CT_SphereCoords.html +99 -0
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +99 -0
- data/rdoc/RubyXL/CT_StyleMatrix.html +99 -0
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +99 -0
- data/rdoc/RubyXL/CT_SupplementalFont.html +99 -0
- data/rdoc/RubyXL/CT_SystemColor.html +99 -0
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +99 -0
- data/rdoc/RubyXL/CT_TextBlipBullet.html +99 -0
- data/rdoc/RubyXL/CT_TextCharBullet.html +99 -0
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +99 -0
- data/rdoc/RubyXL/CT_TextFont.html +99 -0
- data/rdoc/RubyXL/CT_TextListStyle.html +99 -0
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +99 -0
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +99 -0
- data/rdoc/RubyXL/CT_TextSpacing.html +99 -0
- data/rdoc/RubyXL/CT_TextTabStop.html +99 -0
- data/rdoc/RubyXL/CT_TextTabStopList.html +99 -0
- data/rdoc/RubyXL/CT_TileInfoProperties.html +99 -0
- data/rdoc/RubyXL/CT_TintEffect.html +99 -0
- data/rdoc/RubyXL/CT_Transform2D.html +99 -0
- data/rdoc/RubyXL/CT_TransformEffect.html +99 -0
- data/rdoc/RubyXL/CT_Vector3D.html +99 -0
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +99 -0
- data/rdoc/RubyXL/CalculationChain.html +149 -0
- data/rdoc/RubyXL/CalculationChainCell.html +99 -0
- data/rdoc/RubyXL/CalculationProperties.html +99 -0
- data/rdoc/RubyXL/Cell.html +510 -0
- data/rdoc/RubyXL/CellConvenienceMethods.html +1077 -0
- data/rdoc/RubyXL/CellExt.html +99 -0
- data/rdoc/RubyXL/CellSmartTag.html +99 -0
- data/rdoc/RubyXL/CellSmartTagProperty.html +99 -0
- data/rdoc/RubyXL/CellSmartTags.html +99 -0
- data/rdoc/RubyXL/CellStyle.html +99 -0
- data/rdoc/RubyXL/CellStyleXFs.html +138 -0
- data/rdoc/RubyXL/CellStyles.html +138 -0
- data/rdoc/RubyXL/CellValue.html +139 -0
- data/rdoc/RubyXL/CellWatch.html +99 -0
- data/rdoc/RubyXL/CellWatches.html +99 -0
- data/rdoc/RubyXL/CellXFs.html +139 -0
- data/rdoc/RubyXL/ChartColorsFile.html +108 -0
- data/rdoc/RubyXL/ChartFile.html +160 -0
- data/rdoc/RubyXL/ChartStyleFile.html +108 -0
- data/rdoc/RubyXL/ChartUserShapesFile.html +108 -0
- data/rdoc/RubyXL/Chartsheet.html +213 -0
- data/rdoc/RubyXL/ChartsheetPageSetup.html +99 -0
- data/rdoc/RubyXL/ChartsheetProperties.html +99 -0
- data/rdoc/RubyXL/ChartsheetProtection.html +99 -0
- data/rdoc/RubyXL/ChartsheetView.html +99 -0
- data/rdoc/RubyXL/ChartsheetViews.html +99 -0
- data/rdoc/RubyXL/Color.html +151 -0
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +246 -0
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +285 -0
- data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
- data/rdoc/RubyXL/ColorConvenienceMethods.html +139 -0
- data/rdoc/RubyXL/ColorFilter.html +99 -0
- data/rdoc/RubyXL/ColorScale.html +99 -0
- data/rdoc/RubyXL/ColorSet.html +99 -0
- data/rdoc/RubyXL/Colors.html +99 -0
- data/rdoc/RubyXL/ColumnRange.html +230 -0
- data/rdoc/RubyXL/ColumnRanges.html +237 -0
- data/rdoc/RubyXL/Comment.html +99 -0
- data/rdoc/RubyXL/CommentList.html +99 -0
- data/rdoc/RubyXL/CommentsFile.html +165 -0
- data/rdoc/RubyXL/ConditionalFormatValue.html +99 -0
- data/rdoc/RubyXL/ConditionalFormatting.html +99 -0
- data/rdoc/RubyXL/ConditionalFormattingRule.html +99 -0
- data/rdoc/RubyXL/Connection.html +99 -0
- data/rdoc/RubyXL/ConnectionTable.html +99 -0
- data/rdoc/RubyXL/ConnectionTables.html +99 -0
- data/rdoc/RubyXL/ConnectionTextField.html +99 -0
- data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
- data/rdoc/RubyXL/Connections.html +149 -0
- data/rdoc/RubyXL/ContentTypeDefault.html +97 -0
- data/rdoc/RubyXL/ContentTypeOverride.html +97 -0
- data/rdoc/RubyXL/ContentTypes.html +211 -0
- data/rdoc/RubyXL/ControlPropertiesFile.html +108 -0
- data/rdoc/RubyXL/CorePropertiesFile.html +355 -0
- data/rdoc/RubyXL/CustomColor.html +99 -0
- data/rdoc/RubyXL/CustomColorList.html +99 -0
- data/rdoc/RubyXL/CustomFilter.html +99 -0
- data/rdoc/RubyXL/CustomFilters.html +99 -0
- data/rdoc/RubyXL/CustomGeometry.html +99 -0
- data/rdoc/RubyXL/CustomProperties.html +99 -0
- data/rdoc/RubyXL/CustomPropertiesFile.html +108 -0
- data/rdoc/RubyXL/CustomProperty.html +99 -0
- data/rdoc/RubyXL/CustomPropertyFile.html +108 -0
- data/rdoc/RubyXL/CustomSheetView.html +99 -0
- data/rdoc/RubyXL/CustomSheetViews.html +99 -0
- data/rdoc/RubyXL/CustomWorkbookView.html +99 -0
- data/rdoc/RubyXL/CustomWorkbookViews.html +99 -0
- data/rdoc/RubyXL/CustomXMLFile.html +106 -0
- data/rdoc/RubyXL/DXF.html +99 -0
- data/rdoc/RubyXL/DXFs.html +99 -0
- data/rdoc/RubyXL/DataBar.html +99 -0
- data/rdoc/RubyXL/DataConsolidate.html +99 -0
- data/rdoc/RubyXL/DataConsolidationReference.html +99 -0
- data/rdoc/RubyXL/DataConsolidationReferences.html +99 -0
- data/rdoc/RubyXL/DataType.html +114 -0
- data/rdoc/RubyXL/DataValidation.html +99 -0
- data/rdoc/RubyXL/DataValidations.html +99 -0
- data/rdoc/RubyXL/DateGroupItem.html +99 -0
- data/rdoc/RubyXL/DefinedName.html +99 -0
- data/rdoc/RubyXL/DefinedNameExt.html +99 -0
- data/rdoc/RubyXL/DefinedNames.html +99 -0
- data/rdoc/RubyXL/DefinedNamesExt.html +99 -0
- data/rdoc/RubyXL/DocumentPropertiesFile.html +213 -0
- data/rdoc/RubyXL/DrawingFile.html +159 -0
- data/rdoc/RubyXL/DynamicFilter.html +99 -0
- data/rdoc/RubyXL/EmbeddedControl.html +99 -0
- data/rdoc/RubyXL/EmbeddedControls.html +99 -0
- data/rdoc/RubyXL/Extension.html +99 -0
- data/rdoc/RubyXL/ExtensionStorageArea.html +99 -0
- data/rdoc/RubyXL/Extents.html +99 -0
- data/rdoc/RubyXL/ExternalBook.html +99 -0
- data/rdoc/RubyXL/ExternalLinksFile.html +155 -0
- data/rdoc/RubyXL/ExternalReference.html +99 -0
- data/rdoc/RubyXL/ExternalReferences.html +99 -0
- data/rdoc/RubyXL/ExtraColorSchemeList.html +99 -0
- data/rdoc/RubyXL/FieldItem.html +99 -0
- data/rdoc/RubyXL/FileRecoveryProperties.html +99 -0
- data/rdoc/RubyXL/FileSharing.html +99 -0
- data/rdoc/RubyXL/FileVersion.html +99 -0
- data/rdoc/RubyXL/Fill.html +138 -0
- data/rdoc/RubyXL/Fills.html +138 -0
- data/rdoc/RubyXL/FilterContainer.html +99 -0
- data/rdoc/RubyXL/FloatNode.html +97 -0
- data/rdoc/RubyXL/FloatValue.html +97 -0
- data/rdoc/RubyXL/Font.html +148 -0
- data/rdoc/RubyXL/FontConvenienceMethods.html +442 -0
- data/rdoc/RubyXL/FontScheme.html +99 -0
- data/rdoc/RubyXL/Fonts.html +138 -0
- data/rdoc/RubyXL/Formula.html +99 -0
- data/rdoc/RubyXL/FunctionGroup.html +99 -0
- data/rdoc/RubyXL/FunctionGroups.html +99 -0
- data/rdoc/RubyXL/GenericStorageObject.html +241 -0
- data/rdoc/RubyXL/GradientFill.html +99 -0
- data/rdoc/RubyXL/HeaderFooterSettings.html +99 -0
- data/rdoc/RubyXL/Hyperlink.html +99 -0
- data/rdoc/RubyXL/HyperlinkRelFile.html +106 -0
- data/rdoc/RubyXL/Hyperlinks.html +99 -0
- data/rdoc/RubyXL/IconFilter.html +99 -0
- data/rdoc/RubyXL/IconSet.html +99 -0
- data/rdoc/RubyXL/IgnoredError.html +99 -0
- data/rdoc/RubyXL/IgnoredErrors.html +99 -0
- data/rdoc/RubyXL/IndexedColors.html +99 -0
- data/rdoc/RubyXL/InputCells.html +99 -0
- data/rdoc/RubyXL/IntegerNode.html +97 -0
- data/rdoc/RubyXL/IntegerValue.html +97 -0
- data/rdoc/RubyXL/LegacyCell.html +130 -0
- data/rdoc/RubyXL/LegacyWorksheet.html +306 -0
- data/rdoc/RubyXL/MRUColors.html +99 -0
- data/rdoc/RubyXL/MacrosFile.html +108 -0
- data/rdoc/RubyXL/MergedCell.html +99 -0
- data/rdoc/RubyXL/MergedCells.html +99 -0
- data/rdoc/RubyXL/NumFmt.html +99 -0
- data/rdoc/RubyXL/NumberFormat.html +139 -0
- data/rdoc/RubyXL/NumberFormats.html +147 -0
- data/rdoc/RubyXL/OLEObject.html +99 -0
- data/rdoc/RubyXL/OLEObjectFile.html +108 -0
- data/rdoc/RubyXL/OLEObjects.html +99 -0
- data/rdoc/RubyXL/OLESize.html +99 -0
- data/rdoc/RubyXL/OOXMLContainerObject.html +309 -0
- data/rdoc/RubyXL/OOXMLIgnored.html +167 -0
- data/rdoc/RubyXL/OOXMLObject.html +107 -0
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +455 -0
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +442 -0
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +470 -0
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +297 -0
- data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
- data/rdoc/RubyXL/Offset.html +99 -0
- data/rdoc/RubyXL/OlapProperties.html +99 -0
- data/rdoc/RubyXL/OleItem.html +99 -0
- data/rdoc/RubyXL/OleItems.html +99 -0
- data/rdoc/RubyXL/OleLink.html +99 -0
- data/rdoc/RubyXL/OutlineProperties.html +99 -0
- data/rdoc/RubyXL/PageMargins.html +99 -0
- data/rdoc/RubyXL/PageSetup.html +99 -0
- data/rdoc/RubyXL/PageSetupProperties.html +99 -0
- data/rdoc/RubyXL/Pane.html +99 -0
- data/rdoc/RubyXL/Parser.html +174 -0
- data/rdoc/RubyXL/PatternFill.html +99 -0
- data/rdoc/RubyXL/PersonMetadata.html +108 -0
- data/rdoc/RubyXL/PhoneticProperties.html +99 -0
- data/rdoc/RubyXL/PhoneticRun.html +99 -0
- data/rdoc/RubyXL/PivotArea.html +99 -0
- data/rdoc/RubyXL/PivotCache.html +99 -0
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +116 -0
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +108 -0
- data/rdoc/RubyXL/PivotCaches.html +99 -0
- data/rdoc/RubyXL/PivotReference.html +99 -0
- data/rdoc/RubyXL/PivotReferences.html +99 -0
- data/rdoc/RubyXL/PivotTableFile.html +116 -0
- data/rdoc/RubyXL/PivotTableSelection.html +99 -0
- data/rdoc/RubyXL/PresetGeometry.html +99 -0
- data/rdoc/RubyXL/PrintOptions.html +99 -0
- data/rdoc/RubyXL/PrinterSettingsFile.html +108 -0
- data/rdoc/RubyXL/ProtectedRange.html +99 -0
- data/rdoc/RubyXL/ProtectedRanges.html +99 -0
- data/rdoc/RubyXL/Protection.html +99 -0
- data/rdoc/RubyXL/QueryParameter.html +99 -0
- data/rdoc/RubyXL/QueryParameters.html +99 -0
- data/rdoc/RubyXL/QueryTable.html +157 -0
- data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
- data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
- data/rdoc/RubyXL/QueryTableField.html +99 -0
- data/rdoc/RubyXL/QueryTableFields.html +99 -0
- data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
- data/rdoc/RubyXL/RID.html +97 -0
- data/rdoc/RubyXL/RawOOXML.html +187 -0
- data/rdoc/RubyXL/Reference.html +510 -0
- data/rdoc/RubyXL/Relationship.html +97 -0
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +131 -0
- data/rdoc/RubyXL/RelationshipSupport.html +336 -0
- data/rdoc/RubyXL/RevisionPointer.html +99 -0
- data/rdoc/RubyXL/RichText.html +141 -0
- data/rdoc/RubyXL/RichTextRun.html +138 -0
- data/rdoc/RubyXL/Row.html +357 -0
- data/rdoc/RubyXL/RowExt.html +99 -0
- data/rdoc/RubyXL/RunProperties.html +99 -0
- data/rdoc/RubyXL/Scenario.html +99 -0
- data/rdoc/RubyXL/Scenarios.html +99 -0
- data/rdoc/RubyXL/Selection.html +146 -0
- data/rdoc/RubyXL/ShapeGuide.html +99 -0
- data/rdoc/RubyXL/ShapeTextRectangle.html +99 -0
- data/rdoc/RubyXL/SharedStringsTable.html +328 -0
- data/rdoc/RubyXL/Sheet.html +99 -0
- data/rdoc/RubyXL/SheetCalculationProperties.html +99 -0
- data/rdoc/RubyXL/SheetData.html +162 -0
- data/rdoc/RubyXL/SheetDataExt.html +99 -0
- data/rdoc/RubyXL/SheetDataSet.html +99 -0
- data/rdoc/RubyXL/SheetMetadata.html +108 -0
- data/rdoc/RubyXL/SheetName.html +99 -0
- data/rdoc/RubyXL/SheetNames.html +99 -0
- data/rdoc/RubyXL/Sheets.html +99 -0
- data/rdoc/RubyXL/SlicerCacheFile.html +108 -0
- data/rdoc/RubyXL/SlicerFile.html +108 -0
- data/rdoc/RubyXL/SmartTagProperties.html +99 -0
- data/rdoc/RubyXL/SmartTagType.html +99 -0
- data/rdoc/RubyXL/SmartTagTypes.html +99 -0
- data/rdoc/RubyXL/SmartTags.html +99 -0
- data/rdoc/RubyXL/SortCondition.html +99 -0
- data/rdoc/RubyXL/SortState.html +99 -0
- data/rdoc/RubyXL/Sqref.html +167 -0
- data/rdoc/RubyXL/Stop.html +99 -0
- data/rdoc/RubyXL/StringNode.html +97 -0
- data/rdoc/RubyXL/StringNodeW3C.html +167 -0
- data/rdoc/RubyXL/StringValue.html +97 -0
- data/rdoc/RubyXL/Stylesheet.html +281 -0
- data/rdoc/RubyXL/TableFile.html +108 -0
- data/rdoc/RubyXL/TableParts.html +97 -0
- data/rdoc/RubyXL/TableStyle.html +99 -0
- data/rdoc/RubyXL/TableStyles.html +99 -0
- data/rdoc/RubyXL/Text.html +175 -0
- data/rdoc/RubyXL/TextImportSettings.html +99 -0
- data/rdoc/RubyXL/Theme.html +535 -0
- data/rdoc/RubyXL/ThemeElements.html +99 -0
- data/rdoc/RubyXL/ThumbnailFile.html +108 -0
- data/rdoc/RubyXL/Top10.html +99 -0
- data/rdoc/RubyXL/VMLDrawingFile.html +116 -0
- data/rdoc/RubyXL/Variant.html +99 -0
- data/rdoc/RubyXL/Vector.html +142 -0
- data/rdoc/RubyXL/VectorValue.html +97 -0
- data/rdoc/RubyXL/VisualProperties.html +99 -0
- data/rdoc/RubyXL/WebPublishObject.html +99 -0
- data/rdoc/RubyXL/WebPublishObjects.html +99 -0
- data/rdoc/RubyXL/WebPublishingItem.html +99 -0
- data/rdoc/RubyXL/WebPublishingItems.html +99 -0
- data/rdoc/RubyXL/WebPublishingProperties.html +99 -0
- data/rdoc/RubyXL/WebQueryProperties.html +99 -0
- data/rdoc/RubyXL/Workbook.html +948 -0
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +596 -0
- data/rdoc/RubyXL/WorkbookProperties.html +99 -0
- data/rdoc/RubyXL/WorkbookProtection.html +99 -0
- data/rdoc/RubyXL/WorkbookRoot.html +325 -0
- data/rdoc/RubyXL/WorkbookView.html +99 -0
- data/rdoc/RubyXL/WorkbookViews.html +99 -0
- data/rdoc/RubyXL/Worksheet.html +418 -0
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2205 -0
- data/rdoc/RubyXL/WorksheetDimensions.html +99 -0
- data/rdoc/RubyXL/WorksheetFormatProperties.html +97 -0
- data/rdoc/RubyXL/WorksheetProperties.html +99 -0
- data/rdoc/RubyXL/WorksheetProtection.html +99 -0
- data/rdoc/RubyXL/WorksheetView.html +99 -0
- data/rdoc/RubyXL/WorksheetViews.html +99 -0
- data/rdoc/RubyXL/XF.html +99 -0
- data/rdoc/RubyXL.html +338 -0
- data/rdoc/created.rid +45 -0
- data/rdoc/css/fonts.css +167 -0
- data/rdoc/css/rdoc.css +687 -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 +477 -0
- data/rdoc/js/darkfish.js +97 -0
- data/rdoc/js/navigation.js +105 -0
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search.js +110 -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 +3021 -0
- data/rubyXL.gemspec +521 -60
- data/spec/lib/cell_spec.rb +386 -143
- data/spec/lib/color_spec.rb +11 -4
- data/spec/lib/parser_spec.rb +90 -38
- data/spec/lib/reference_spec.rb +64 -0
- data/spec/lib/rgb_color_spec.rb +29 -0
- data/spec/lib/stylesheet_spec.rb +27 -0
- data/spec/lib/text_spec.rb +27 -0
- data/spec/lib/workbook_spec.rb +168 -22
- data/spec/lib/worksheet_spec.rb +1207 -1220
- data/spec/spec_helper.rb +13 -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 +634 -168
- data/Gemfile.lock +0 -34
- data/lib/.DS_Store +0 -0
- data/lib/rubyXL/Hash.rb +0 -60
- data/lib/rubyXL/color.rb +0 -14
- data/lib/rubyXL/private_class.rb +0 -265
- data/lib/rubyXL/workbook.rb +0 -450
- data/lib/rubyXL/writer/app_writer.rb +0 -62
- data/lib/rubyXL/writer/calc_chain_writer.rb +0 -33
- data/lib/rubyXL/writer/content_types_writer.rb +0 -77
- data/lib/rubyXL/writer/core_writer.rb +0 -51
- data/lib/rubyXL/writer/root_rels_writer.rb +0 -25
- data/lib/rubyXL/writer/shared_strings_writer.rb +0 -30
- data/lib/rubyXL/writer/styles_writer.rb +0 -407
- data/lib/rubyXL/writer/theme_writer.rb +0 -343
- data/lib/rubyXL/writer/workbook_rels_writer.rb +0 -59
- data/lib/rubyXL/writer/workbook_writer.rb +0 -77
- data/lib/rubyXL/writer/worksheet_writer.rb +0 -230
- data/lib/rubyXL/zip.rb +0 -20
- data/spec/lib/hash_spec.rb +0 -28
@@ -0,0 +1,762 @@
|
|
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/objects/connection'
|
14
|
+
require 'rubyXL/objects/query_table'
|
15
|
+
require 'rubyXL/worksheet'
|
16
|
+
|
17
|
+
module RubyXL
|
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_relationship
|
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, :collection => true)
|
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, :collection => true)
|
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_relationship
|
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_relationship
|
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_relationship
|
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, :ref)
|
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, :uint) # 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 get more complicated:
|
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_relationship(: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_relationship(: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_relationship
|
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'.freeze
|
617
|
+
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'.freeze
|
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::CustomPropertyFile)
|
634
|
+
define_relationship(RubyXL::SlicerFile)
|
635
|
+
define_relationship(RubyXL::OLEObjectFile)
|
636
|
+
define_relationship(RubyXL::ActiveX)
|
637
|
+
define_relationship(RubyXL::QueryTable)
|
638
|
+
|
639
|
+
define_child_node(RubyXL::WorksheetProperties)
|
640
|
+
define_child_node(RubyXL::WorksheetDimensions)
|
641
|
+
define_child_node(RubyXL::WorksheetViews)
|
642
|
+
define_child_node(RubyXL::WorksheetFormatProperties)
|
643
|
+
define_child_node(RubyXL::ColumnRanges)
|
644
|
+
define_child_node(RubyXL::SheetData)
|
645
|
+
define_child_node(RubyXL::SheetCalculationProperties)
|
646
|
+
define_child_node(RubyXL::WorksheetProtection)
|
647
|
+
define_child_node(RubyXL::ProtectedRanges)
|
648
|
+
define_child_node(RubyXL::Scenarios)
|
649
|
+
define_child_node(RubyXL::AutoFilter)
|
650
|
+
define_child_node(RubyXL::SortState)
|
651
|
+
define_child_node(RubyXL::DataConsolidate)
|
652
|
+
define_child_node(RubyXL::CustomSheetViews)
|
653
|
+
define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
|
654
|
+
define_child_node(RubyXL::PhoneticProperties)
|
655
|
+
define_child_node(RubyXL::ConditionalFormatting, :collection => [0..-1])
|
656
|
+
define_child_node(RubyXL::DataValidations)
|
657
|
+
define_child_node(RubyXL::Hyperlinks)
|
658
|
+
define_child_node(RubyXL::PrintOptions)
|
659
|
+
define_child_node(RubyXL::PageMargins)
|
660
|
+
define_child_node(RubyXL::PageSetup)
|
661
|
+
define_child_node(RubyXL::HeaderFooterSettings)
|
662
|
+
define_child_node(RubyXL::BreakList, :node_name => :rowBreaks)
|
663
|
+
define_child_node(RubyXL::BreakList, :node_name => :colBreaks)
|
664
|
+
define_child_node(RubyXL::CustomProperties)
|
665
|
+
define_child_node(RubyXL::CellWatches)
|
666
|
+
define_child_node(RubyXL::IgnoredErrors)
|
667
|
+
define_child_node(RubyXL::SmartTags)
|
668
|
+
define_child_node(RubyXL::RID, :node_name => :drawing)
|
669
|
+
define_child_node(RubyXL::RID, :node_name => :legacyDrawing)
|
670
|
+
define_child_node(RubyXL::RID, :node_name => :legacyDrawingHF)
|
671
|
+
define_child_node(RubyXL::RID, :node_name => :picture)
|
672
|
+
define_child_node(RubyXL::OLEObjects)
|
673
|
+
define_child_node(RubyXL::EmbeddedControls)
|
674
|
+
define_child_node(RubyXL::WebPublishingItems)
|
675
|
+
define_child_node(RubyXL::TableParts)
|
676
|
+
define_child_node(RubyXL::ExtensionStorageArea)
|
677
|
+
define_child_node(RubyXL::AlternateContent)
|
678
|
+
define_element_name 'worksheet'
|
679
|
+
set_namespaces('http://schemas.openxmlformats.org/spreadsheetml/2006/main' => nil,
|
680
|
+
'http://schemas.openxmlformats.org/officeDocument/2006/relationships' => 'r',
|
681
|
+
'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
|
682
|
+
'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
|
683
|
+
'urn:schemas-microsoft-com:mac:vml' => 'mv')
|
684
|
+
|
685
|
+
attr_accessor :workbook, :state, :sheet_name, :sheet_id, :rels
|
686
|
+
|
687
|
+
def before_write_xml # This method may need to be moved higher in the hierarchy
|
688
|
+
first_nonempty_row = nil
|
689
|
+
last_nonempty_row = 0
|
690
|
+
first_nonempty_column = nil
|
691
|
+
last_nonempty_column = 0
|
692
|
+
|
693
|
+
if sheet_data then
|
694
|
+
sheet_data.rows.each_with_index { |row, row_index|
|
695
|
+
next if row.nil? || row.cells.empty?
|
696
|
+
|
697
|
+
first_nonempty_cell = nil
|
698
|
+
last_nonempty_cell = 0
|
699
|
+
|
700
|
+
row.cells.each_with_index { |cell, col_index|
|
701
|
+
next if cell.nil?
|
702
|
+
cell.r = RubyXL::Reference.new(row_index, col_index)
|
703
|
+
|
704
|
+
first_nonempty_cell ||= col_index
|
705
|
+
last_nonempty_cell = col_index
|
706
|
+
}
|
707
|
+
|
708
|
+
if first_nonempty_cell then # If there's nothing in this row, then +first_nonempty_cell+ will be +nil+.
|
709
|
+
last_nonempty_row = row_index
|
710
|
+
first_nonempty_row ||= row_index
|
711
|
+
|
712
|
+
first_nonempty_column ||= first_nonempty_cell
|
713
|
+
last_nonempty_column = last_nonempty_cell if last_nonempty_cell > last_nonempty_column
|
714
|
+
end
|
715
|
+
|
716
|
+
row.r = row_index + 1
|
717
|
+
row.spans = "#{first_nonempty_cell + 1}:#{last_nonempty_cell + 1}" unless first_nonempty_cell.nil?
|
718
|
+
row.custom_format = (row.style_index.to_i != 0)
|
719
|
+
}
|
720
|
+
|
721
|
+
if first_nonempty_row then
|
722
|
+
self.dimension ||= RubyXL::WorksheetDimensions.new
|
723
|
+
self.dimension.ref = RubyXL::Reference.new(first_nonempty_row, last_nonempty_row,
|
724
|
+
first_nonempty_column, last_nonempty_column)
|
725
|
+
end
|
726
|
+
|
727
|
+
end
|
728
|
+
|
729
|
+
true
|
730
|
+
end
|
731
|
+
|
732
|
+
def xlsx_path
|
733
|
+
ROOT.join('xl', 'worksheets', "sheet#{file_index}.xml")
|
734
|
+
end
|
735
|
+
|
736
|
+
def self.parse(param)
|
737
|
+
sheet_obj = super
|
738
|
+
sheet_obj.sheet_data.rows.each { |r|
|
739
|
+
next if r.nil?
|
740
|
+
r.worksheet = sheet_obj
|
741
|
+
r.cells.each { |c| c.worksheet = sheet_obj unless c.nil? }
|
742
|
+
}
|
743
|
+
sheet_obj
|
744
|
+
end
|
745
|
+
|
746
|
+
def get_col_xf(column_index)
|
747
|
+
workbook.stylesheet.cell_xfs[get_col_style(column_index)]
|
748
|
+
end
|
749
|
+
|
750
|
+
def get_row_xf(row)
|
751
|
+
workbook.stylesheet.cell_xfs[get_row_style(row)]
|
752
|
+
end
|
753
|
+
|
754
|
+
def cell_at(ref)
|
755
|
+
reference = RubyXL::Reference.new(ref)
|
756
|
+
raise "Invalid reference: #{ref}" unless reference.valid? && reference.single_cell?
|
757
|
+
sheet_data&.rows&.[](reference.first_row)&.cells&.[](reference.first_col)
|
758
|
+
end
|
759
|
+
|
760
|
+
include LegacyWorksheet
|
761
|
+
end
|
762
|
+
end
|