Hi @Tracy1 ,
You can achive this by using Run Vbscript action.The Vbscript to do the above scenario is provided below. Please change the paths of the file.
Dim objExcel, objWorkbookInput, objWorkbookOutput
Dim objWorksheetInput, objWorksheetOutput
Dim inputFilePath, outputFilePath
Dim newSheetName
' Define the paths to the input and output Excel files
inputFilePath = "input.xlsx"
outputFilePath = "output.xlsx"
newSheetName = "CopiedSheet" ' Name of the new sheet to be created
' Create an instance of Excel
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False ' Set to True if you want to see the process
' Open the input Excel workbook
Set objWorkbookInput = objExcel.Workbooks.Open(inputFilePath)
' Open the output Excel workbook
Set objWorkbookOutput = objExcel.Workbooks.Open(outputFilePath)
' Assume data is on the first sheet of the input workbook
Set objWorksheetInput = objWorkbookInput.Sheets(1)
' Add a new worksheet to the output workbook
Set objWorksheetOutput = objWorkbookOutput.Sheets.Add
objWorksheetOutput.Name = newSheetName
' Copy all data from the input worksheet
objWorksheetInput.UsedRange.Copy
' Paste the data into the new worksheet in the output workbook
objWorksheetOutput.Range("A1").PasteSpecial -4163 ' -4163 corresponds to xlPasteAll
' Save and close the output workbook
objWorkbookOutput.Save
objWorkbookOutput.Close
' Close the input workbook without saving
objWorkbookInput.Close False
' Quit Excel
objExcel.Quit
' Clean up
Set objWorksheetInput = Nothing
Set objWorksheetOutput = Nothing
Set objWorkbookInput = Nothing
Set objWorkbookOutput = Nothing
Set objExcel = Nothing
MsgBox "Sheet copied successfully!"
(Note:- if you got your solution you can mark as solution and gives kudos)
Thanks & Regards
Vishnu Reddy