app/models/google_apps/sheets_manager.rb
# Wrapper to avoid extra copies of large CSV tables.
Wrapper to avoid extra copies of large CSV tables.
Wrapper to avoid extra copies of large CSV tables .
def export_csv(file)
      csv_export_uri = if file.respond_to? :csv_export_url
                         file.csv_export_url
                       elsif file.exportLinks && file.exportLinks['text/csv']
                         file.exportLinks['text/csv']
                       end
      raise Errors::ProxyError, "No CSV export path found for file ID: #{file.id}" unless csv_export_uri
      result = @session.execute!(uri: csv_export_uri)
      log_response result
      raise Errors::ProxyError, "export_csv failed with file.id=#{file.id}. Error: #{result.data['error']}" if result.error?
      result.body
    end
def export_csv ( file ) csv_export_uri = if file . respond_to? :csv_export_url file . csv_export_url elsif file . exportLinks && file . exportLinks [ 'text/csv' ] file . exportLinks [ 'text/csv' ] end raise Errors :: ProxyError , "No CSV export path found for file ID: #{file.id}" unless csv_export_uri result = @session . execute! ( uri : csv_export_uri ) log_response result raise Errors :: ProxyError , "export_csv failed with file.id=#{file.id}. Error: #{result.data['error']}" if result . error? result . body end
Wrapper to avoid extra copies of large CSV tables.
Wrapper to avoid extra copies of large CSV tables .
file
<not_specific>