How to paste data table in a new xls file with some filtered paste format

Hello All,

I am using read range activity and getting result in DataTable. Now I have to write this data in new excel file with below filter.

I have to paste Data table with some predefined format like below

I am using write range to write data table by this my xls is getting generated but not able to provide this filters.
untitleduntitled1

Hi @Mohini_Gupta,

I think if you need this then you have to do the same as manual process, write your data to a new excel, then copy its data by opening and do the past special option to paste it in the other excel.

Hi, @sarathi125

I didn’t get your statement "copy its data by opening " meaning ?

Can you please provide proper flow, How i should proceed?

Hello,

You can write Excel Macro. I’ve done this job by writing macro. Benefit of macro is that it never fails.

Cheers,
Pankaj

@Pankaj.Patil
can u please share xaml file for this?
I am not much aware of this.

Thanks and Regards

Hello @Mohini_Gupta,

I’ve written a macro which will copy and paste as values the format you want,

  1. Rename Book1.xlsx to Book1.xlsm, because we can execute macro in xlsm extension file only,
  2. Drag and drop excel app scope activity and provide a path,
  3. Drag and drop execute macro activity and provide a macro name “copyAndPasteAsValues”.

Please find below file which has macro,

Book1.xlsx (10.6 KB)

Cheers,
Pankaj

1 Like

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