Question: how to import excel file using powershell?
Answer: $objExcel = New-Object -ComObject Excel.Application.
$WorkBook = $objExcel.Workbooks.Open ($ExcelFile)
$WorkBook.sheets | Select-Object -Property Name.
$WorkSheet = $WorkBook.Sheets.Item(1)
$totalNoOfRecords = ($WorkSheet.UsedRange.Rows).count.