Here we go using Invoke VBA option. Try it and let me know. You can write VBA code to insert the output to excel. Here used just Messagebox. Also to further enhance as per your requirement try writing the same in excel VBA code
Use - Invoke Code( Workflow- Invoke- Invoke Code)
Dim olApp As Microsoft.Office.Interop.Outlook.Application
Dim olNs As Microsoft.Office.Interop.Outlook.Namespace
Dim olParentFolder As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim olFolderA As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim olFolderB As Microsoft.Office.Interop.Outlook.MAPIFolder
olApp = New Microsoft.Office.Interop.Outlook.Application
olNs = olApp.GetNamespace(βMAPIβ)
olParentFolder = olNs.Folders(βSojan.@abc.comβ).Folders(βInboxβ)
For Each olFolderA In olParentFolder.Folders
Msgbox(olFolderA.FolderPath)
'Msgbox(olFolderA.FolderPath, olFolderA.Items.Count, olFolderA.Folders.Count)
For Each olFolderB In olFolderA.Folders
Msgbox(olFolderB.FolderPath)
'Msgbox(olFolderB.FolderPath, olFolderB.Items.Count)
Next
Next