Module: ActiveRecordToGoogleSpreadsheet::Utils

Instance Method Summary collapse

Instance Method Details

#get_worksheet_by_name(st, name) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/activerecord_to_google_spreadsheet/utils.rb', line 3

def get_worksheet_by_name(st, name)
  ws = st.worksheet_by_title(name)
  if !ws
    ws = st.add_worksheet(name)
  end
  return ws
end