Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to open MS Word file in Internet Explorer using java

 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am allowing user to upload Microsoft Word document to my server.
I am able to upload the document on my server .
I am using Jakarta POI interface but it allows me to read simple format MS word file

My problem is that :

How to show MS WORD file and HTML , means to open MS Word file as HTNL file through JAVA.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no easy way to create HTML from a doc file. Both Word and OpenOffice can save as HTML, so with some automation this may be possible. OO even has a Java API, but that has a definite learning curve.

Overall, I'd advise against trying to do this.
 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot sir for your reply.

But i have to show the selected word file as output to the user.

Is there any other way to do this.

Thanks
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i have to show the selected word file as output to the user.


Well, what I was getting at was that this is a lot of trouble for an uncertain outcome. Why not provide a link to the document instead, so that they can open it in Word, which knows how to display DOC files perfectly?
 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your reply sir.

Actually , in the file selected by user i have to perform some actions and then to show data to user.

Thats why i need the whole structure in the doc file , thats why its necessary to read it and show it in JSP.

Thanks
 
ram gaurav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all the replies.

Can you please close this Thread here as i want to take this thread to Java(Advanced)

Thanks
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats why i need the whole structure in the DOC file , thats why its necessary to read it and show it in JSP.


I don't understand why providing a link to the document would not satisfy this goal.

Have you considered (or tried) using Word or OpenOffice as helper applications for converting the document to HTML, as I suggested above?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic