Thanks for the reply. I can now open the file with the name that I pass.However the file is empty.It does not have the data which the file created at the local drive has.Am I missing something?
The code is pasted below:
String filePath ="d:\\excel\\dbreport.xls";
res.setContentType("application/vnd.ms-excel");
PrintWriter output = res.getWriter();
res.setHeader("Content-Disposition", "attachment; filename=\"dbreport.xls\" ");
FileOutputStream fileOut = new FileOutputStream(filePath);
wb.write(fileOut);
fileOut.close();
output.close();
The file in the d drive location shows the correct data whereas the open which opens is empty.
Please advice
Thanks