I am struggeling with understanding the following code
Dim _xlsSheet As Excel.Worksheet = DirectCast(xlworkbook.Worksheets(Name), Excel.Worksheet)
or
xlworkbook = DirectCast(xlApp.ActiveWorkbook, Excel.Workbook)
All examples I work throu concerning Excel.Interop I see the use of DirectCast everywhere. what i dont understand is why we have to use DirectCast here. If I declare dim xlworkbook as excel.workbook have using directcast instead of just assigning the workbook?