Si tu enlèves tous les header pour le téléchargement, que te retournes ton script ? C'est bien un script python au fait ?

Cédric Marfil
Concepteur Réalisateur Intégrateur Confirmé
Tél. direct: 03.20.65.34.82
Mail: [EMAIL PROTECTED]

Capgemini
181 rue Jules Delcenserie
59700 Marcq en Baroeul
----- Original Message -----
Sent: Thursday, October 05, 2006 1:11 PM
Subject: [CPS-users-fr] Exporter en .csv

Bonjour,

J'utilise un portlet de contenu customisé qui génère un rendu tabulaire.
Je souhaite maintenant exporter le tableau sous un format CSV.
J'obtiens bien le fichier mais celui-ci contient le code html de la page
entière.

J'utilise le code suivant pour obtenir le fichier :

resp = context.REQUEST.RESPONSE
dispo = 'attachment;filename='+filename
resp.setHeader('Content-Type', 'application/csv;charset=iso-8859-1')
resp.setHeader('Content-Disposition', dispo)
resp.setHeader('Content-Type', 'application/force-download')
resp.setHeader('Cache-Control', 'no-cache')
resp.setHeader('Pragma', 'no-cache')

return chainecsv

Après vérification, la chaine 'chainecsv' contient pourtant bien chaque
données séparée par un point virgule.
Quelqu'un a-t-il une idée ??

Merci pour vos retour
Grégory François.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
_______________________________________________
cps-users-fr
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

_______________________________________________
cps-users-fr 
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>

Répondre à