I want to set a watermark to the excel file which will be generated by the code.
I have tried set_header() function, but it is not showing the watermark in the generated downloaded file. The code I have tried is:
writer = pd.ExcelWriter('test.xlsx', engine='xlsxwriter')
data.to_excel(writer, sheet_name='Download Sheet', startrow=2, startcol=0 , header=None, index = False)
worksheet = writer.sheets['Download Sheet']
# worksheet.set_header('&C&G', {'image_center': 'logo.png'})
worksheet.set_header('&C&[Picture]', {'image_center': 'logo.png'})
Even the commented line of code didn't worked. Using
worksheet.set_background('logo.png')
Sets the image to the whole page, without any watermark.