Hello,
Language= Java;
Platform= Linux;
Application= Web
I have help excel file. I download it using FileInputStream .
When it is downloaded from solaris or widows platform it is correct.
But when it is downloaded from Linum platform it becomes corrupted.
Kindly, provide me solution.
Language= Java;
Platform= Linux;
Application= Web
I have help excel file. I download it using FileInputStream .
When it is downloaded from solaris or widows platform it is correct.
But when it is downloaded from Linum platform it becomes corrupted.
Code:
PrintWriter out = new PrintWriter(response.getOutputStream()); response.setContentType("application/excel"); response.setHeader("Content-Disposition", "attachment; filename=\a.xls\"); //Sending the file int iRead; FileInputStream stream = null; File f = new File("a.xls"); stream = new FileInputStream(f); //Writing the stream values while ((iRead = stream.read()) != -1) out.write(iRead); //Flush the output out.flush();