rubyXL 2.2.0 → 2.3.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/objects/border.rb +3 -3
- data/lib/rubyXL/objects/chartsheet.rb +20 -5
- data/lib/rubyXL/objects/fill.rb +3 -3
- data/lib/rubyXL/objects/filters.rb +5 -5
- data/lib/rubyXL/objects/font.rb +3 -3
- data/lib/rubyXL/objects/ooxml_object.rb +209 -138
- data/lib/rubyXL/objects/relationships.rb +2 -2
- data/lib/rubyXL/objects/sheet_common.rb +2 -2
- data/lib/rubyXL/objects/stylesheet.rb +35 -35
- data/lib/rubyXL/objects/workbook.rb +26 -27
- data/lib/rubyXL/objects/worksheet.rb +59 -51
- data/lib/rubyXL/parser.rb +22 -12
- data/lib/rubyXL/workbook.rb +5 -6
- data/lib/rubyXL/worksheet.rb +3 -3
- data/lib/rubyXL/writer/workbook_writer.rb +2 -2
- data/rdoc/README_rdoc.html +1 -1
- data/rdoc/RubyXL.html +1 -1
- data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
- data/rdoc/RubyXL/Alignment.html +1 -1
- data/rdoc/RubyXL/AlternateContent.html +1 -1
- data/rdoc/RubyXL/AutoFilter.html +1 -1
- data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
- data/rdoc/RubyXL/BooleanNode.html +1 -1
- data/rdoc/RubyXL/BooleanValue.html +1 -1
- data/rdoc/RubyXL/Border.html +1 -1
- data/rdoc/RubyXL/BorderEdge.html +1 -1
- data/rdoc/RubyXL/{FillContainer.html → Borders.html} +5 -5
- data/rdoc/RubyXL/Break.html +1 -1
- data/rdoc/RubyXL/BreakList.html +2 -2
- data/rdoc/RubyXL/CalculationChain.html +1 -1
- data/rdoc/RubyXL/CalculationChainCell.html +1 -1
- data/rdoc/RubyXL/CalculationProperties.html +1 -1
- data/rdoc/RubyXL/Cell.html +1 -1
- data/rdoc/RubyXL/CellSmartTag.html +1 -1
- data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
- data/rdoc/RubyXL/CellSmartTags.html +105 -0
- data/rdoc/RubyXL/CellStyle.html +1 -1
- data/rdoc/RubyXL/CellStyleXFs.html +105 -0
- data/rdoc/RubyXL/CellStyles.html +105 -0
- data/rdoc/RubyXL/CellValue.html +1 -1
- data/rdoc/RubyXL/CellWatch.html +1 -1
- data/rdoc/RubyXL/{CellXFContainer.html → CellWatches.html} +5 -5
- data/rdoc/RubyXL/CellXFs.html +105 -0
- data/rdoc/RubyXL/Chartsheet.html +1 -1
- data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
- data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
- data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
- data/rdoc/RubyXL/ChartsheetView.html +1 -1
- data/rdoc/RubyXL/{BorderContainer.html → ChartsheetViews.html} +4 -4
- data/rdoc/RubyXL/Color.html +1 -1
- data/rdoc/RubyXL/ColorFilter.html +1 -1
- data/rdoc/RubyXL/ColorScale.html +1 -1
- data/rdoc/RubyXL/ColorScheme.html +1 -1
- data/rdoc/RubyXL/ColorSet.html +1 -1
- data/rdoc/RubyXL/Colors.html +1 -1
- data/rdoc/RubyXL/ColumnRange.html +1 -1
- data/rdoc/RubyXL/ColumnRanges.html +1 -1
- data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
- data/rdoc/RubyXL/ConditionalFormatting.html +2 -2
- data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
- data/rdoc/RubyXL/CustomFilter.html +1 -1
- data/rdoc/RubyXL/{CustomFilterContainer.html → CustomFilters.html} +5 -5
- data/rdoc/RubyXL/{CellStyleXFContainer.html → CustomProperties.html} +5 -5
- data/rdoc/RubyXL/CustomProperty.html +1 -1
- data/rdoc/RubyXL/CustomSheetView.html +1 -1
- data/rdoc/RubyXL/CustomSheetViews.html +2 -2
- data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
- data/rdoc/RubyXL/{CustomWorkbookViewContainer.html → CustomWorkbookViews.html} +5 -5
- data/rdoc/RubyXL/DXF.html +1 -1
- data/rdoc/RubyXL/DXFs.html +1 -1
- data/rdoc/RubyXL/DataBar.html +1 -1
- data/rdoc/RubyXL/DataConsolidate.html +1 -1
- data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
- data/rdoc/RubyXL/DataConsolidationReferences.html +2 -2
- data/rdoc/RubyXL/DataValidation.html +1 -1
- data/rdoc/RubyXL/DataValidations.html +1 -1
- data/rdoc/RubyXL/DateGroupItem.html +1 -1
- data/rdoc/RubyXL/DefinedName.html +1 -1
- data/rdoc/RubyXL/DefinedNames.html +2 -2
- data/rdoc/RubyXL/DocumentProperties.html +1 -1
- data/rdoc/RubyXL/DynamicFilter.html +1 -1
- data/rdoc/RubyXL/EmbeddedControl.html +1 -1
- data/rdoc/RubyXL/{EmbeddedControlContainer.html → EmbeddedControls.html} +5 -5
- data/rdoc/RubyXL/Extension.html +1 -1
- data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
- data/rdoc/RubyXL/ExternalReference.html +1 -1
- data/rdoc/RubyXL/ExternalReferences.html +2 -2
- data/rdoc/RubyXL/FieldItem.html +1 -1
- data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
- data/rdoc/RubyXL/FileSharing.html +1 -1
- data/rdoc/RubyXL/FileVersion.html +1 -1
- data/rdoc/RubyXL/Fill.html +1 -1
- data/rdoc/RubyXL/{FontContainer.html → Fills.html} +5 -5
- data/rdoc/RubyXL/FilterContainer.html +1 -1
- data/rdoc/RubyXL/FloatNode.html +1 -1
- data/rdoc/RubyXL/FloatValue.html +1 -1
- data/rdoc/RubyXL/Font.html +1 -1
- data/rdoc/RubyXL/FontScheme.html +1 -1
- data/rdoc/RubyXL/Fonts.html +105 -0
- data/rdoc/RubyXL/FormatScheme.html +1 -1
- data/rdoc/RubyXL/Formula.html +1 -1
- data/rdoc/RubyXL/FunctionGroup.html +1 -1
- data/rdoc/RubyXL/{CellWatchContainer.html → FunctionGroups.html} +5 -5
- data/rdoc/RubyXL/GenericStorage.html +1 -1
- data/rdoc/RubyXL/GradientFill.html +1 -1
- data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
- data/rdoc/RubyXL/Hyperlink.html +1 -1
- data/rdoc/RubyXL/Hyperlinks.html +105 -0
- data/rdoc/RubyXL/IconFilter.html +1 -1
- data/rdoc/RubyXL/IconSet.html +1 -1
- data/rdoc/RubyXL/IgnoredError.html +1 -1
- data/rdoc/RubyXL/IgnoredErrors.html +105 -0
- data/rdoc/RubyXL/IndexedColors.html +105 -0
- data/rdoc/RubyXL/InputCells.html +1 -1
- data/rdoc/RubyXL/IntegerNode.html +1 -1
- data/rdoc/RubyXL/IntegerValue.html +1 -1
- data/rdoc/RubyXL/LegacyCell.html +1 -1
- data/rdoc/RubyXL/LegacyWorkbook.html +25 -25
- data/rdoc/RubyXL/LegacyWorksheet.html +3 -29
- data/rdoc/RubyXL/{ChartsheetViewContainer.html → MRUColors.html} +5 -5
- data/rdoc/RubyXL/MergedCell.html +1 -1
- data/rdoc/RubyXL/MergedCells.html +2 -2
- data/rdoc/RubyXL/NumFmt.html +1 -1
- data/rdoc/RubyXL/NumberFormat.html +1 -1
- data/rdoc/RubyXL/{NumberFormatContainer.html → NumberFormats.html} +6 -6
- data/rdoc/RubyXL/OLEObject.html +1 -1
- data/rdoc/RubyXL/OLEObjects.html +2 -2
- data/rdoc/RubyXL/OLESize.html +1 -1
- data/rdoc/RubyXL/OOXMLContainerObject.html +105 -0
- data/rdoc/RubyXL/OOXMLObject.html +1 -758
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +559 -0
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +98 -0
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
- data/rdoc/RubyXL/OutlineProperties.html +1 -1
- data/rdoc/RubyXL/PageMargins.html +1 -1
- data/rdoc/RubyXL/PageSetup.html +1 -1
- data/rdoc/RubyXL/PageSetupProperties.html +1 -1
- data/rdoc/RubyXL/Pane.html +1 -1
- data/rdoc/RubyXL/Parser.html +23 -13
- data/rdoc/RubyXL/PatternFill.html +1 -1
- data/rdoc/RubyXL/PhoneticProperties.html +1 -1
- data/rdoc/RubyXL/PhoneticRun.html +1 -1
- data/rdoc/RubyXL/PivotArea.html +1 -1
- data/rdoc/RubyXL/PivotCache.html +1 -1
- data/rdoc/RubyXL/PivotCaches.html +2 -2
- data/rdoc/RubyXL/PivotReference.html +1 -1
- data/rdoc/RubyXL/{CellStyleContainer.html → PivotReferences.html} +5 -5
- data/rdoc/RubyXL/PivotTableSelection.html +1 -1
- data/rdoc/RubyXL/PrintOptions.html +1 -1
- data/rdoc/RubyXL/ProtectedRange.html +1 -1
- data/rdoc/RubyXL/ProtectedRanges.html +2 -2
- data/rdoc/RubyXL/Protection.html +1 -1
- data/rdoc/RubyXL/RID.html +1 -1
- data/rdoc/RubyXL/RawOOXML.html +1 -1
- data/rdoc/RubyXL/Reference.html +1 -1
- data/rdoc/RubyXL/Relationship.html +1 -1
- data/rdoc/RubyXL/RichText.html +1 -1
- data/rdoc/RubyXL/RichTextRun.html +1 -1
- data/rdoc/RubyXL/Row.html +1 -1
- data/rdoc/RubyXL/RunProperties.html +1 -1
- data/rdoc/RubyXL/Scenario.html +1 -1
- data/rdoc/RubyXL/Scenarios.html +105 -0
- data/rdoc/RubyXL/Selection.html +1 -1
- data/rdoc/RubyXL/SharedStringsTable.html +3 -3
- data/rdoc/RubyXL/Sheet.html +1 -1
- data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
- data/rdoc/RubyXL/SheetData.html +1 -1
- data/rdoc/RubyXL/Sheets.html +2 -2
- data/rdoc/RubyXL/SmartTagProperties.html +1 -1
- data/rdoc/RubyXL/SmartTagType.html +1 -1
- data/rdoc/RubyXL/SmartTagTypes.html +105 -0
- data/rdoc/RubyXL/SmartTags.html +105 -0
- data/rdoc/RubyXL/SortCondition.html +1 -1
- data/rdoc/RubyXL/SortState.html +1 -1
- data/rdoc/RubyXL/Sqref.html +1 -1
- data/rdoc/RubyXL/Stop.html +1 -1
- data/rdoc/RubyXL/StringNode.html +1 -1
- data/rdoc/RubyXL/StringValue.html +1 -1
- data/rdoc/RubyXL/Stylesheet.html +1 -1
- data/rdoc/RubyXL/TableParts.html +2 -2
- data/rdoc/RubyXL/TableStyle.html +1 -1
- data/rdoc/RubyXL/TableStyles.html +2 -2
- data/rdoc/RubyXL/Text.html +1 -1
- data/rdoc/RubyXL/Theme.html +1 -1
- data/rdoc/RubyXL/ThemeElements.html +1 -1
- data/rdoc/RubyXL/Top10.html +1 -1
- data/rdoc/RubyXL/Variant.html +1 -1
- data/rdoc/RubyXL/Vector.html +1 -1
- data/rdoc/RubyXL/VectorValue.html +1 -1
- data/rdoc/RubyXL/WebPublishObject.html +1 -1
- data/rdoc/RubyXL/{WebPublishObjectContainer.html → WebPublishObjects.html} +5 -5
- data/rdoc/RubyXL/WebPublishingItem.html +1 -1
- data/rdoc/RubyXL/{WebPublishingItemContainer.html → WebPublishingItems.html} +5 -5
- data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
- data/rdoc/RubyXL/Workbook.html +1 -1
- data/rdoc/RubyXL/WorkbookProperties.html +1 -1
- data/rdoc/RubyXL/WorkbookProtection.html +1 -1
- data/rdoc/RubyXL/WorkbookRelationships.html +3 -3
- data/rdoc/RubyXL/WorkbookView.html +1 -1
- data/rdoc/RubyXL/WorkbookViews.html +2 -2
- data/rdoc/RubyXL/Worksheet.html +1 -1
- data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
- data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
- data/rdoc/RubyXL/WorksheetProperties.html +1 -1
- data/rdoc/RubyXL/WorksheetProtection.html +1 -1
- data/rdoc/RubyXL/WorksheetView.html +1 -1
- data/rdoc/RubyXL/WorksheetViews.html +2 -2
- data/rdoc/RubyXL/Writer.html +1 -1
- data/rdoc/RubyXL/Writer/ContentTypesWriter.html +1 -1
- data/rdoc/RubyXL/Writer/CoreWriter.html +1 -1
- data/rdoc/RubyXL/Writer/GenericWriter.html +1 -1
- data/rdoc/RubyXL/Writer/RootRelsWriter.html +1 -1
- data/rdoc/RubyXL/Writer/StylesWriter.html +1 -1
- data/rdoc/RubyXL/Writer/ThemeWriter.html +1 -1
- data/rdoc/RubyXL/Writer/WorkbookWriter.html +3 -3
- data/rdoc/RubyXL/XF.html +1 -1
- data/rdoc/created.rid +19 -20
- data/rdoc/index.html +4 -6
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/table_of_contents.html +89 -132
- data/rubyXL.gemspec +30 -29
- data/spec/lib/parser_spec.rb +3 -1
- data/spec/lib/stylesheet_spec.rb +1 -1
- metadata +31 -30
- data/lib/rubyXL/writer/worksheet_writer.rb +0 -41
- data/rdoc/RubyXL/CellSmartTagContainer.html +0 -105
- data/rdoc/RubyXL/CustomPropertyContainer.html +0 -105
- data/rdoc/RubyXL/FunctionGroupContainer.html +0 -105
- data/rdoc/RubyXL/HyperlinkContainer.html +0 -105
- data/rdoc/RubyXL/IgnoredErrorContainer.html +0 -105
- data/rdoc/RubyXL/IndexedColorContainer.html +0 -105
- data/rdoc/RubyXL/MRUColorContainer.html +0 -105
- data/rdoc/RubyXL/PivotReferenceContainer.html +0 -105
- data/rdoc/RubyXL/ScenarioContainer.html +0 -105
- data/rdoc/RubyXL/SmartTagContainer.html +0 -105
- data/rdoc/RubyXL/SmartTagTypeContainer.html +0 -105
- data/rdoc/RubyXL/Writer/WorksheetWriter.html +0 -236
@@ -30,8 +30,8 @@ module RubyXL
|
|
30
30
|
def before_write_xml
|
31
31
|
self.relationships = []
|
32
32
|
|
33
|
-
@workbook.worksheets.
|
34
|
-
relationships << create_relationship(
|
33
|
+
@workbook.worksheets.each_with_index { |sheet, i|
|
34
|
+
relationships << create_relationship(sheet.filepath.gsub(/^xl\//, ''), sheet.rel_type)
|
35
35
|
}
|
36
36
|
|
37
37
|
@workbook.external_links.each_key { |k|
|
@@ -16,8 +16,8 @@ module RubyXL
|
|
16
16
|
end
|
17
17
|
|
18
18
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_webPublishItems-1.html
|
19
|
-
class
|
20
|
-
define_child_node(RubyXL::WebPublishingItem, :collection => :with_count
|
19
|
+
class WebPublishingItems < OOXMLContainerObject
|
20
|
+
define_child_node(RubyXL::WebPublishingItem, :collection => :with_count)
|
21
21
|
define_element_name 'webPublishItems'
|
22
22
|
end
|
23
23
|
|
@@ -21,11 +21,11 @@ module RubyXL
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_numFmts-1.html
|
24
|
-
class
|
25
|
-
define_child_node(RubyXL::NumberFormat, :collection => :with_count
|
24
|
+
class NumberFormats < OOXMLContainerObject
|
25
|
+
define_child_node(RubyXL::NumberFormat, :collection => :with_count)
|
26
26
|
define_element_name 'numFmts'
|
27
27
|
|
28
|
-
DEFAULT_NUMBER_FORMATS = self.new(:
|
28
|
+
DEFAULT_NUMBER_FORMATS = self.new(:_ => [
|
29
29
|
RubyXL::NumberFormat.new(:num_fmt_id => 1, :format_code => '0'),
|
30
30
|
RubyXL::NumberFormat.new(:num_fmt_id => 2, :format_code => '0.00'),
|
31
31
|
RubyXL::NumberFormat.new(:num_fmt_id => 3, :format_code => '#, ##0'),
|
@@ -60,28 +60,28 @@ module RubyXL
|
|
60
60
|
])
|
61
61
|
|
62
62
|
def find_by_format_id(format_id)
|
63
|
-
|
63
|
+
self.find { |fmt| fmt.num_fmt_id == format_id }
|
64
64
|
end
|
65
65
|
|
66
66
|
end
|
67
67
|
|
68
68
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_cellStyleXfs-1.html
|
69
|
-
class
|
70
|
-
define_child_node(RubyXL::XF, :collection => :with_count
|
69
|
+
class CellStyleXFs < OOXMLContainerObject
|
70
|
+
define_child_node(RubyXL::XF, :collection => :with_count)
|
71
71
|
define_element_name 'cellStyleXfs'
|
72
72
|
|
73
73
|
def self.defaults
|
74
|
-
self.new(:
|
74
|
+
self.new(:_ => [ RubyXL::XF.new(:num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0) ])
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
78
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_cellXfs-1.html
|
79
|
-
class
|
80
|
-
define_child_node(RubyXL::XF, :collection => :with_count
|
79
|
+
class CellXFs < OOXMLContainerObject
|
80
|
+
define_child_node(RubyXL::XF, :collection => :with_count)
|
81
81
|
define_element_name 'cellXfs'
|
82
82
|
|
83
83
|
def self.defaults
|
84
|
-
self.new(:
|
84
|
+
self.new(:_ => [
|
85
85
|
RubyXL::XF.new(
|
86
86
|
:num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0, :xfId => 0
|
87
87
|
)
|
@@ -90,12 +90,12 @@ module RubyXL
|
|
90
90
|
end
|
91
91
|
|
92
92
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_cellStyles-1.html
|
93
|
-
class
|
94
|
-
define_child_node(RubyXL::CellStyle, :collection => :with_count
|
93
|
+
class CellStyles < OOXMLContainerObject
|
94
|
+
define_child_node(RubyXL::CellStyle, :collection => :with_count)
|
95
95
|
define_element_name 'cellStyles'
|
96
96
|
|
97
97
|
def self.defaults
|
98
|
-
self.new(:
|
98
|
+
self.new(:_ => [ RubyXL::CellStyle.new(:builtin_id => 0, :name => 'Normal', :xf_id => 0) ])
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
@@ -127,7 +127,7 @@ module RubyXL
|
|
127
127
|
end
|
128
128
|
|
129
129
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_tableStyles-1.html
|
130
|
-
class TableStyles <
|
130
|
+
class TableStyles < OOXMLContainerObject
|
131
131
|
define_attribute(:defaultTableStyle, :string)
|
132
132
|
define_attribute(:defaultPivotStyle, :string)
|
133
133
|
define_child_node(RubyXL::TableStyle, :collection => :with_count)
|
@@ -140,33 +140,33 @@ module RubyXL
|
|
140
140
|
end
|
141
141
|
|
142
142
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_colors-1.html
|
143
|
-
class
|
144
|
-
define_child_node(RubyXL::Color, :collection => :true, :
|
143
|
+
class IndexedColors < OOXMLContainerObject
|
144
|
+
define_child_node(RubyXL::Color, :collection => :true, :node_name => :rgbColor)
|
145
145
|
define_element_name 'indexedColors'
|
146
146
|
end
|
147
147
|
|
148
148
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_mruColors-1.html
|
149
|
-
class
|
150
|
-
define_child_node(RubyXL::Color, :collection => :true
|
149
|
+
class MRUColors < OOXMLContainerObject
|
150
|
+
define_child_node(RubyXL::Color, :collection => :true)
|
151
151
|
define_element_name 'mruColors'
|
152
152
|
end
|
153
153
|
|
154
154
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_colors-1.html
|
155
155
|
class Colors < OOXMLObject
|
156
|
-
define_child_node(RubyXL::
|
157
|
-
define_child_node(RubyXL::
|
156
|
+
define_child_node(RubyXL::IndexedColors)
|
157
|
+
define_child_node(RubyXL::MRUColors)
|
158
158
|
define_element_name 'colors'
|
159
159
|
end
|
160
160
|
|
161
161
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_styleSheet.html
|
162
162
|
class Stylesheet < OOXMLTopLevelObject
|
163
|
-
define_child_node(RubyXL::
|
164
|
-
define_child_node(RubyXL::
|
165
|
-
define_child_node(RubyXL::
|
166
|
-
define_child_node(RubyXL::
|
167
|
-
define_child_node(RubyXL::
|
168
|
-
define_child_node(RubyXL::
|
169
|
-
define_child_node(RubyXL::
|
163
|
+
define_child_node(RubyXL::NumberFormats, :accessor => :number_formats)
|
164
|
+
define_child_node(RubyXL::Fonts)
|
165
|
+
define_child_node(RubyXL::Fills)
|
166
|
+
define_child_node(RubyXL::Borders)
|
167
|
+
define_child_node(RubyXL::CellStyleXFs)
|
168
|
+
define_child_node(RubyXL::CellXFs)
|
169
|
+
define_child_node(RubyXL::CellStyles)
|
170
170
|
define_child_node(RubyXL::DXFs)
|
171
171
|
define_child_node(RubyXL::TableStyles)
|
172
172
|
define_child_node(RubyXL::Colors)
|
@@ -188,20 +188,20 @@ module RubyXL
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def self.default
|
191
|
-
self.new(:
|
192
|
-
:
|
193
|
-
:
|
194
|
-
:
|
195
|
-
:
|
196
|
-
:
|
191
|
+
self.new(:fonts => RubyXL::Fonts.defaults,
|
192
|
+
:fills => RubyXL::Fills.defaults,
|
193
|
+
:borders => RubyXL::Borders.defaults,
|
194
|
+
:cell_xfs => RubyXL::CellXFs.defaults,
|
195
|
+
:cell_styles => RubyXL::CellStyles.defaults,
|
196
|
+
:cell_style_xfs => RubyXL::CellStyleXFs.defaults)
|
197
197
|
end
|
198
198
|
|
199
199
|
def get_number_format_by_id(format_id)
|
200
200
|
@format_hash ||= {}
|
201
201
|
|
202
202
|
if @format_hash[format_id].nil? then
|
203
|
-
@format_hash[format_id] =
|
204
|
-
(
|
203
|
+
@format_hash[format_id] = NumberFormats::DEFAULT_NUMBER_FORMATS.find_by_format_id(format_id) ||
|
204
|
+
(number_formats && number_formats.find_by_format_id(format_id))
|
205
205
|
end
|
206
206
|
|
207
207
|
@format_hash[format_id]
|
@@ -77,7 +77,7 @@ module RubyXL
|
|
77
77
|
end
|
78
78
|
|
79
79
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_bookViews-1.html
|
80
|
-
class WorkbookViews <
|
80
|
+
class WorkbookViews < OOXMLContainerObject
|
81
81
|
define_child_node(RubyXL::WorkbookView, :collection => true)
|
82
82
|
define_element_name 'bookViews'
|
83
83
|
end
|
@@ -92,8 +92,8 @@ module RubyXL
|
|
92
92
|
end
|
93
93
|
|
94
94
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_sheets-1.html
|
95
|
-
class Sheets <
|
96
|
-
define_child_node(RubyXL::Sheet, :collection => true
|
95
|
+
class Sheets < OOXMLContainerObject
|
96
|
+
define_child_node(RubyXL::Sheet, :collection => true)
|
97
97
|
define_element_name 'sheets'
|
98
98
|
end
|
99
99
|
|
@@ -104,8 +104,8 @@ module RubyXL
|
|
104
104
|
end
|
105
105
|
|
106
106
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_externalReferences-1.html
|
107
|
-
class ExternalReferences <
|
108
|
-
define_child_node(RubyXL::ExternalReference, :collection => true
|
107
|
+
class ExternalReferences < OOXMLContainerObject
|
108
|
+
define_child_node(RubyXL::ExternalReference, :collection => true)
|
109
109
|
define_element_name 'externalReferences'
|
110
110
|
end
|
111
111
|
|
@@ -134,8 +134,8 @@ module RubyXL
|
|
134
134
|
end
|
135
135
|
|
136
136
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_definedName-2.html
|
137
|
-
class DefinedNames <
|
138
|
-
define_child_node(RubyXL::DefinedName, :collection => true
|
137
|
+
class DefinedNames < OOXMLContainerObject
|
138
|
+
define_child_node(RubyXL::DefinedName, :collection => true)
|
139
139
|
define_element_name 'definedNames'
|
140
140
|
end
|
141
141
|
|
@@ -147,8 +147,8 @@ module RubyXL
|
|
147
147
|
end
|
148
148
|
|
149
149
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_pivotCaches-1.html
|
150
|
-
class PivotCaches <
|
151
|
-
define_child_node(RubyXL::PivotCache, :collection => true
|
150
|
+
class PivotCaches < OOXMLContainerObject
|
151
|
+
define_child_node(RubyXL::PivotCache, :collection => true)
|
152
152
|
define_element_name 'pivotCaches'
|
153
153
|
end
|
154
154
|
|
@@ -210,8 +210,8 @@ module RubyXL
|
|
210
210
|
end
|
211
211
|
|
212
212
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_webPublishObjects-1.html
|
213
|
-
class
|
214
|
-
define_child_node(RubyXL::WebPublishObject, :collection => :with_count
|
213
|
+
class WebPublishObjects < OOXMLContainerObject
|
214
|
+
define_child_node(RubyXL::WebPublishObject, :collection => :with_count)
|
215
215
|
define_element_name 'webPublishObjects'
|
216
216
|
end
|
217
217
|
|
@@ -231,8 +231,8 @@ module RubyXL
|
|
231
231
|
end
|
232
232
|
|
233
233
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_smartTagTypes-1.html
|
234
|
-
class
|
235
|
-
define_child_node(RubyXL::SmartTagType, :collection => :true
|
234
|
+
class SmartTagTypes < OOXMLContainerObject
|
235
|
+
define_child_node(RubyXL::SmartTagType, :collection => :true)
|
236
236
|
define_element_name 'smartTagTypes'
|
237
237
|
end
|
238
238
|
|
@@ -243,9 +243,9 @@ module RubyXL
|
|
243
243
|
end
|
244
244
|
|
245
245
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_functionGroups-1.html
|
246
|
-
class
|
246
|
+
class FunctionGroups < OOXMLContainerObject
|
247
247
|
define_attribute(:builtInGroupCountpi, :int, :default => 16)
|
248
|
-
define_child_node(RubyXL::FunctionGroup, :collection => :true
|
248
|
+
define_child_node(RubyXL::FunctionGroup, :collection => :true)
|
249
249
|
define_element_name 'functionGroups'
|
250
250
|
end
|
251
251
|
|
@@ -280,12 +280,11 @@ module RubyXL
|
|
280
280
|
end
|
281
281
|
|
282
282
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_customWorkbookViews-1.html
|
283
|
-
class
|
284
|
-
define_child_node(RubyXL::CustomWorkbookView, :collection => true
|
283
|
+
class CustomWorkbookViews < OOXMLContainerObject
|
284
|
+
define_child_node(RubyXL::CustomWorkbookView, :collection => true)
|
285
285
|
define_element_name 'customWorkbookView'
|
286
286
|
end
|
287
|
-
|
288
|
-
|
287
|
+
|
289
288
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_workbook.html
|
290
289
|
class Workbook < OOXMLTopLevelObject
|
291
290
|
define_child_node(RubyXL::FileVersion)
|
@@ -293,19 +292,19 @@ module RubyXL
|
|
293
292
|
define_child_node(RubyXL::WorkbookProperties, :accessor => :workbook_properties)
|
294
293
|
define_child_node(RubyXL::WorkbookProtection)
|
295
294
|
define_child_node(RubyXL::WorkbookViews)
|
296
|
-
define_child_node(RubyXL::Sheets
|
297
|
-
define_child_node(RubyXL::
|
298
|
-
define_child_node(RubyXL::ExternalReferences
|
299
|
-
define_child_node(RubyXL::DefinedNames
|
295
|
+
define_child_node(RubyXL::Sheets)
|
296
|
+
define_child_node(RubyXL::FunctionGroups)
|
297
|
+
define_child_node(RubyXL::ExternalReferences)
|
298
|
+
define_child_node(RubyXL::DefinedNames)
|
300
299
|
define_child_node(RubyXL::CalculationProperties)
|
301
300
|
define_child_node(RubyXL::OLESize)
|
302
|
-
define_child_node(RubyXL::
|
303
|
-
define_child_node(RubyXL::PivotCaches
|
301
|
+
define_child_node(RubyXL::CustomWorkbookViews)
|
302
|
+
define_child_node(RubyXL::PivotCaches)
|
304
303
|
define_child_node(RubyXL::SmartTagProperties)
|
305
|
-
define_child_node(RubyXL::
|
304
|
+
define_child_node(RubyXL::SmartTagTypes)
|
306
305
|
define_child_node(RubyXL::WebPublishingProperties)
|
307
306
|
define_child_node(RubyXL::FileRecoveryProperties)
|
308
|
-
define_child_node(RubyXL::
|
307
|
+
define_child_node(RubyXL::WebPublishObjects)
|
309
308
|
define_child_node(RubyXL::ExtensionStorageArea)
|
310
309
|
define_child_node(RubyXL::AlternateContent)
|
311
310
|
|
@@ -87,7 +87,7 @@ module RubyXL
|
|
87
87
|
define_element_name 'pageSetup'
|
88
88
|
end
|
89
89
|
|
90
|
-
class TableParts <
|
90
|
+
class TableParts < OOXMLContainerObject
|
91
91
|
define_child_node(RubyXL::RID, :collection => :with_count, :node_name => :table_part)
|
92
92
|
define_element_name 'tableParts'
|
93
93
|
end
|
@@ -99,7 +99,7 @@ module RubyXL
|
|
99
99
|
end
|
100
100
|
|
101
101
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_mergeCells-1.html
|
102
|
-
class MergedCells <
|
102
|
+
class MergedCells < OOXMLContainerObject
|
103
103
|
define_child_node(RubyXL::MergedCell, :collection => :with_count)
|
104
104
|
define_element_name 'mergeCells'
|
105
105
|
end
|
@@ -130,7 +130,7 @@ module RubyXL
|
|
130
130
|
end
|
131
131
|
|
132
132
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_protectedRanges-1.html
|
133
|
-
class ProtectedRanges <
|
133
|
+
class ProtectedRanges < OOXMLContainerObject
|
134
134
|
define_child_node(RubyXL::ProtectedRange, :collection => true)
|
135
135
|
define_element_name 'protectedRanges'
|
136
136
|
end
|
@@ -227,16 +227,16 @@ module RubyXL
|
|
227
227
|
end
|
228
228
|
|
229
229
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_rowBreaks-1.html
|
230
|
-
class BreakList <
|
230
|
+
class BreakList < OOXMLContainerObject
|
231
231
|
define_attribute(:manualBreakCount, :int, :default => 0)
|
232
232
|
define_child_node(RubyXL::Break, :collection => :with_count)
|
233
233
|
end
|
234
234
|
|
235
235
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_conditionalFormatting-1.html
|
236
|
-
class ConditionalFormatting <
|
236
|
+
class ConditionalFormatting < OOXMLContainerObject
|
237
237
|
define_attribute(:pivot, :bool, :default => false)
|
238
238
|
define_attribute(:sqref, :sqref)
|
239
|
-
define_child_node(RubyXL::ConditionalFormattingRule, :collection => true
|
239
|
+
define_child_node(RubyXL::ConditionalFormattingRule, :collection => true)
|
240
240
|
define_child_node(RubyXL::ExtensionStorageArea)
|
241
241
|
define_element_name 'conditionalFormatting'
|
242
242
|
end
|
@@ -263,11 +263,11 @@ module RubyXL
|
|
263
263
|
end
|
264
264
|
|
265
265
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_scenarios-1.html
|
266
|
-
class
|
266
|
+
class Scenarios < OOXMLContainerObject
|
267
267
|
define_attribute(:current, :int)
|
268
268
|
define_attribute(:show, :int)
|
269
269
|
define_attribute(:sqref, :sqref)
|
270
|
-
define_child_node(RubyXL::Scenario, :collection => true
|
270
|
+
define_child_node(RubyXL::Scenario, :collection => true)
|
271
271
|
define_element_name 'scenarios'
|
272
272
|
end
|
273
273
|
|
@@ -288,8 +288,8 @@ module RubyXL
|
|
288
288
|
end
|
289
289
|
|
290
290
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_ignoredErrors-1.html
|
291
|
-
class
|
292
|
-
define_child_node(RubyXL::IgnoredError, :collection => true
|
291
|
+
class IgnoredErrors < OOXMLContainerObject
|
292
|
+
define_child_node(RubyXL::IgnoredError, :collection => true)
|
293
293
|
define_child_node(RubyXL::ExtensionStorageArea)
|
294
294
|
define_element_name 'ignoredErrors'
|
295
295
|
end
|
@@ -305,8 +305,8 @@ module RubyXL
|
|
305
305
|
end
|
306
306
|
|
307
307
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_hyperlinks-1.html
|
308
|
-
class
|
309
|
-
define_child_node(RubyXL::Hyperlink, :colection => true
|
308
|
+
class Hyperlinks < OOXMLContainerObject
|
309
|
+
define_child_node(RubyXL::Hyperlink, :colection => true)
|
310
310
|
define_element_name 'hyperlinks'
|
311
311
|
end
|
312
312
|
|
@@ -323,8 +323,8 @@ module RubyXL
|
|
323
323
|
end
|
324
324
|
|
325
325
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_oleObjects-1.html
|
326
|
-
class OLEObjects <
|
327
|
-
define_child_node(RubyXL::OLEObject, :colection => true
|
326
|
+
class OLEObjects < OOXMLContainerObject
|
327
|
+
define_child_node(RubyXL::OLEObject, :colection => true)
|
328
328
|
define_element_name 'oleObjects'
|
329
329
|
end
|
330
330
|
|
@@ -338,8 +338,8 @@ module RubyXL
|
|
338
338
|
end
|
339
339
|
|
340
340
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_dataRefs-1.html
|
341
|
-
class DataConsolidationReferences <
|
342
|
-
define_child_node(RubyXL::DataConsolidationReference, :collection => :with_count
|
341
|
+
class DataConsolidationReferences < OOXMLContainerObject
|
342
|
+
define_child_node(RubyXL::DataConsolidationReference, :collection => :with_count)
|
343
343
|
define_element_name 'dataRefs'
|
344
344
|
end
|
345
345
|
|
@@ -349,7 +349,7 @@ module RubyXL
|
|
349
349
|
define_attribute(:leftLabels, :bool, :default => false)
|
350
350
|
define_attribute(:topLabels, :bool, :default => false)
|
351
351
|
define_attribute(:link, :bool, :default => false)
|
352
|
-
define_child_node(RubyXL::DataConsolidationReferences
|
352
|
+
define_child_node(RubyXL::DataConsolidationReferences)
|
353
353
|
define_element_name 'dataConsolidate'
|
354
354
|
end
|
355
355
|
|
@@ -420,8 +420,8 @@ module RubyXL
|
|
420
420
|
end
|
421
421
|
|
422
422
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_customSheetViews-1.html
|
423
|
-
class CustomSheetViews <
|
424
|
-
define_child_node(RubyXL::CustomSheetView, :collection => true
|
423
|
+
class CustomSheetViews < OOXMLContainerObject
|
424
|
+
define_child_node(RubyXL::CustomSheetView, :collection => true)
|
425
425
|
define_element_name 'customSheetViews'
|
426
426
|
end
|
427
427
|
|
@@ -434,8 +434,8 @@ module RubyXL
|
|
434
434
|
end
|
435
435
|
|
436
436
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_controls-1.html
|
437
|
-
class
|
438
|
-
define_child_node(RubyXL::EmbeddedControl, :collection => true
|
437
|
+
class EmbeddedControls < OOXMLContainerObject
|
438
|
+
define_child_node(RubyXL::EmbeddedControl, :collection => true)
|
439
439
|
define_element_name 'controls'
|
440
440
|
end
|
441
441
|
|
@@ -446,8 +446,8 @@ module RubyXL
|
|
446
446
|
end
|
447
447
|
|
448
448
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_cellWatches-1.html
|
449
|
-
class
|
450
|
-
define_child_node(RubyXL::CellWatch, :collection => true
|
449
|
+
class CellWatches < OOXMLContainerObject
|
450
|
+
define_child_node(RubyXL::CellWatch, :collection => true)
|
451
451
|
define_element_name 'cellWatches'
|
452
452
|
end
|
453
453
|
|
@@ -468,15 +468,15 @@ module RubyXL
|
|
468
468
|
end
|
469
469
|
|
470
470
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_cellSmartTags-1.html
|
471
|
-
class
|
471
|
+
class CellSmartTags < OOXMLContainerObject
|
472
472
|
define_attribute(:r, :ref, :accessor => :ref)
|
473
|
-
define_child_node(RubyXL::CellSmartTag, :collection => :true
|
473
|
+
define_child_node(RubyXL::CellSmartTag, :collection => :true)
|
474
474
|
define_element_name 'cellSmartTags'
|
475
475
|
end
|
476
476
|
|
477
477
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_smartTags-1.html
|
478
|
-
class
|
479
|
-
define_child_node(RubyXL::
|
478
|
+
class SmartTags < OOXMLContainerObject
|
479
|
+
define_child_node(RubyXL::CellSmartTags, :collection => :true)
|
480
480
|
define_element_name 'smartTags'
|
481
481
|
end
|
482
482
|
|
@@ -488,8 +488,8 @@ module RubyXL
|
|
488
488
|
end
|
489
489
|
|
490
490
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_customProperties-1.html
|
491
|
-
class
|
492
|
-
define_child_node(RubyXL::CustomProperty, :collection => :true
|
491
|
+
class CustomProperties < OOXMLContainerObject
|
492
|
+
define_child_node(RubyXL::CustomProperty, :collection => :true)
|
493
493
|
define_element_name 'customProperties'
|
494
494
|
end
|
495
495
|
|
@@ -522,8 +522,8 @@ module RubyXL
|
|
522
522
|
end
|
523
523
|
|
524
524
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_references-1.html
|
525
|
-
class
|
526
|
-
define_child_node(RubyXL::PivotReference, :collection => :with_count
|
525
|
+
class PivotReferences < OOXMLContainerObject
|
526
|
+
define_child_node(RubyXL::PivotReference, :collection => :with_count)
|
527
527
|
define_element_name 'references'
|
528
528
|
end
|
529
529
|
|
@@ -541,7 +541,7 @@ module RubyXL
|
|
541
541
|
define_attribute(:collapsedLevelsAreSubtotals, :bool, :default => false)
|
542
542
|
define_attribute(:axis, RubyXL::ST_Axis)
|
543
543
|
define_attribute(:fieldPosition, :int, :default => 0)
|
544
|
-
define_child_node(RubyXL::
|
544
|
+
define_child_node(RubyXL::PivotReferences)
|
545
545
|
define_child_node(RubyXL::ExtensionStorageArea)
|
546
546
|
define_element_name 'pivotArea'
|
547
547
|
end
|
@@ -591,57 +591,57 @@ module RubyXL
|
|
591
591
|
define_attribute(:zoomScalePageLayoutView, :bool, :default => 0)
|
592
592
|
define_attribute(:workbookViewId, :int, :required => true, :default => 0 )
|
593
593
|
define_child_node(RubyXL::Pane)
|
594
|
-
define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections
|
594
|
+
define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections)
|
595
595
|
define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections )
|
596
596
|
define_child_node(RubyXL::ExtensionStorageArea)
|
597
597
|
define_element_name 'sheetView'
|
598
598
|
end
|
599
599
|
|
600
600
|
# http://www.schemacentral.com/sc/ooxml/e-ssml_sheetViews-3.html
|
601
|
-
class WorksheetViews <
|
602
|
-
define_child_node(RubyXL::WorksheetView, :collection => true
|
601
|
+
class WorksheetViews < OOXMLContainerObject
|
602
|
+
define_child_node(RubyXL::WorksheetView, :collection => true)
|
603
603
|
define_child_node(RubyXL::ExtensionStorageArea)
|
604
604
|
define_element_name 'sheetViews'
|
605
605
|
end
|
606
606
|
|
607
|
-
# http://www.schemacentral.com/sc/ooxml/
|
607
|
+
# http://www.schemacentral.com/sc/ooxml/e-ssml_worksheet.html
|
608
608
|
class Worksheet < OOXMLTopLevelObject
|
609
609
|
define_child_node(RubyXL::WorksheetProperties)
|
610
610
|
define_child_node(RubyXL::WorksheetDimensions)
|
611
|
-
define_child_node(RubyXL::WorksheetViews
|
611
|
+
define_child_node(RubyXL::WorksheetViews)
|
612
612
|
define_child_node(RubyXL::WorksheetFormatProperties)
|
613
613
|
define_child_node(RubyXL::ColumnRanges)
|
614
614
|
define_child_node(RubyXL::SheetData)
|
615
615
|
define_child_node(RubyXL::SheetCalculationProperties)
|
616
616
|
define_child_node(RubyXL::WorksheetProtection)
|
617
617
|
define_child_node(RubyXL::ProtectedRanges)
|
618
|
-
define_child_node(RubyXL::
|
618
|
+
define_child_node(RubyXL::Scenarios)
|
619
619
|
define_child_node(RubyXL::AutoFilter)
|
620
620
|
define_child_node(RubyXL::SortState)
|
621
621
|
define_child_node(RubyXL::DataConsolidate)
|
622
|
-
define_child_node(RubyXL::CustomSheetViews
|
623
|
-
define_child_node(RubyXL::MergedCells,
|
624
|
-
define_child_node(RubyXL::PhoneticProperties
|
622
|
+
define_child_node(RubyXL::CustomSheetViews)
|
623
|
+
define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
|
624
|
+
define_child_node(RubyXL::PhoneticProperties)
|
625
625
|
define_child_node(RubyXL::ConditionalFormatting)
|
626
626
|
define_child_node(RubyXL::DataValidations)
|
627
|
-
define_child_node(RubyXL::
|
627
|
+
define_child_node(RubyXL::Hyperlinks)
|
628
628
|
define_child_node(RubyXL::PrintOptions)
|
629
629
|
define_child_node(RubyXL::PageMargins)
|
630
630
|
define_child_node(RubyXL::PageSetup)
|
631
631
|
define_child_node(RubyXL::HeaderFooterSettings)
|
632
632
|
define_child_node(RubyXL::BreakList, :node_name => :rowBreaks)
|
633
633
|
define_child_node(RubyXL::BreakList, :node_name => :colBreaks)
|
634
|
-
define_child_node(RubyXL::
|
635
|
-
define_child_node(RubyXL::
|
636
|
-
define_child_node(RubyXL::
|
637
|
-
define_child_node(RubyXL::
|
634
|
+
define_child_node(RubyXL::CustomProperties)
|
635
|
+
define_child_node(RubyXL::CellWatches)
|
636
|
+
define_child_node(RubyXL::IgnoredErrors)
|
637
|
+
define_child_node(RubyXL::SmartTags)
|
638
638
|
define_child_node(RubyXL::RID, :node_name => :drawing)
|
639
639
|
define_child_node(RubyXL::RID, :node_name => :legacyDrawing)
|
640
640
|
define_child_node(RubyXL::RID, :node_name => :legacyDrawingHF)
|
641
641
|
define_child_node(RubyXL::RID, :node_name => :picture)
|
642
|
-
define_child_node(RubyXL::OLEObjects
|
643
|
-
define_child_node(RubyXL::
|
644
|
-
define_child_node(RubyXL::
|
642
|
+
define_child_node(RubyXL::OLEObjects)
|
643
|
+
define_child_node(RubyXL::EmbeddedControls)
|
644
|
+
define_child_node(RubyXL::WebPublishingItems)
|
645
645
|
define_child_node(RubyXL::TableParts)
|
646
646
|
define_child_node(RubyXL::ExtensionStorageArea)
|
647
647
|
define_element_name 'worksheet'
|
@@ -696,8 +696,16 @@ module RubyXL
|
|
696
696
|
true
|
697
697
|
end
|
698
698
|
|
699
|
-
def
|
700
|
-
(
|
699
|
+
def sheet_index
|
700
|
+
@workbook.worksheets.select{ |sheet| sheet.is_a?(self.class) }.index{ |sheet| sheet.equal?(self) }
|
701
|
+
end
|
702
|
+
|
703
|
+
def filepath
|
704
|
+
File.join('xl', 'worksheets', "sheet#{sheet_index + 1}.xml")
|
705
|
+
end
|
706
|
+
|
707
|
+
def rel_type
|
708
|
+
'worksheet'
|
701
709
|
end
|
702
710
|
|
703
711
|
include LegacyWorksheet
|