• Post Reply Bookmark Topic Watch Topic
  • New Topic

Access to Files

 
amer seif el dine
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,
I am asking about a simple method to access an excel or word
file from java and insert a picture in the end of the file.
if its simple please advise me else
what is the best solution??

Thanks
 
Thomas Hansen
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amer Seif el Dine,
hmmm... this doesn't sound like something I would want to do voluntarily, but I asume you have a good reason ;-)
Since you are out for a simple solution I don't suppose you want to write an editor kit for the DOC and XLS filetypes as this would be VERY much work to get it correct.
Depending on how advanced your Excel/Word files are you could convert atleast your Word files to RTF and from that easily load the RTF reader and append whatever you want, for instance an image.
As far as I know there facilities within Word/Excel and Visual Basic that will let you do this relatively simply.
I suppose this might be a little easier with the OfficeXP as they were suppose to use XML as an open standard for saving documents. I heard some terrible things later though that it was Microsofts interpretation of XML and I haven't actually bothered to look so it might be fixed. This means it _might_ be easier if you can assume all documents are produced with OfficeXP or newer.
Good luck!
Thomas
 
amer seif el dine
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Thomas For your help.
I decided to save the files as html and then access them
from java.
i think it's too easier and flexible.

now i am asking you about a tutorial to access html files
and inserting applet (a picture for example that takes a result
from a java program and then if it is true it makes an applet
enabled else disabled)
Thanks a lot Thomas.
 
Thomas Hansen
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amer Seif el Dine,
Usually I turn to the Java tutorial at www.java.sun.com,
but as you maybe allready tried it doesn't quite cover this.
I have found great joy in a book called "Core Swing - Advanced programming" it discusses among other more advanced topics HTML editing using JEditorPane or parsing without displaying.
I suppose you can check the contents at amazon.co.uk or something and from that find out if it's worth it for you.
It's written by Kim Topley and has ISBN nummer 0-13-083292-8.
IF someone else reads this and has something to add, perhaps an online reference don't hesitate to reply.
Good luck with your work!
Thomas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!