Hi, I am trying to accomplish the following : In an excel sheet I have two columns , State Code 1 and State code 2 , What I am trying to do is if state code 2 value is blank then paste the state code 1 value within the cell, for this I tried using for each activity , but since the file as about 11K rows the output is pretty slow, is there any other faster way to achieve the same ?
U can share us your xlsx file?
Or well, you can select only empty values from column2 (state code 2), get index and assign the value from the same index but from the first column
Does the above need to be done in a for each row activity. Please find the attached excel sheet.Sample.xlsx (114.6 KB)
I get the file in 11 seconds, how much time take u to get it?
I attach u the workflow here, regardsâŚ
Main.xaml (6.5 KB)
It took time for me , can you elaborate the process that you performed ?, like what are the steps in this, I see that you assigned the index but not sure what the next few commands are doing
Its in the XAML attached, but i explain u.
At first instance, we use read range for get all values from the file and send that values to a DataTable (In properties of the activity)
We dont indicate a Range, only put ââ and the activity will get all data
Now, we create a int32 variable (will be our counter of rows) and we drop a Do - While Activity in our sequence.
As can u see, we assign â1â to our Counter, because index 0 has been the column name (its important mencion than we need to uncheck option âAdd Headersâ from our Read Range activity) and we going to iterate throug rows in column 2 (where u have code 2)
Now, in Do-While condition we declarate than the loops will work while our counter (ci) value less than the rows in your file. For example
When we start our program, our counter (ci) will have a value of 1 and once time than our âdo whileâ loop starts our counter will be increased one by one, Âżhow?, with this inside:
Our structure inside âDo While Loopâ looks:
In the if condition, we iterate throug rows (ci) and column (1), we indicate than if the value inside of table(1)(1) has a length < 1 will assign the value of the first column [table(ci)(0) âfirst column valueâ]and so repetitively while the counter increases
I hope you have made me understand, I donât speak much English, bless and regards.
Thank you so much , this is really great , appreciate the help @inf_L !
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.