You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cost_entry_xls_table.rb
    path of file: ./repos/openproject/modules/reporting/lib/open_project/reporting
    
    the code of the file until where you have to start completion: class OpenProject::Reporting::CostEntryXlsTable < OpenProject::XlsExport::XlsViews
  def generate
    @spreadshe
    
  def cost_row(result)
    current_cost_type_id = result.fields['cost_type_id'].to_i

    cost_entry_attributes
      .map { |field| show_field field, result.fields[field.to_s] }
      .concat(
        [
          show_result(result, current_cost_type_id), # units
          cost_type_label(current_cost_type_id, @cost_type), # cost type
          show_result(result, 0) # costs/currency
        ]
      )
  end