i have excel workbook of sheet 1 and sheet 2 i want to paste the data from sheet 1 to sheet2 i dont want to add headers from sheet 1 i want only data without headers i have taken sheet 1 and sheet 2 in Dt1 and Dt2 variables
Financial Sample.xlsx (90.9 KB)
Hi @T_Y_Raju
You can use the append range workbook activity.
→ In the Workbook path field give the excel file path.
→ In the Sheet name give the “Sheet2”
→ In the Datatable field pass the Dt1 variable.
Check the below image for better understanding,
Hope it helps!!
Have you tried the Merge Data Table activity?
merge table will paste data adjacent to data in sheet 2 i want sheet1 data in sheet2 without headers in sheet1 it should paste below last last line of sheet2
its adding headers how to skip that
Append range workbook will not add the headers.
Try to print the datatable in immediate panel and check is it showing the columns of showing any other columns. I think your datatable is considering the headers as first row… @T_Y_Raju
ok there are some formulas in sheet 1 when copied in sheet2 the formulas are missing
when preserve format is not working how can deal with this?
When you are converting the excel data to datatable, datatable doesn’t support and store the formulas it will only Store values.
If you want to copy the sheet1 data and paste in sheet2 that can be done by using Excel activities.
If you want to do with excel activities let me know… @T_Y_Raju
Then rename the columns so they’re the same in both datatables, then use Merge Data Table. Also, a datatable cannot not have headers (ie column names).
will copy sheet takes the formulas
Yes excel activities can… @T_Y_Raju
In the attached file it doesn’t contain any formulas but the copy\paste range activity will copy the both formulas and values from one sheet to othe sheet by excluding headers.
Check the below steps,
→ Use the Excel Process scope activity and insert the Use excel file activity inside of it.
→ Provide the path of the Excel file in the Use excel file activity.
→ Inside Use excel file activity insert the Find First\last row activity to know the last row count of Sheet2.
Source field - Excel.Sheet(“Sheet2”)
Check add headers option
Select the Last Populated row from the Configure Last row as Dropdown.
Create a variable in the Save last row number as field, let’s call the variable name as LastRow_Sheet2.
→ Then use the Copy\paste range activity to copy the sheet1 data and paste it in Sheet2.
Source - Excel.Sheet(“Sheet1”)
Destination - Excel.Sheet(“Sheet2”).Range(“A”+(LastRow_Sheet2+1).ToString)
What to copy - All
Select the Exclude header from Source range only option from dropdown.
Then it will copy and paste all the data from Sheet1 to Sheet2.
Check the below workflow for better understanding,
Sequence3.xaml (11.0 KB)
Check the output file,
Financial Sample.xlsx (126.9 KB)
I hope you find the solution for your query, If yes Make my post Mark as solution to close the loop.
Hope it helps!!