I have a problem. I want to take the name of the active sheet from an open Excel file.
The best solution until now is Invoke Code and for the moment i manage to open the Excel file, but i dont know the code in VB.Net to take the name of the Active sheet.
This is the code:
Dim excel As Microsoft.Office.Interop.Excel.Application
Dim wb As Microsoft.Office.Interop.Excel.Workbook
Dim ws As Microsoft.Office.Interop.Excel.Worksheet
excel = New Microsoft.Office.Interop.Excel.Application ‘create the instance Of excel work book’
wb = excel.Workbooks.Open(filename) 'Open the excel the file excel.Visible = True
Thank you in advance