[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Content type in a servlet

Posted on 2001-07-31
6
Medium Priority
?
1,391 Views
Last Modified: 2013-11-24
I am trying to redirect the contents of my page to a spreadsheet and I use
res.setContentType("application/vnd.ms-excel");
to set the content type.
This works when I use Excel 97 but with newer releases of Excel (eg: 2000) it doesn't.
Help!!!
Thanks.
0
Comment
Question by:luw
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:dviji
ID: 6338301
Hi,
   Some suggestion to find out that MIME Type...
  Open explorer and goto View -> Folder Options. In that goto file types tab, in that search for Microsoft Excel Worksheet. It will give you what is the Content Type(MIME type). Apply this in your ContentType. It may help you.


...dviji
0
 

Author Comment

by:luw
ID: 6340935
Thanks. Now I know what the MIME types are for Excel 97 and Excel 2000. But how can write my servlet to work with both versions? Thanks.
0
 

Author Comment

by:luw
ID: 6340938
Thanks. Now I know what the MIME types are for Excel 97 and Excel 2000. But how can write my servlet to work with both versions? Thanks.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
dviji earned 300 total points
ID: 6341122
You can get the available mimie types by using javascript navaigator.mimeTypes

But one thing is navigator works only in Netscape ;-(((. I don't know how to check in IE...

...dviji
0
 

Author Comment

by:luw
ID: 6342076
Thanks for the info. Can you give me some examples on how I can use it?
0
 

Author Comment

by:luw
ID: 6388890
Thanks for all the info. I'm still trying to find out how to get my code to work with Excel 2000. Sorry for the delayed repsonse!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question