Is there any way to copy and paste from Column to Row in excel using power shell tried above is my script. I want around more 30 Column to pasted in Row in another sheet. I have tired various combination.. I am able to copy but while pasting in row e.g. O2 row it fails.

I wanted column A1:A to be copied to row O2,P2 ,r2 .... It like transpose from column to row. I am not getting any error. Basically, it as not copying from column to row. Tried giving row =2 and column 2 Row++ but it didn't work.

Below method is one of the way a tired.

```
$path = Read-Host -Prompt ("Enter the Sheet Location")
$xl   = New-Object -ComObject excel.application

$xl.visible = $true

$wbk = $xl.Workbooks.open($path)
$ws1 = $wbk.WorkSheets.item("Old Data")
$ws2 = $wbk.WorkSheets.item("New Data")

$ws1.activate()

#Pasting  Specific Name  from first column

$xlPasteValues = -4163          # Values only, not formulas
$xlCellTypeLastCell = 11        # to find last used cell

$used = $ws1.usedRange
$lastCell = $used.SpecialCells($xlCellTypeLastCell)
$column = $lastCell.column
$range = $ws1.UsedRange

[void]$ws1.Range("A2$column").Copy()
[void]$ws2.Range("O18:O18").PasteSpecial(-4163) 

$ws2.activate()

#Pasting Monthly perfomance

$xlPasteValues = -4163          # Values only, not formulas
$xlCellTypeLastCell = 11        # to find last used cell

$used = $ws1.usedRange
$lastCell = $used.SpecialCells($xlCellTypeLastCell)
$column = $lastCell.column
$range = $ws1.UsedRange

[void]$ws1.Range("B2$column").Copy()
[void]$ws2.Range("O8:O8").PasteSpecial(-4163) 

$ws2.activate()

```