Class: Cosmos::ExcelSpreadsheet::ExcelWorksheet
- Defined in:
- lib/cosmos/win32/excel.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#num_columns ⇒ Object
readonly
Returns the value of attribute num_columns.
-
#num_rows ⇒ Object
readonly
Returns the value of attribute num_rows.
Instance Method Summary collapse
-
#initialize(worksheet) ⇒ ExcelWorksheet
constructor
A new instance of ExcelWorksheet.
Constructor Details
#initialize(worksheet) ⇒ ExcelWorksheet
Returns a new instance of ExcelWorksheet.
26 27 28 29 30 31 32 33 |
# File 'lib/cosmos/win32/excel.rb', line 26 def initialize (worksheet) @name = worksheet.name @num_rows = worksheet.UsedRange.rows.count @num_columns = worksheet.UsedRange.columns.count #Get Excel Data from Worksheet @data = worksheet.UsedRange.value end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
24 25 26 |
# File 'lib/cosmos/win32/excel.rb', line 24 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
24 25 26 |
# File 'lib/cosmos/win32/excel.rb', line 24 def name @name end |
#num_columns ⇒ Object (readonly)
Returns the value of attribute num_columns.
24 25 26 |
# File 'lib/cosmos/win32/excel.rb', line 24 def num_columns @num_columns end |
#num_rows ⇒ Object (readonly)
Returns the value of attribute num_rows.
24 25 26 |
# File 'lib/cosmos/win32/excel.rb', line 24 def num_rows @num_rows end |