Someone please help in this. Need it urgently. I want to read the date from the multiple sheets.
Here I am trying to fetch the email id’s from all the sheets. Employee details are stored in excel by monthwise and I want to fetch the email id’s from all the sheet.
Please find the below screenshot, where I am fetching the sheet name using control flow for each and reading the content of the every sheet by adding the for each data table. But it is giving me the error, saying one of the column name which I am looking for is not exists, even though it is present in the sheet and the name is also proper.
Please post your excel file and xaml file
Check this link, similar to the code you are looking for,
I have gone through various discussions and couldn’t find any answer. I have a excel workbook which has 300 sheets. I want to copy all these sheets into a new excel workbook. I am using for each to do this. but still its giving only one sheet output. It’s not going through the loop.
I have attached my flow . Please help me out.
Main.xaml (14.6 KB)
Please find the attached xaml file and the sheet.
Main.xaml (14.3 KB)
Employee Birthday Details.xlsx (205.1 KB)
Your sheet can be modified…the headers can be shifted to first row. Is that possible to do?
@Niket_Ghai, I cannot modify the sheet. Since the sheet for which I am modifying this is in the same format, it is not allowed to modify.
No luck… Getting the same error.
I didn’t get this point. Could you please explain me.
Works like a charm for me and a friend. Did you run my worklow or you made changed in yours?
I am running your changes.
this is the result you want right?
IDK what’s wrong. Please keep your excel file closed before running the workflow…
Yes exactly… Why it is not happening for me
You have added the column “B2” in that right? But why it won’t work “” with this?
Yes it’ll work for B2 as your excel sheet starts there…when it’s “” it reads headers blank…that is why it was giving that error to you…
Try running this
Main.xaml (13.6 KB)
I think issue was with my sheet, I have sent you the part of the excel. In the actual excel file, the last two sheet didn’t had blank row and column.
Now as you have suggested, I have shifted the headers to first row. But getting some other problem. Could you please check my xaml file once.
Main.xaml (12.5 KB)
Same one got from
@Niket_Ghai. Thanks for the response.
Is it working for the part of excel which you sent us??
Employee Birthday Details.xlsx (205.1 KB)
This Excel file…
Now getting the following error, According me all the objects are intialized. Could you please check my xaml file once.
Main (4) has thrown an exception
Message: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized).
Exception Type: NullReferenceException
System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure , ActivityContext )
1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity
1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary
2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
This file you sent seems absolutely fine to me!
Only keep this in mind-
If you have not moved the columns
just put “B2” in the range
If you have moved the columns to the left most
leave it blank
Its working for me.You dont need to change anything else!