Vikas Nagpal,

Hmmm... someone correct me if I'm wrong, but can't you do this by setting the MIME 
type javax.servlet.ServletResponse.setContentType(String s)?

...
response.setContentType("application/vnd.ms-excel");
...

One could generate the response to a file (myExcelResponse.xls) and mail it to an 
end-user at that point. This is off-topic however.

To answer the specific questions in a implementation agnostic manner:

1. Can somebody tell me what should i do so that i can convert columns of my JSP page 
into columns of my EXCEL worksheet?

This is automagically done in more recent versions of Excel where HTML tables are 
correctly converted (if you trust Micros~1).

2. How can I sort so as to start from alphabets?
This is more general Java question. A simple array could use one of static 
Arrays.sort() methods; it sounds as if you are sorting strings in the English 
language, Arrays.sort( Object[] o, Comparator c) might be handy. You can implementing 
the Comparator as an anonymous inner class even. More sophiticated methods in the 
java.util package could do this as well, especially if you are dealing with I18N 
environments.

Hope this helps,
Tim



> -----Original Message-----
> From: Nagpal, Vikas [mailto:vinagpal@;utmb.edu]
> Sent: Tuesday, November 12, 2002 13:57
> To: '[EMAIL PROTECTED]'
> Subject: OFF_TOPIC: How to convert JSP page into an EXCEL format
> 
> 
> Hi EveryBody,
> 
> 1) I have a JSP page which contains the TABLE. Now i want to send this
> JSP page as an  EXCEL email attachment so that as soon as people opens
> this attachment they can view there JSP page as an EXCEL worksheet. I
> have downloaded JINTEGRA.JAR from the web. I have put this package
> into my classpath. Can somebody tell me what should i do so that i can
> convert columns of my JSP page into columns of my EXCEL worksheet.
> 
> 2) I have been trying to sort the elements of an array but I want to
> ignore any SPECIAL CHARACTERS that preceeds alphabets. In  most of
> these elements I have double quotes as my special charcter. How can I
> sort so as to start from alphabets.
> 
> Thanks,
> With regards,
> Vikas Nagpal.
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@;jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to