Excel - Create Pivot table

Hi,

When i record macro in excel to create a pivot table it works fine but when i use invoke VBA and run the script with UiPath , 6 columns are not populated and 5 more are randomly added.

Anyone have any ideas why this would happen?

Regards,
Shawn

@shawnmurray,

Can you let me know if you are using a macro which is recorded in one excel and using it in another one?

I am using it in the same excel workbook if thats what you mean cheers @HareeshMR

Actually, while recording macro, all the ranges and column values are hardcoded in the VBScript. So, if there are any changes with the range or column numbers, then entire preocess will change.

What I thought is , you have recorded with a excel and using with another one, so all the ranges and the columns are changed, so that it is giving you a inappropriate things @shawnmurray

Could you please try making everything dynamic so that it will work perfectly even if the data changes in the next excel

1 Like

hi @shawnmurray

run the execute macro activity. this will work perfectly.

Cheer😊
Happy Learning😊

2 Likes

Hi @Achal_Sharma the workbook and data may change slightly so i am not sure if that would work?

Thanks :slight_smile:

hi @shawnmurray

no data change will occur as the execute macro will only run marco and am i also using this activity and it is working fine over the huge data.

Cheer😊
Happy Learning😊

1 Like