Import Microsoft.Office.Interop.Excel does not work

if not automatically added, check if you have the below name space (5th or 6th line from top), if not try adding

image

xmlns:moie=“clr-namespace:Microsoft.Office.Interop.Excel;assembly=Microsoft.Office.Interop.Excel”