Please Try workbook.sheets(“Sheet1”)
Now it’s “Cant convert from Object to Microsoft.Office.Interop.Excel.Worksheet”
Welcome to fourms
Check below for your reference
Hope this may help you
Please give a try,
Click imports tab near arguments tab.
Type microsoft.office.interop.excel and import it.
I have already done it
Hi @YoungFave give a try,
sheet = (Microsoft.office.interop.excel.worksheet)workbook.sheets(“Sheet1”)
It’s hepled me: sheet = DirectCast(workbook.sheets(“Sheet1”), Worksheet)
But something is wrong in this line: excel = New Microsoft.Office.Interop.Excel.Application
Maybe because I don’t have excel license
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.