Forum Discussion
1 Reply
- shankar_rCommunity Hero
Hi,
Below code will copy only the visible cells from Sheet1 Range("A1:F1") to Sheet2 Range("A2:F2").
Sub ReadDataFromExcel Dim Excel Set Excel = Sys.OleObject("Excel.Application") Excel.Workbooks.Open("D:\Users\Documents\Testss.xlsx") Excel.ActiveWorkbook.Sheets.Item("Sheet1").Range("A1:F1").SpecialCells(12).Copy(Excel.ActiveWorkbook.Sheets.Item("Sheet2").Range("A2:F2")) Excel.ActiveWorkbook.Save Excel.Quit End SubYou can customize this code as per your requirement.