How to copy to paste one excel to another excel

Hi Team,

I have two excel i want to copy one excel data to another excel , i used write range but it wont worked because second excel having formula and formatting is there .

I tried modern activity as well but i couldnt able to copy/paste two excel , single excel i can.

So i couldnt able to get solution, please help me anyone for this.

Input:
image

Expected output
image

Regards,
Raja G

@Raja.G
Try this:

// The source DataTable from which you want to copy data
DataTable sourceDataTable = /* your source DataTable */;

// The target DataTable where you want to copy data
DataTable targetDataTable = /* your target DataTable */;

// Create the target DataTable if it is empty, and define its structure accordingly
if (targetDataTable.Rows.Count == 0)
{
// Here you can clone the structure from sourceDataTable if needed
targetDataTable = sourceDataTable.Clone();
}

// Define the LINQ query to select the desired data from the source
var dataToCopy = from row in sourceDataTable.AsEnumerable()
select row;

// Now, add the selected data to the target DataTable
foreach (var row in dataToCopy)
{
targetDataTable.ImportRow(row); // This will keep the formatting and any original properties
}

@Raja.G

Did you try using copy paste range activity?

Cheers

What version are you using?

Use the update one, find activity copy/paste range

use a template so that you know how to input each variable

Hi, @Raja.G

Please share the excel