1
我從數據庫中一個Excel文件導出我的數據:如何在Excel文件中添加超鏈接到單元格的內容?
response = HttpResponse(mimetype="application/ms-excel")
response['Content-Disposition'] = 'attachment; filename=Countries.xls'
wb = xlwt.Workbook()
ws = wb.add_sheet('Countries')
ws.write(0, 0, 'Country ID')
ws.write(0, 1, 'Country Name')
index = 1
for country in countries:
ws.write(index, 1, country.country_id)
ws.write(index, 1, country.country_name)
index += 1
wb.save(response)
return response
導出我的Excel文件。如何在此文件中添加超鏈接到單元格的內容? (country_name
例如在瀏覽器中打開一個卡的鏈接)從this thread兩者
這使該全單元可點擊!那麼單元格的內容呢? – Drwhite
我不認爲這是可能的。雖然會很高興成爲錯誤。 – alecxe
不要高興! matino製作解決方案 – Drwhite