Hey guys,
I try to loop through a list of Excel workbook sheets, which i added to a collection before.
But when I try to run it, I always get the message:
Do you know where I have to look for the problem?
Best regards
Flo
Hey guys,
I try to loop through a list of Excel workbook sheets, which i added to a collection before.
But when I try to run it, I always get the message:
Do you know where I have to look for the problem?
Best regards
Flo
Addition:
I added a write line activity to see which path the excel application scope uses and it only uses the name of workbook sheet.
Hello,
so do you want to loop through a list of workbooks or sheets?
The value in Excel application scope has to be the path to a workbook, and looks like you are using the same loop iterator as a path and a sheet name, which doesn’t work.
Can you attach the xaml file?
is the Sheet exists in Excel?
if you want to iterate through all the existing excel sheets of workbook better to get those sheets in list using the activity get workbook sheets and then keep in loop
Cheers,
Venky
Hello @SSavickas
as we try to prevent huge functions, it is separated in two:
The first one is to add every sheet to a collection:
Func_Excel - Get workbook sheets.xaml (16.9 KB)
the second one is to loop though the sheets of the collection:
Sub_QueueUp - Queue sheets.xaml (17.6 KB)
Now, the second xaml is the problem, you are taking a sheet name and passing it as a workbook path, which will not work.
It looks like you need to iterate through every sheet in any case.
I would load up the file in the excel application scope, using your “ListOfFiles” as in the first xaml, then get sheet names, and iterate through that list (not sure if adding to a collection is even needed here), invoking your second file, that would need to have two IN arguments - file location and sheet name.