Open file

Hi Experts,

I have <%@ page contentType="application/excel"%>
I see popup open , save as ....

When I open it is opened as Word not excel
When I do save as it has in file type " JavaServer pages.

How do I open it as Excel in browser ?
How do I make sure in file types "xls (excel)" appears ?

Thank you.
LVL 1
fpoyavoAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ldbkuttyConnect With a Mentor Commented:
>When I open it is opened as Word not excel
>When I do save as it has in file type " JavaServer pages.

>How do I open it as Excel in browser ?

You can use the file name along with the extension in your jsp program, say for example,

"examplefile.xls" or "examplefile.csv" so that it can be saved with the appropriate format, even though the file type is described as '.jsp'.

BTW, i have a similar application for EXCEL downloading and displaying in browser.
0
 
fpoyavoAuthor Commented:
I was able to open it. But the problem is that is CSV file and when it is opened in Excel there are cells but
data is not split. I have rows only.

Please help.
0
 
seanrowenCommented:
Try using a content type of "application/vnd.ms-excel", or better, "text/csv".

If it is not showing up as expected in Excel, then open the .csv file with a text editor and see if there is a problem with the CSV data. Maybe there are no line breaks? or the line breaks are not recognized? That is my guess.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
fpoyavoAuthor Commented:
I do have line breaks but Excel does not format cells using commas.
0
 
ldbkuttyCommented:
This might be a useful hint to verify your program...
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20842012.html

otherwise, post ur full code here...
0
 
ldbkuttyCommented:
Are you successful !?
0
 
ldbkuttyCommented:
well, i do hope that my posted link might be a helpful hint for the author...if not, am sorry.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.