Render_spreadsheet with convert_excelt_to_pdf

Hey,
I want a download button where I open a spreadsheet, edit the content and convert it to a pdf.
The code I use within the download function is:

        with open(template_path, 'rb') as template:
            filled_spreadsheet = render_spreadsheet(template, cells)
            pdf = vkt.convert_excel_to_pdf(filled_spreadsheet)

I get the following error message:

UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 10: character maps to <undefined>

How do I solve the problem?

Hi @AnneOffermans,

For a start I think it would be good to try and figure out where this occurs, during the rendering of the excel or during the conversion to pdf. Do you see

It’s not unlikely that this is due to some character, image or other symbol being in your excel sheet that can’t be rendered, but without seeing your excel sheet it’s quite difficult to say.