Python Docxtpl - link wont copy correctly from excel to word templates

28 Views Asked by At

I have a python code that pulls data from excel columns and uses a word template to generate reports for multiple people who fill out a survey (the data is then exported to excel). It all works well except for the survey link. For some reason, it wont copy from the excel file to word file correctly, no matter what I do. Here is an example

On the excel: https://qualtrics.com/jfe/form/SV_nbqd0?Q_CHL=emailhQiWl&Q_DL=EMF_H9dJkEiSqdL_cCFqd0_CGC_Ow7KTupd8Iy1dRr&_g_=g

On the word template: https://qualtrics.com/jfe/form/SV_nbqd0?Q_CHL=emailhQiWl=EMF_H9dJkEiSqdL_cCFqd0_CGC_Ow7KTupd8Iy1dRr=g

For some reason, all the parts of the link with an "&" are missing, with a couple of characters after that.

I tried making the link in the excel file not a hyperlink and just text in format, but that didnt do anything to the word output. I also exchanged the links with text that includes the "&" symbol and the word document is blank when extracting that from the excel.

0

There are 0 best solutions below