bonjour,je veux afficher un fichier excel du coté client dans mon application.mon fichier excel je le cree (j'utilise API jexcel) mais pour l'ouvrir c'est une autre histoire je fais ce code mai ca m'affiche le code acii au lieu de m'afficher mon fichier excel.voila le code que j'utilise:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
response.setContentType("application/excel");
response.setHeader("Content-Disposition", "atachment; filename=fofeeeeeof.xls"); 
response.setHeader("Content-Description", "JSP Generated Data"); 
 
try{
   File uFile= new File("c:\\toto.xls"); 
 
  FileInputStream fis = new FileInputStream(uFile); 
 
  PrintWriter pw = response.getWriter();
 
  int c=-1;
  while ((c = fis.read()) != -1){ 	
    pw.print((char)c);
  }
 
  fis.close();
  pw.flush();
  pw=null; 
}
catch(Exception e){
}
Merci d'avance de votre aide.