Class: SpreadsheetGoodies::GoogleDrive::Worksheet
- Inherits:
-
AbstractBaseWorksheet
- Object
- AbstractBaseWorksheet
- SpreadsheetGoodies::GoogleDrive::Worksheet
- Defined in:
- lib/spreadsheet_goodies/google_drive/worksheet.rb
Instance Attribute Summary
Attributes inherited from AbstractBaseWorksheet
Instance Method Summary collapse
-
#commit_writes! ⇒ Object
Commit writes so they are propagated to the real spreadsheet.
-
#initialize(spreadsheet_key, worksheet_title = nil, num_header_rows = 1) ⇒ Worksheet
constructor
A new instance of Worksheet.
-
#write_to_cell(row_index, col_index, value) ⇒ Object
Writes to a given cell identified by row and column indexes (they start at 1).
Methods inherited from AbstractBaseWorksheet
#[], #data_rows, #find_row_by_column_value
Constructor Details
#initialize(spreadsheet_key, worksheet_title = nil, num_header_rows = 1) ⇒ Worksheet
Returns a new instance of Worksheet.
18 19 20 21 22 23 24 |
# File 'lib/spreadsheet_goodies/google_drive/worksheet.rb', line 18 def initialize(spreadsheet_key, worksheet_title=nil, num_header_rows=1) @spreadsheet_key = spreadsheet_key @worksheet_title = worksheet_title @num_header_rows = num_header_rows read_from_google_drive end |
Instance Method Details
#commit_writes! ⇒ Object
Commit writes so they are propagated to the real spreadsheet
34 35 36 |
# File 'lib/spreadsheet_goodies/google_drive/worksheet.rb', line 34 def commit_writes! .save end |
#write_to_cell(row_index, col_index, value) ⇒ Object
Writes to a given cell identified by row and column indexes (they start at 1)
28 29 30 |
# File 'lib/spreadsheet_goodies/google_drive/worksheet.rb', line 28 def write_to_cell(row_index, col_index, value) [row_index, col_index] = value end |