Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Insert Image in Excel File

  1. #1
    Join Date
    Apr 2008
    Posts
    1,771

    Question Insert Image in Excel File

    Hi.
    Is it possible to insert an image in Excel using Excel Output step
    http://wiki.pentaho.com/display/EAI/Excel+Output
    or Microsoft Excel Writer step?
    http://wiki.pentaho.com/display/EAI/...t+Excel+Writer

    I have noticed that it is possible to insert a link, but I need to embed an image in the file itself.

    My task is to create multiple Excel file, each one of them with a different embedded image.
    I know how to create multiple files, not how to insert the image.

    Thanks.
    Mick

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    MEO and MEW steps write cell data, but images are objects, no cell contents.
    Images only may carry a reference to a cell for positioning purposes.
    Loading of images must be done with Excel, I'm afraid.

    You could write the image filename to a cell and let a macro do the rest.
    If you can bring the images within reach of the macro, that is.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Hi.
    Thanks for your reply.

    I am not a programmer, but given that Microsoft Excel Writer is based on Apache POI, would it be possible to implement something like this:
    http://www.roseindia.net/tutorials/poi/ExcelImage.shtml

    and create an interface into the plugin for it?

    If the answer is positive, I'll file a Jira :-)
    Mick

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    There was a time when we refused to even implement "Excel Output" because it was considered a reporting tool requirement, not a data integration specialty.
    Now, years later here we are building a reporting tool into a data integration tool. So yes, if someone comes up with a good idea to extend the Excel Writer step to support images then let's go for it. However, I still think it would be better to do this sort of thing with Pentaho Reporting.

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Mick, if you can live with a Janino script, there is not much to do.

    The UDJC step becomes a data sink, though.

    Just a quick hack, no error handling, placing all images at top left corner, ...
    Attached Files Attached Files
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    @Matt.
    In principle I wholehearthedly agree, but my boss thinks differently ;-)

    The main culprit is Excel! It's too easy to create few nice looking tables and few graphs with it that everyone uses it.
    I have to live with it and feed the data to those templates that land on my desk (sigh).

    From one point of view it's better for me, because I do not have to design graphs nor table.

    @marabu: I'll have a look at your script and let you know.
    Thanks for your time.

    Mick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.