Create Pivot table in different sheet of same excel

click on that filter in your screenshot. Are you able to see “Modern Activity”? If yes enable that

Also which version of UIpath are you using?

@Rahul_Unnikrishnan Yes Modern Activity is there and it’s enabled . I am using 2021V of UiPath.

@Riya1 Then you should able to view the Pivot activity. Could you try updating the package version.

@Rahul_Unnikrishnan Can you suggest what should be the range and name of file if we want to choose whole excel? I am getting below error-
image

@Riya1

Could you share the screenshot of the details which you provided in that activity.
image

Inside the sheet you can give the sheet name …Suppose if it is sheet2 then, “Excel.Sheet(“Sheet2”)”

New Table name: Its the name of the pivot table. You can give any name.

Destination: Where you want to create your pivot.

You need to use this activity inside "Use Excel "activity. Then you will be able to select all the details without entering the values in the activity fields.

@Rahul_Unnikrishnan ,
Pls find below snapshot-
image

I have used “Use Excel” Activity.

@Riya1 her the Source which you provided is wrong. Range(“A1:P1”) will select only the first row.
If you want to seelct the entire sheet try as below.

Excel.Sheet(“Sheet1”)

@Rahul_Unnikrishnan Have tried but it’s not working

@Riya1
try the below

Excel.Sheet(“Sheet1”).Range(“A:G”)

@Rahul_Unnikrishnan Have tried but still getting same error as “Could not create pivot table with the specified name.”

image

Thanks

@Riya1 I think you are missing something while creating the pivot.Could you share the excel which you are using and the columns which need to consider for pivot.

@Rahul_Unnikrishnan ,
PFA
Demo.xlsx (633.3 KB)
Want ‘Age_Bucket’ as a column, “Manager name” column field as a row, “category” field as a row and “number” as a value in Pivot table.

Thanks

Pivot.zip (208.3 KB)

@Riya1 Keep only the relevant columns in the excel and it will work fine. You can use the attached workflow and you can check the excel inside that.

The excel which you shared was having more columns and that’s why you were getting that error.

@Rahul_Unnikrishnan ,thank a lot it’s work!!!

Is there any way to do a color in pivot table and send it in mail body?

Thanks

Hello @Riya1

You can extract the datatable and then you need to create the mail body as a html format.
You have to add the html tags and can write to a text while. Then read it and add to email body.
And you need to enable IsHtml in the email activity.

@Rahul_Unnikrishnan ,

But I need to do a color in some specific column only.
I have tried the same way that’s shared by you but it’s doing color in whole pivot table.Could you pls share the sample xaml file ?

Thanks

@Riya1

If you want only one column then you have to modify the html as per the need. It will take some time to create a sample xaml.

I think in the previous workflow which i shared a syntax is already there and you can modify that to get it. First create a HTML page with that syntax and if the format is finalized then you use that in email body.

@Rahul_Unnikrishnan ,

Is there any way to capture that pivot table and send it?

Thanks!