Create Folder and subfolder using loop from excel document

Hi There,
I’m creating demo folders, subfolders and documents(Word, Excel & ppt) with reference to Excel Document like below


can you help me with the logic of sub folders here


how to proceed in this loop

@jaswanthvarma.gottumukkal

Follow the steps

  1. Use for each row
  2. Inside loop use a if condition with String.IsNullOrEmpty(currentrow(0).ToString)
  3. On then side use create folder with Path.Combine(OutputFolder.FullName,currentrow(1).ToString) and also assign ouput property of create folder to outputFolder variable
  4. On else side use create folder with currentRow(0).ToString and also assign the output property of create folder to outputFolder Variable

This should create the full folder structure

Cheers

Thank you @Anil_G it helped me

1 Like