How to read an Excel like below. Also contains merged cells

image

Can someone help please
I want to get details of product A,B,C,D separately with other details. And send a mail to respective product separately in a readable way

|Eg:
ProductMarks A
colour 10 / 6
height 6/ 2
weight 7 / 5
length 10 /8

ProductMarks B
colour 10 / 7
height 6/ 5
weight 7 / 2
length 10 /4

like wise for C , D etc etc
Once taken have to send an email to email address related to ProductMarks A , ProductMark B etc etc separately

Hello @Shanika_Perera

Whiel reading the excel you can set the range from row 3. It will help to get all yhe required data.

Then you can loop through the datatable and get each column values using the index of column like CurrentRow(0).Tostring will give you the color column.

Thank you @Rahul_Unnikrishnan
I am basically really new to UIpath. how to get the values separately for A and Separately for B etc. Do we have to group or something. Is there anything like that in UI path activities
Please help me

Like I need A details separately and for B separately. Dont need to get the all row details at one

CurrentRow(3).ToDtring will be A column.

You can use Read range activity. In the range provide A3:E6.

Then use a For each row in datatable activity.

Inside that add a message box qctivity and try to print CurrentRow(1).Tostring to confirm colors are properly selecting.

@Rahul_Unnikrishnan
CurrentRow(1).Tostring will give all the details of that row right ? I means like below
image

let me try again and upload the file for you

No…it will give only the second cell value…

Index will start from “0”. So index 0 will give first cell value, index 1 will give second cell value, etc…

1 Like

Hey,

Please check this workflow which i Attched
New folder.zip (3.2 KB)
Copy of Dummy.xlsx (10.5 KB)

Regards

1 Like

Dear @Rounak_Kumar1
Thank you so much. It was so valuable, for a starter like me and encouraging me as well.

If the Number of columns under ‘Product Marks’ not fixed, then how will it go. Hope u understand what I say. If we are developing it to be used by anyone, one can give the file with ABCDEF columns (‘Product Marks’ ) and another one can give the file only with ABCD columns. Is there a way that we can loop this number of columns without fixed.

Also can we use just one output table write ‘A’ details to that and then send those details in a mail with a readable format and then after that to get the 'B’s details and go like wise until it reaches end (till all ‘Product Marks’ columns are finished.) Is it a good way.

Hope you will help me to figure out this as well. Now wondering how to do this :thinking:

Once the output is fine I actually I have to learn from the beginning how to format the details as well.

Hey,

Please go through this Updated one.
UpdatedOne.zip (10.4 KB)

Note: Please don’t delete the Sheet 2 data As we keep this Reference because this is constant column(Creteria,Value) and In sheet 1 you can add multiple column like D,C,E,F…so on I made it dynamic

Please let me know, You got the output As Expected or not
Thanks

@Rounak_Kumar1 wow… that really works. Thank you so much
can u explain to me a little bit what is happening in below ;
deaultview.to table

image

I am Going column by column In a Data Table.
and Iterating them
You can see here
OutDT.DefaultView.toTable(true,item.columnName)
Item.columnName- i am going through each column

If you are getting the Expected Output. Please Choose the Appropriate Solution.
and close this thread so it will help to others as well.

Thanks

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.