Hello Software Engineers,
Now I’m automating extract data from excel with filter and got filtered data want to show new excel.It was just three condition**(Gender is Male who is above 40 age and Address starts with Tokyo** from PersonalInformation.xlsx.Now that filtered data couldn’t show new Excel UpdatedPersonalInformation.xlsx.
I will attach my excel file.I desire to show data as attached UpdatedPersonalInformation.xlsx file.
**男 means Male
@Priyanka_Ramesh
Thank for reply.I updated Write Range Output as attachment. But I could see only Header Name. Filtered data couldn’t show.Anything problem in xaml file?
There are some points where I believe a Thorough look into the Input Data is required before arriving into the Solution. Making the below changes should be able to provide you the Desired output.
The variables used in the If condition are not initialised or does not have a value at the beginning.
Instead of the Variables highlighted above (strAge, strAddress, strGender), we should use the values present in the CurrentRow (DataRow Type) variable to check the values read from the Excel match a certain condition or not, as shown below :
When you are using Add Data Row Activity, you are adding the Filtered Data to the dtOutput variable. Hence, the Filtered data would be present in the dtOutput and not the dtTable variable.
The Correction would be to use dtOutput in Write Range Activity instead of dtTable. Also, You could keep the Excel Scope with Write Range outside the For Each Loop, as it is not needed to be present inside the loop.