Link to home
Start Free TrialLog in
Avatar of fpoyavo
fpoyavoFlag for United States of America

asked on

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.
Avatar of fpoyavo
fpoyavo
Flag of United States of America image

ASKER

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.
Avatar of seanrowen
seanrowen

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.
Avatar of fpoyavo

ASKER

I do have line breaks but Excel does not format cells using commas.
ASKER CERTIFIED SOLUTION
Avatar of ldbkutty
ldbkutty
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This might be a useful hint to verify your program...
https://www.experts-exchange.com/questions/20842012/How-to-show-file-download-dialog-box-in-IE-6-0.html

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