Excel Interop BC30574


BC30574 at line 14
Guys, can’t resolve this error. Need help

Hi @YoungFave

Please Try workbook.sheets(“Sheet1”)

Thanks

1 Like

Now it’s “Cant convert from Object to Microsoft.Office.Interop.Excel.Worksheet”

@YoungFave

Welcome to fourms

Check below for your reference

Hope this may help you

Thanks

Please give a try,

  1. Click imports tab near arguments tab.

  2. Type microsoft.office.interop.excel and import it.

Thanks

I have already done it

Hi @YoungFave give a try,

sheet = (Microsoft.office.interop.excel.worksheet)workbook.sheets(“Sheet1”)

Thanks

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

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.