webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Extract excel attachment from email

  • 1.  Extract excel attachment from email

    Posted Sat June 25, 2005 06:55 AM

    I want to get the excel attachment from a email and use apachi POI to extract the content from it. Anyone have any idea how to do?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Extract excel attachment from email

    Posted Sun June 26, 2005 05:47 AM

    Andy

    I’ve used POI to do just the opposite, i.e., grab data from an IS document to create a new Excel spreadsheet and attach it to an email.

    Going in the opposite direction should not be much different.

    Once you have the attachment as a stream, pass it to your Java service that does the POI work. Since this is more of a Java programming exercise, I found it helpful to develop the logic in an external IDE (I use NetBeans).

    There is lots of info you can google to get you started.
    For example:
    [url=“http://www.javaworld.com/javaworld/jw-03-2004/jw-0322-poi.html”]Welcome to JavaWorld.com

    Regards.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: Extract excel attachment from email

    Posted Mon June 27, 2005 02:27 AM

    I’ve done the extract from Excel to create an IS document using POI with little trouble. Just make sure you have the necessary libraries available to IS when it starts up. I used the event API of POI which seemed to work fairly well at conserving memory. I too did what Mark did and used an external IDE (VisualAge for Java in my case) to do the majority of the development/debugging and then put the result into IS.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Extract excel attachment from email

    Posted Mon June 27, 2005 08:29 AM

    Hey Rob - just a quick off-topic comment on your choice of IDE:

    “used an external IDE (VisualAge for Java in my case)”

    Visual Age for Java is (or “was”) superb, isn’t it? Which version do you use? VAJ had tons of really neat features eg: built-in source repository with the ability to version down to the method level.

    Now of course, Websphere Studio has replaced VAJ ( [url=“IBM Developer”]IBM Developer
    ) and Eclipse is it’s freely available version, but last I checked, many of the old VAJ features did not exist in Eclipse.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: Extract excel attachment from email

    Posted Mon June 27, 2005 10:59 AM

    Any idea how can I change the excel attachment into a stream?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: Extract excel attachment from email

    Posted Tue June 28, 2005 03:53 AM

    VAJ took a bit of getting used to at first but it had some really neat aspects. Setting up to use external libs (e.g. the ActiveWorks/webMethods jars/classes) was a pain but once set up made development nice and easy. I liked that it would compile immediately on save so you never had to remember to come back to something to finish it up.

    IIRC I used version 2.1 but my memory may be faulty. Everything seems to carry the WebSphere brand name now. WebSphere CICS anyone? :wink:


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Extract excel attachment from email

    Posted Tue June 28, 2005 05:21 AM

    Thanks Rob. Perhaps you’re using websphere, not VAJ? I recall using VAJ 3.0 or 3.5 back in 1998-99 - a free copy from a programming contest in grad school. It was easy to grasp, and the facilities were l33t for it’s day: compile-on-save, the ‘problems’ tab, scratchpad, CTRL+W code formatting, thread debugger… nice memories.

    Sorry Andy I’ll keep quiet now and let the thread continue with Apache POI. Just in case you haven’t looked, you’ve seen the shareware entries that on Excel and POI, right? See top two entries here:

    [url=“wmusers.com”]wmusers.com


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 8.  RE: Extract excel attachment from email

    Posted Tue April 07, 2009 09:39 PM

    Reamon,

    Could you please attached a sample of the java service on how you accomplish this? Much appreciated it.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: Extract excel attachment from email

    Posted Tue April 07, 2009 10:46 PM

    Alas, I cannot. It was work done under a contract and is not mine to share. :frowning:


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 10.  RE: Extract excel attachment from email

    Posted Wed April 08, 2009 04:13 PM

    I’ll figure it out. It’s not like rocket scientist.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB