• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Access to Files

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic