i'm trying to open the excel application in browser window using setContentType("application/vnd.ms-excel") and it works.But when i try to read an excel file from disk to browser, then excel applcation opens but its data (i.e. excel data) looks corrupted in browser window.the io stream i'm using for reading data is new BufferedReader(new FileReader(filepath)). please somebody help me about this problem as early as possible.
I'm not sure what your "corruption" of data means exactly but if you're like me, it means that the file isn't formatted correctly...instead of putting data in seperate columns, it would just stick everything in one column, delimiters and all. I may be wrong, but I have a strong belief that it's not BufferReader's fault but it's Excel's fault for not properly interpreting the delimiters in the input file. Unfortuntely, I don't know how to fix this problem yet.
Joined: Jun 10, 2001
i'm khurram mirza.i solved my problem i was facing couple of days before.that is the excel data seems like garbage when opened in browser.the reason for that problem was that i was using wrong output stream (i.e PrintWriter object) for sending data to browser instead i should have used the ServletOutputStream obj for that purpose.it sends data in binary format to browser. khurram mirza.
Joined: Jul 05, 2001
Does you data properly go into seperate columns? Mine won't.