1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Imports Microsoft.Office.Interop
Try
'definition des variables pour la connection au tableau excel
oRien = System.Reflection.Missing.Value
oExcelApp = New Excel.ApplicationClass
'je n'affiche pas mon tableau excel
oExcelApp.Visible = False
'j'ouvre le tableau
oBooks = oExcelApp.Workbooks
oBook = oBooks.Open(chemin, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien, oRien)
oSheet = oBook.Worksheets(1)
Catch ex As Exception
MsgBox("La connection au fichier XLS n'a pas fonctionné, relancer l'application ou indiquez un autre fichier", MsgBoxStyle.Exclamation)
End Try |
Partager