I have 2 Workbooks, I am trying to copy a range B2:B5000 from Report1 and paste it into Column A of Report2. It does copy and paste however the past goes into Report2 Column H20.. How can I specify what range to paste into? Here is what I have so far
$excel = New-Object -ComObject excel.application
$excel.Visible = $true
$SrcWkBk =$Excel.Workbooks.open("C:\Reports\Report1.xls")
$TRgWkBk =$Excel.Workbooks.open("C:\Reports\Report2.xlsx")
$SrcWkBk.WorkSheets.item(1).activate()
$SrcRng=$SrcWkBk.WorkSheets.item(1).range("B2","B5000");
$SrcRng.copy() | out-null;
$TRgWkBk.worksheets.item(1).paste();