How should one go about reading spread sheets formatted the following way:
Like let say fetching the the Sp. Attack Value of all Plant Types?
sample.xlsx (9.5 KB)
How should one go about reading spread sheets formatted the following way:
Like let say fetching the the Sp. Attack Value of all Plant Types?
sample.xlsx (9.5 KB)
Hi @mayuyu
You can use Read range activity to read all the data on to one single datatable.
However, there are few things that you need to do after that…
The datatable will look exactly the same as the data sheet. So it will have the separation blank rows. Hence as the next step, remove blank rows by using filter datatable activity.
Now, the next thing is populating the blank cells of index, name and type using the value of the first row in each segment.
For this, use a for each row.
Check if there is a value in these columns for that particular row. If there is, assign it to a set of variables. You can use an if condition to check it inside the loop.
Example
If Not String.IsNullOrEmpty(row(“index”).Tostring)
Then
– assign to variables
Else
– use the values in the variables to assign to empty cells of the row of the datatable
Row(“index”) = valueInVariable
This way you will get your datatable populated with all missing data.
Now write the data to an excel or continue with the data rated tasks that you have
here you go with a xaml for it
pikachu.zip (9.2 KB)
Cheers @mayuyu
Thank you very much guys
One last followup if you dont mind,
How about parsing tables formatted in the following manner sample2.xlsx
How do i approach fetching the data like for instance in this example,
getting the ‘Name’ and the ‘Type’ of all those ‘Attack’ higher than 100?
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.