0

within Azure Adf, I have an excel file with 4 tabs named Sheet1-Sheet4

I would like to loop through the excel creating a CSV per tab

I have created a SheetsNames parameter in the pipeline with a default value of ["Sheet1","Sheet2","Sheet3","Sheet4"]

How do I use this with the copy task to loop with the tabs?

1

1 Answer 1

1

Please try this:

  1. Create a SheetsNames parameter in the pipeline with a default value of ["Sheet1","Sheet2","Sheet3","Sheet4"].

  2. Add a For Each activity and type @pipeline().parameters. SheetsNames in the Items option.

  3. Within the For Each activity, add a copy activity.

  4. Create Source dataset and create a parameter named sheetName with empty default value.

enter image description here

  1. Navigate to the Connection setting of the Source dataset and check Edit in the Sheet name option. Then type @dataset().sheetName in it.

enter image description here

  1. Navigate to the Source setting of the Copy data activity and pass @item() to the sheetName.

enter image description here

  1. Create a Sink dataset and it's setting is similar to the Source dataset.

enter image description here

enter image description here

enter image description here

  1. Run the pipeline and get this result:

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect! I was trying to do something similar but veered off the beaten path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.