JSP to Excel loading

D

damerlaroja

We are trying to export data from jsp to excel using
response.setContentType("application/vnd.ms-excel");
But after export, the file size(85MB) is becoming 10times more than the
normal excel(8MB, When copied the data manually).
But even after saving the file, we are not able to open the excel file.


Any help in this regard is highly appreciated.
 
T

Tor Iver Wilhelmsen

But after export, the file size(85MB) is becoming 10times more than the
normal excel(8MB, When copied the data manually).

How do you send it? Normally you would just tab-separate the values, e.g.

out.println(value1+"\t"+value2+"\t"+value3)

etc.
 
O

Oliver Wong

We are trying to export data from jsp to excel using
response.setContentType("application/vnd.ms-excel");
But after export, the file size(85MB) is becoming 10times more than the
normal excel(8MB, When copied the data manually).
But even after saving the file, we are not able to open the excel file.

Any help in this regard is highly appreciated.

Sounds like you're dumping random data in the response. The fact that
the file is the wrong size and is corrupt is a good indication.

Have you tried opening the corrupt file in a hex editor to see what's
being produced?

- Oliver
 
J

Joan

We are trying to export data from jsp to excel using
response.setContentType("application/vnd.ms-excel");

Is that all you have to do is set the type in the header?
Hay then I can read a dll and write a png, cool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top