Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Import Java data into Word????

Status
Not open for further replies.

Oxymoron

Technical User
Dec 17, 2000
168
GB
Hi.
I need to import data froma a Java program saved in a file either as Object/Text/XML into a Word document.
Is there any way to save the data directly as a compatible word format? e.g. .doc or .rtf, I suppose .txt could be used but then I'd have no control over presentation and style etc.

Also as a sub question, can Java control other applications within the Windows desktop environment? Such as opening Word, copying data into the new document, and then saving it?

ANY suggestions or comments would be extremely helpful, such as possible classes to look at etc.
Thankyou all.
Oxy

we are all of us living in the gutter.
But some of us are looking at the stars.
 
i use the code bellow to write to excel. it may give you some hint

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=" + "excel.xls" );
String message = ( String )session.getAttribute( "EXCEL" );
PrintWriter pw = response.getWriter();
pw.println("message");
pw.flush();
pw.close();
 
Thankyou both for your help,
fuadhamidov, could you tell me what object type 'response' is?
Thanks,
Oxy

we are all of us living in the gutter.
But some of us are looking at the stars.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top