How to get a replaced Excel source to use the variables in an for each loop

  • Hello,

    I have a number of DFT in a For Each Loop, I have created variables for the directory and the filenames so that it loops though a collection of Excel files. I had some issues with data in one of the columns and had to adjust the format (this was to circumvent the 255 width limit), I tested it with a new connection manager outside of the loop container. The issue I have now is having place the DFT back into the loop, how can I get the Excel source to use the variable, and pick the sheet I want it to use? I dont seem to be able to find a way around it. 

    I suppose what I am asking here is, how can I get the new Excel source to use the same connection manager as the other DFTs? It says is cannot make a connection, and therefore I cant choose the sheet.

    Would I be better off creating another For Each Loop, and dragging them all across, and delete the old one? Maybe that is my only choice?

    Regards,
    D.

  • Duran - Wednesday, June 28, 2017 12:42 AM

    Hello,

    I have a number of DFT in a For Each Loop, I have created variables for the directory and the filenames so that it loops though a collection of Excel files. I had some issues with data in one of the columns and had to adjust the format (this was to circumvent the 255 width limit), I tested it with a new connection manager outside of the loop container. The issue I have now is having place the DFT back into the loop, how can I get the Excel source to use the variable, and pick the sheet I want it to use? I dont seem to be able to find a way around it. 

    I suppose what I am asking here is, how can I get the new Excel source to use the same connection manager as the other DFTs? It says is cannot make a connection, and therefore I cant choose the sheet.

    Would I be better off creating another For Each Loop, and dragging them all across, and delete the old one? Maybe that is my only choice?

    Regards,
    D.

    Use an expression for the connection string and use the variable as the file name in that expression
    😎

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply