To open an excel file in Visual studio use the following
Dim xlApp As New Excel.Application
Dim xlBook As Excel.Workbook
xlBook = xlApp.Workbooks.Open(path to the file)
xlApp.Visible = True
Job done nice and simple excel opens the file and closes the process when you close excel.
If you do GC.collect at the end it will do a garbage collection.
No comments:
Post a Comment