79393059

Date: 2025-01-28 07:57:13
Score: 0.5
Natty:
Report link

Finally, I changed my method of working with my powerpoint. I use the method described in the python library :

if name == "main": # Charger le template template_path = 'path/to/template.pptx' with open(template_path, 'rb') as f: source_stream = BytesIO(f.read()) prs = Presentation(source_stream)

# Exemple de données
data = {
    'nom_projet': 'Projet X',
    'date': '2023-10-01',
    # Ajoutez d'autres paires clé-valeur selon vos besoins
}

generate_template(prs, data)
fill_in_doc(prs, data)

# Sauvegarder la présentation
target_stream = BytesIO()
prs.save(target_stream)
with open('path/to/output.pptx', 'wb') as f:
    f.write(target_stream.getvalue())
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Louise Hinard