Write data to new sheet with already existing column!

Hi Folks,

I have an excel file with two sheets, Sheet1 and Sheet2.

I need to copy data present in Sheet2 and write that into Sheet1, so that the following columns are pasted such that →
CurrentYr ->Year
TimeStamp → Modified
Duration → Period.

P.S. I don’t want to preserve the format in Sheet1, thus cant overwrite them as this is a template and I want to start writing from A2 ranges only.

Expecting output like this :
image

Uploading xaml and excel file that I tried. Need to know what I am doing incorrectly here.
Main.xaml (14.0 KB)
Test.xlsx (11.8 KB)

hi @shikharno.7
you can read sheet 2 then change there column name to new name as sheet 1 like this

DT.Columns(0).ColumnName = “newColumnName”
Here I am renaming 0th Column i.e. First Column u can use old column name instead of index

then append range to sheet1
try it by your self please

Hi @shikharno.7 ,
I download excel file,
You can read sheet2 then assign to sheet1,
I will try data
Regards

Hi @Yazan_Otaibi , I want to write below the column names Modified On, Year and Period. This method will overwrite the column names. Main purpose is to preserve the format from Sheet1.

Is there another solution :slight_smile:

Thanks in advance.

Dear
if you use append range activity you will preserve the format from Sheet1
try it please