Class: RubyXL::Chartsheet
- Inherits:
-
OOXMLTopLevelObject
- Object
- OOXMLObject
- OOXMLTopLevelObject
- RubyXL::Chartsheet
- Defined in:
- lib/rubyXL/objects/chartsheet.rb
Overview
Instance Attribute Summary collapse
-
#sheet_id ⇒ Object
Returns the value of attribute sheet_id.
-
#sheet_name ⇒ Object
Returns the value of attribute sheet_name.
-
#state ⇒ Object
Returns the value of attribute state.
-
#workbook ⇒ Object
Returns the value of attribute workbook.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from OOXMLTopLevelObject
#add_to_zip, parse_file, set_namespaces, xlsx_path
Methods included from OOXMLObjectClassMethods
#define_attribute, #define_child_node, #define_element_name, #obtain_class_variable, #parse, #set_countable
Methods included from OOXMLObjectInstanceMethods
#before_write_xml, #dup, #index_in_collection, #initialize, #write_xml
Instance Attribute Details
#sheet_id ⇒ Object
Returns the value of attribute sheet_id.
95 96 97 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 95 def sheet_id @sheet_id end |
#sheet_name ⇒ Object
Returns the value of attribute sheet_name.
95 96 97 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 95 def sheet_name @sheet_name end |
#state ⇒ Object
Returns the value of attribute state.
77 78 79 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 77 def state @state end |
#workbook ⇒ Object
Returns the value of attribute workbook.
95 96 97 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 95 def workbook @workbook end |
Class Method Details
.content_type ⇒ Object
91 92 93 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 91 def self.content_type 'application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml' end |
Instance Method Details
#rel_type ⇒ Object
87 88 89 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 87 def rel_type 'chartsheet' end |
#sheet_index ⇒ Object
79 80 81 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 79 def sheet_index @workbook.worksheets.select{ |sheet| sheet.is_a?(self.class) }.index{ |sheet| sheet.equal?(self) } end |
#xlsx_path ⇒ Object
83 84 85 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 83 def xlsx_path File.join('xl', 'chartsheets', "sheet#{sheet_index + 1}.xml") end |