Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Dynamic sheet name in excel input - Metadata Injection not working?

  1. #1

    Default Dynamic sheet name in excel input - Metadata Injection not working?

    Hi everyone,

    First of all I've tried to look for examples but with no luck.
    I'm trying to read a specific sheet within an excel file. The sheet name should be determined at runtime since it is the number of the day of current month. I mean for today (2014-10-18) the sheet name should be "18". I tried to accomplish this with metadata injection but it seems that kettle reads data from every sheet instead of just from "18". I attached a simplified example for clarifying. Am I missing something? Any example where I can see something alike?

    Any help would be really aprreciated..
    Attached Files Attached Files

  2. #2



  3. #3
    Join Date
    Jun 2007


    Hi leandrob - I know it's been a few months, but have you gotten this going? Your transformation does work with a little change: the sheet name (nombre_hoja) was not being generated correctly. When I replaced nombre_hoja with a constant that matched one of the sheets, the output text file was generated properly.

    - Russell

  4. #4


    Hi.. thanks for the reply!

    I did find a workaround that time but not with metadata injection..
    Since we are at it I want to make it work again! lol.
    I did the change you suggested but nothing changes in the text output file. Maybe I'm getting something wrong? Could you submit the modified transformation?

  5. #5


    Digging a bit more with the transformations I guess I finally found the problem (I guess).
    I was calling the template.ktr transformation (Read Excel File) directly in the job and since no sheet was specified in that transformation, Kettle looked for data from all sheets. Removing the "Read Excel File" from the job solved the problem. It's working perfectly now! Thanks for the help!!
    Last edited by leandrob; 06-05-2015 at 03:22 PM.

Tags for this Thread

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.