app/views/operator/appointments/index.xlsx.axlsx
xlsx_package.workbook.add_worksheet do |sheet|
sheet.add_row ['', 'Agenda_Inicio', 'Nome', 'CPF', 'Telefone', 'Data_Nascimento', 'Rua', 'Numero', 'Bairro']
@appointments.each_with_index do |appointment, index|
sheet.add_row [
index,
l(appointment.start, format: :short_date_hour),
appointment.patient.name,
appointment.patient.cpf,
appointment.patient.phone,
appointment.patient.birthday,
appointment.patient.public_place,
appointment.patient.place_number,
appointment.patient.neighborhood.name
]
end
end