Hi

This is a rather simple approach but has worked for me on a similar project.
I change the content type to msword and then just format the doc using html.
It opens in word and is editable.

Aneesha


<%@ page contentType="application/msword" %>
<html>
<head>
      <title>Generating Word Reports</title>
</head>
<body>
<b><font size=+2>Monthly Sales</font></b>
<br>&nbsp;
<table BORDER COLS=7 WIDTH="100%" >
<tr>
<td><b><font color="#CC0000">Months</font></b></td>

<td><b>Jan</b></td>

<td><b>Feb</b></td>

<td><b>Mar</b></td>

<td><b>Apr</b></td>

<td><b>May</b></td>

<td><b>Jun</b></td>
</tr>

<tr>
<td><b><font color="#990000">Sales</font></b></td>

<td>120</td>

<td>50</td>

<td>130</td>

<td>110</td>

<td BGCOLOR="#CCFFFF"><b><font color="#FF0000">260</font></b></td>

<td>170</td>
</tr>
</table>

</body>
</html>


> Hi gurus,
>      There is a requirement in our project.  The requirement is we have to
> generate a report in Ms-word.  What I can do is that I am writing a bunch
a
> strings into that using outputstream but I could not get the tables and
> fonts.  Is there any api in java for generating ms-word documents.  We
could
> get an api for generting the report in Excel.  Can anyone know whether
there
> is any similar sort of api for word like that of excel.
> Thanks and regards
> raghu
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to