I have the method below that creates an Excel file, but how can I return it like an Excel report?
def report_excel(self,results,report_name,header,indice,title_report):
fileExcel = xlsxwriter.Workbook('C:\\Users\\Pc-Pc\\Desktop\\411\\'+report_name+'.xlsx')
listUsersSheet = fileExcel.add_worksheet(report_name)
column = 0
row = 15
for res in results:
listUsersSheet.merge_range(index[ind][0] + str(row+1) + ':'+ index[ind][0] + str(row + a), res[index[ind][1]], cell_format)
fileExcel.close()
How can I download it from the client as a report?