openpyxl excel 파일시스템으로 저장
excel 파일 읽은후 파일 시스템으로 저장 excel_file = load_workbook('temp.xlsx') sheet1 = excel_file['시트이름'] row = 0 for index, value in enumerate(data): sheet1.cell(row, index+1,value) # excel 파일 bytesIO로 저장 with NamedTemporaryFile() as tmp: excel_file.save(tmp) tmp.seek(0) stream = tmp.read() # Set up the Http response. filename = 'test.xlsx' response = HttpResponse( stream, content_ty..
2023.11.27