Hi All,
I am trying to copy and paste the whole data irrespective of range from one worksheet to another worksheet in same excel file.
Below is the code
appXL = New Microsoft.Office.Interop.Excel.ApplicationClass
appXL.Visible = True
wbSource = appXL.Workbooks.Open("C:\Users\Administrator\Desktop\New folder\" & "Copy.xlsx")
wksSource =CType(wbSource.Worksheets("Sheet1"), Microsoft.Office.Interop.Excel.Worksheet)
wksDest = CType(wbSource.Worksheets("Sheet2"), Microsoft.Office.Interop.Excel.Worksheet)
wksDest.UsedRange.Value=wksSource.UsedRange.Value
With this , only first cell is being copied.I need to copy the whole sheet.
Could you please help me out with what I am missing here?
Thank You