The above code works fine. All I required upon the program loading is the Excel data to be placed into a dataset.
However, part of my program requires this dataset to be updated given that the Excel file is updated. When I call the above function again (after it has been called during the form load event), the Excel data isn't added.
I've done some additional tests. For example, I've cleared the dataset just before the above function is called a second time only to fine that the dataset remains empty.
I've also stoped the above function being called during the form load event, but called it later on in the program to find that it works and the updated Excel data is placed into the dataset.
This leads me to believe that the above code has some sort of an issue.