rubyXL 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rubyXL.rb +1 -0
- data/lib/rubyXL/objects/border.rb +3 -4
- data/lib/rubyXL/objects/calculation_chain.rb +1 -1
- data/lib/rubyXL/objects/cell_style.rb +3 -4
- data/lib/rubyXL/objects/chartsheet.rb +78 -0
- data/lib/rubyXL/objects/container_nodes.rb +2 -3
- data/lib/rubyXL/objects/data_validation.rb +5 -10
- data/lib/rubyXL/objects/document_properties.rb +1 -1
- data/lib/rubyXL/objects/fill.rb +3 -6
- data/lib/rubyXL/objects/filters.rb +120 -0
- data/lib/rubyXL/objects/formula.rb +2 -2
- data/lib/rubyXL/objects/ooxml_object.rb +116 -56
- data/lib/rubyXL/objects/relationships.rb +5 -1
- data/lib/rubyXL/objects/shared_strings.rb +1 -1
- data/lib/rubyXL/objects/sheet_common.rb +50 -0
- data/lib/rubyXL/objects/sheet_data.rb +6 -1
- data/lib/rubyXL/objects/simple_types.rb +78 -0
- data/lib/rubyXL/objects/stylesheet.rb +15 -3
- data/lib/rubyXL/objects/text.rb +4 -5
- data/lib/rubyXL/objects/workbook.rb +151 -26
- data/lib/rubyXL/objects/worksheet.rb +329 -107
- data/lib/rubyXL/parser.rb +12 -11
- data/lib/rubyXL/workbook.rb +3 -2
- data/rdoc/README_rdoc.html +404 -0
- data/rdoc/RubyXL.html +337 -0
- data/rdoc/RubyXL/AExtensionStorageArea.html +105 -0
- data/rdoc/RubyXL/Alignment.html +108 -0
- data/rdoc/RubyXL/AlternateContent.html +105 -0
- data/rdoc/RubyXL/AutoFilter.html +105 -0
- data/rdoc/RubyXL/AutoFilterColumn.html +105 -0
- data/rdoc/RubyXL/BooleanNode.html +105 -0
- data/rdoc/RubyXL/BooleanValue.html +105 -0
- data/rdoc/RubyXL/Border.html +105 -0
- data/rdoc/RubyXL/BorderContainer.html +105 -0
- data/rdoc/RubyXL/BorderEdge.html +156 -0
- data/rdoc/RubyXL/Break.html +105 -0
- data/rdoc/RubyXL/BreakList.html +105 -0
- data/rdoc/RubyXL/CalculationChain.html +159 -0
- data/rdoc/RubyXL/CalculationChainCell.html +108 -0
- data/rdoc/RubyXL/CalculationProperties.html +105 -0
- data/rdoc/RubyXL/Cell.html +428 -0
- data/rdoc/RubyXL/CellSmartTag.html +105 -0
- data/rdoc/RubyXL/CellSmartTagContainer.html +105 -0
- data/rdoc/RubyXL/CellSmartTagProperty.html +105 -0
- data/rdoc/RubyXL/CellStyle.html +108 -0
- data/rdoc/RubyXL/CellStyleContainer.html +105 -0
- data/rdoc/RubyXL/CellStyleXFContainer.html +105 -0
- data/rdoc/RubyXL/CellValue.html +108 -0
- data/rdoc/RubyXL/CellWatch.html +105 -0
- data/rdoc/RubyXL/CellWatchContainer.html +105 -0
- data/rdoc/RubyXL/CellXFContainer.html +105 -0
- data/rdoc/RubyXL/Chartsheet.html +105 -0
- data/rdoc/RubyXL/ChartsheetPageSetup.html +105 -0
- data/rdoc/RubyXL/ChartsheetProperties.html +108 -0
- data/rdoc/RubyXL/ChartsheetProtection.html +108 -0
- data/rdoc/RubyXL/ChartsheetView.html +105 -0
- data/rdoc/RubyXL/ChartsheetViewContainer.html +105 -0
- data/rdoc/RubyXL/Color.html +163 -0
- data/rdoc/RubyXL/ColorFilter.html +105 -0
- data/rdoc/RubyXL/ColorScale.html +105 -0
- data/rdoc/RubyXL/ColorScheme.html +105 -0
- data/rdoc/RubyXL/ColorSet.html +105 -0
- data/rdoc/RubyXL/Colors.html +105 -0
- data/rdoc/RubyXL/ColumnRange.html +233 -0
- data/rdoc/RubyXL/ColumnRanges.html +275 -0
- data/rdoc/RubyXL/ConditionalFormatValue.html +105 -0
- data/rdoc/RubyXL/ConditionalFormatting.html +105 -0
- data/rdoc/RubyXL/ConditionalFormattingRule.html +105 -0
- data/rdoc/RubyXL/CustomFilter.html +105 -0
- data/rdoc/RubyXL/CustomFilterContainer.html +105 -0
- data/rdoc/RubyXL/CustomProperty.html +105 -0
- data/rdoc/RubyXL/CustomPropertyContainer.html +105 -0
- data/rdoc/RubyXL/CustomSheetView.html +105 -0
- data/rdoc/RubyXL/CustomSheetViews.html +105 -0
- data/rdoc/RubyXL/CustomWorkbookView.html +105 -0
- data/rdoc/RubyXL/CustomWorkbookViewContainer.html +105 -0
- data/rdoc/RubyXL/DXF.html +105 -0
- data/rdoc/RubyXL/DXFs.html +105 -0
- data/rdoc/RubyXL/DataBar.html +105 -0
- data/rdoc/RubyXL/DataConsolidate.html +105 -0
- data/rdoc/RubyXL/DataConsolidationReference.html +105 -0
- data/rdoc/RubyXL/DataConsolidationReferences.html +105 -0
- data/rdoc/RubyXL/DataValidation.html +108 -0
- data/rdoc/RubyXL/DataValidations.html +105 -0
- data/rdoc/RubyXL/DateGroupItem.html +108 -0
- data/rdoc/RubyXL/DefinedName.html +105 -0
- data/rdoc/RubyXL/DefinedNames.html +105 -0
- data/rdoc/RubyXL/DocumentProperties.html +271 -0
- data/rdoc/RubyXL/DynamicFilter.html +105 -0
- data/rdoc/RubyXL/EmbeddedControl.html +105 -0
- data/rdoc/RubyXL/EmbeddedControlContainer.html +105 -0
- data/rdoc/RubyXL/Extension.html +228 -0
- data/rdoc/RubyXL/ExtensionStorageArea.html +108 -0
- data/rdoc/RubyXL/ExternalReference.html +105 -0
- data/rdoc/RubyXL/ExternalReferences.html +105 -0
- data/rdoc/RubyXL/FieldItem.html +105 -0
- data/rdoc/RubyXL/FileRecoveryProperties.html +105 -0
- data/rdoc/RubyXL/FileSharing.html +108 -0
- data/rdoc/RubyXL/FileVersion.html +108 -0
- data/rdoc/RubyXL/Fill.html +105 -0
- data/rdoc/RubyXL/FillContainer.html +105 -0
- data/rdoc/RubyXL/FilterContainer.html +105 -0
- data/rdoc/RubyXL/FloatNode.html +105 -0
- data/rdoc/RubyXL/FloatValue.html +105 -0
- data/rdoc/RubyXL/Font.html +655 -0
- data/rdoc/RubyXL/FontContainer.html +105 -0
- data/rdoc/RubyXL/FontScheme.html +105 -0
- data/rdoc/RubyXL/FormatScheme.html +105 -0
- data/rdoc/RubyXL/Formula.html +108 -0
- data/rdoc/RubyXL/FunctionGroup.html +105 -0
- data/rdoc/RubyXL/FunctionGroupContainer.html +105 -0
- data/rdoc/RubyXL/GenericStorage.html +344 -0
- data/rdoc/RubyXL/GradientFill.html +105 -0
- data/rdoc/RubyXL/HeaderFooterSettings.html +105 -0
- data/rdoc/RubyXL/Hyperlink.html +105 -0
- data/rdoc/RubyXL/HyperlinkContainer.html +105 -0
- data/rdoc/RubyXL/IconFilter.html +105 -0
- data/rdoc/RubyXL/IconSet.html +105 -0
- data/rdoc/RubyXL/IgnoredError.html +105 -0
- data/rdoc/RubyXL/IgnoredErrorContainer.html +105 -0
- data/rdoc/RubyXL/IndexedColorContainer.html +105 -0
- data/rdoc/RubyXL/InputCells.html +105 -0
- data/rdoc/RubyXL/IntegerNode.html +105 -0
- data/rdoc/RubyXL/IntegerValue.html +105 -0
- data/rdoc/RubyXL/LegacyCell.html +1498 -0
- data/rdoc/RubyXL/LegacyWorkbook.html +1283 -0
- data/rdoc/RubyXL/LegacyWorksheet.html +3291 -0
- data/rdoc/RubyXL/MRUColorContainer.html +105 -0
- data/rdoc/RubyXL/MergedCell.html +105 -0
- data/rdoc/RubyXL/MergedCells.html +105 -0
- data/rdoc/RubyXL/NumFmt.html +105 -0
- data/rdoc/RubyXL/NumberFormat.html +160 -0
- data/rdoc/RubyXL/NumberFormatContainer.html +173 -0
- data/rdoc/RubyXL/OLEObject.html +105 -0
- data/rdoc/RubyXL/OLEObjects.html +105 -0
- data/rdoc/RubyXL/OLESize.html +105 -0
- data/rdoc/RubyXL/OOXMLObject.html +862 -0
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +105 -0
- data/rdoc/RubyXL/OutlineProperties.html +108 -0
- data/rdoc/RubyXL/PageMargins.html +105 -0
- data/rdoc/RubyXL/PageSetup.html +105 -0
- data/rdoc/RubyXL/PageSetupProperties.html +108 -0
- data/rdoc/RubyXL/Pane.html +105 -0
- data/rdoc/RubyXL/Parser.html +348 -0
- data/rdoc/RubyXL/PatternFill.html +105 -0
- data/rdoc/RubyXL/PhoneticProperties.html +105 -0
- data/rdoc/RubyXL/PhoneticRun.html +105 -0
- data/rdoc/RubyXL/PivotArea.html +105 -0
- data/rdoc/RubyXL/PivotCache.html +105 -0
- data/rdoc/RubyXL/PivotCaches.html +105 -0
- data/rdoc/RubyXL/PivotReference.html +105 -0
- data/rdoc/RubyXL/PivotReferenceContainer.html +105 -0
- data/rdoc/RubyXL/PivotTableSelection.html +105 -0
- data/rdoc/RubyXL/PrintOptions.html +105 -0
- data/rdoc/RubyXL/ProtectedRange.html +105 -0
- data/rdoc/RubyXL/ProtectedRanges.html +105 -0
- data/rdoc/RubyXL/Protection.html +105 -0
- data/rdoc/RubyXL/RID.html +105 -0
- data/rdoc/RubyXL/RawOOXML.html +225 -0
- data/rdoc/RubyXL/Reference.html +642 -0
- data/rdoc/RubyXL/Relationship.html +105 -0
- data/rdoc/RubyXL/RichText.html +105 -0
- data/rdoc/RubyXL/RichTextRun.html +105 -0
- data/rdoc/RubyXL/Row.html +105 -0
- data/rdoc/RubyXL/RunProperties.html +108 -0
- data/rdoc/RubyXL/Scenario.html +105 -0
- data/rdoc/RubyXL/ScenarioContainer.html +105 -0
- data/rdoc/RubyXL/Selection.html +105 -0
- data/rdoc/RubyXL/SharedStringsTable.html +397 -0
- data/rdoc/RubyXL/Sheet.html +105 -0
- data/rdoc/RubyXL/SheetCalculationProperties.html +105 -0
- data/rdoc/RubyXL/SheetData.html +105 -0
- data/rdoc/RubyXL/Sheets.html +105 -0
- data/rdoc/RubyXL/SmartTagContainer.html +105 -0
- data/rdoc/RubyXL/SmartTagProperties.html +105 -0
- data/rdoc/RubyXL/SmartTagType.html +105 -0
- data/rdoc/RubyXL/SmartTagTypeContainer.html +105 -0
- data/rdoc/RubyXL/SortCondition.html +105 -0
- data/rdoc/RubyXL/SortState.html +105 -0
- data/rdoc/RubyXL/Sqref.html +199 -0
- data/rdoc/RubyXL/Stop.html +108 -0
- data/rdoc/RubyXL/StringNode.html +105 -0
- data/rdoc/RubyXL/StringValue.html +105 -0
- data/rdoc/RubyXL/Stylesheet.html +105 -0
- data/rdoc/RubyXL/TableParts.html +105 -0
- data/rdoc/RubyXL/TableStyle.html +105 -0
- data/rdoc/RubyXL/TableStyles.html +105 -0
- data/rdoc/RubyXL/Text.html +195 -0
- data/rdoc/RubyXL/Theme.html +105 -0
- data/rdoc/RubyXL/ThemeElements.html +105 -0
- data/rdoc/RubyXL/Top10.html +105 -0
- data/rdoc/RubyXL/Variant.html +108 -0
- data/rdoc/RubyXL/Vector.html +105 -0
- data/rdoc/RubyXL/VectorValue.html +105 -0
- data/rdoc/RubyXL/WebPublishObject.html +105 -0
- data/rdoc/RubyXL/WebPublishObjectContainer.html +105 -0
- data/rdoc/RubyXL/WebPublishingItem.html +108 -0
- data/rdoc/RubyXL/WebPublishingItemContainer.html +105 -0
- data/rdoc/RubyXL/WebPublishingProperties.html +105 -0
- data/rdoc/RubyXL/Workbook.html +105 -0
- data/rdoc/RubyXL/WorkbookProperties.html +108 -0
- data/rdoc/RubyXL/WorkbookProtection.html +105 -0
- data/rdoc/RubyXL/WorkbookRelationships.html +316 -0
- data/rdoc/RubyXL/WorkbookView.html +105 -0
- data/rdoc/RubyXL/WorkbookViews.html +105 -0
- data/rdoc/RubyXL/Worksheet.html +105 -0
- data/rdoc/RubyXL/WorksheetDimensions.html +105 -0
- data/rdoc/RubyXL/WorksheetFormatProperties.html +105 -0
- data/rdoc/RubyXL/WorksheetProperties.html +108 -0
- data/rdoc/RubyXL/WorksheetProtection.html +105 -0
- data/rdoc/RubyXL/WorksheetView.html +105 -0
- data/rdoc/RubyXL/WorksheetViews.html +105 -0
- data/rdoc/RubyXL/Writer.html +98 -0
- data/rdoc/RubyXL/Writer/ContentTypesWriter.html +289 -0
- data/rdoc/RubyXL/Writer/CoreWriter.html +210 -0
- data/rdoc/RubyXL/Writer/GenericWriter.html +348 -0
- data/rdoc/RubyXL/Writer/RootRelsWriter.html +193 -0
- data/rdoc/RubyXL/Writer/StylesWriter.html +191 -0
- data/rdoc/RubyXL/Writer/ThemeWriter.html +511 -0
- data/rdoc/RubyXL/Writer/WorkbookWriter.html +249 -0
- data/rdoc/RubyXL/Writer/WorksheetWriter.html +236 -0
- data/rdoc/RubyXL/XF.html +105 -0
- data/rdoc/created.rid +24 -21
- data/rdoc/index.html +216 -0
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/table_of_contents.html +1496 -0
- data/rubyXL.gemspec +211 -4
- data/spec/lib/parser_spec.rb +18 -6
- data/test/input/.gitkeep +0 -0
- data/test/output/.gitkeep +0 -0
- data/test/test_parse_write.rb +15 -0
- metadata +211 -4
- data/lib/rubyXL/objects/sheet_view.rb +0 -71
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'rubyXL/objects/ooxml_object'
|
2
|
-
|
3
|
-
module RubyXL
|
4
|
-
# http://www.schemacentral.com/sc/ooxml/e-ssml_pane-1.html
|
5
|
-
class Pane < OOXMLObject
|
6
|
-
define_attribute(:xSplit, :int)
|
7
|
-
define_attribute(:ySplit, :int)
|
8
|
-
define_attribute(:topLeftCell, :string)
|
9
|
-
define_attribute(:activePane, :string, :default => 'topLeft',
|
10
|
-
:values => %w{ bottomRight topRight bottomLeft topLeft })
|
11
|
-
define_attribute(:state, :string, :default=> 'split',
|
12
|
-
:values => %w{ split frozen frozenSplit })
|
13
|
-
define_element_name 'pane'
|
14
|
-
end
|
15
|
-
|
16
|
-
# http://www.schemacentral.com/sc/ooxml/e-ssml_selection-1.html
|
17
|
-
class Selection < OOXMLObject
|
18
|
-
define_attribute(:pane, :string,
|
19
|
-
:values => %w{ bottomRight topRight bottomLeft topLeft })
|
20
|
-
define_attribute(:activeCell, :ref)
|
21
|
-
define_attribute(:activeCellId, :int) # 0-based index of @active_cell in @sqref
|
22
|
-
define_attribute(:sqref, :sqref) # Array of references to the selected cells.
|
23
|
-
define_element_name 'selection'
|
24
|
-
|
25
|
-
def before_write_xml
|
26
|
-
# Normally, rindex of activeCellId in sqref:
|
27
|
-
# <selection activeCell="E12" activeCellId="9" sqref="A4 B6 C8 D10 E12 A4 B6 C8 D10 E12"/>
|
28
|
-
if @active_cell_id.nil? && !@active_cell.nil? && @sqref.size > 1 then
|
29
|
-
# But, things can be more complex:
|
30
|
-
# <selection activeCell="E8" activeCellId="2" sqref="A4:B4 C6:D6 E8:F8"/>
|
31
|
-
# Not using .reverse.each here to avoid memory reallocation.
|
32
|
-
@sqref.each_with_index { |ref, ind| @active_cell_id = ind if ref.cover?(@active_cell) }
|
33
|
-
end
|
34
|
-
true
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
# http://www.schemacentral.com/sc/ooxml/e-ssml_sheetView-1.html
|
39
|
-
class SheetView < OOXMLObject
|
40
|
-
define_attribute(:windowProtection, :bool, :default => false)
|
41
|
-
define_attribute(:showFormulas, :bool, :default => false)
|
42
|
-
define_attribute(:showGridLines, :bool, :default => true)
|
43
|
-
define_attribute(:showRowColHeaders, :bool, :default => true)
|
44
|
-
define_attribute(:showZeros, :bool, :default => true)
|
45
|
-
define_attribute(:rightToLeft, :bool, :default => false)
|
46
|
-
define_attribute(:tabSelected, :bool, :default => false)
|
47
|
-
define_attribute(:showRuler, :bool, :default => true)
|
48
|
-
define_attribute(:showOutlineSymbols, :bool, :default => true)
|
49
|
-
define_attribute(:defaultGridColor, :bool, :default => true)
|
50
|
-
define_attribute(:showWhiteSpace, :bool, :default => true)
|
51
|
-
define_attribute(:view, :string, :default => 'normal',
|
52
|
-
:values => %w{ normal pageBreakPreview pageLayout })
|
53
|
-
define_attribute(:topLeftCell, :ref)
|
54
|
-
define_attribute(:colorId, :int, :default => 64)
|
55
|
-
define_attribute(:zoomScale, :int, :default => 100)
|
56
|
-
define_attribute(:zoomScaleNormal, :int, :default => 0)
|
57
|
-
define_attribute(:zoomScaleSheetLayoutView, :bool, :default => 0)
|
58
|
-
define_attribute(:zoomScalePageLayoutView, :bool, :default => 0)
|
59
|
-
define_attribute(:workbookViewId, :int, :required => true, :default => 0 )
|
60
|
-
define_child_node(RubyXL::Pane)
|
61
|
-
define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections )
|
62
|
-
define_element_name 'sheetView'
|
63
|
-
end
|
64
|
-
|
65
|
-
# http://www.schemacentral.com/sc/ooxml/e-ssml_sheetViews-3.html
|
66
|
-
class SheetViews < OOXMLObject
|
67
|
-
define_child_node(RubyXL::SheetView, :collection => true, :accessor => :sheet_views)
|
68
|
-
define_element_name 'sheetViews'
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|