View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default html exported to excel when save as, defaults to web page

What headers are you adding to the jsp response ?
Try something like:

Response.AddHeader "Content-Disposition", "inline; filename=weberport1.xls"
Response.ContentType = "application/vnd.ms-excel"

(above is ASP syntax)

Tim

"jayahn" wrote in message
...
When I export html code in the .jsp to excel, and I open the .xls file,
and
try to Save As, the file type automatically defaults to webpage file. I
want
it to default to .xls file.

I have tried a number of methods. I have tried exporting from the .jsp
with
no code at all(basically it opens a empty .xls file). This tried to save
the
.xls file as a text delimited. When I added only the <html</html tags,
it
returned to trying to save as webpage. I suspect that there must be some
tag(or at least some identification flag) that sets the Save As filetype
accordingly, but I cannot find where or what it is.

Thank you.

- Jay -