I have been going at this for 2 days roaming all over the web trying to help myself. I have never tried to get data from an Excel sheet and this is my first time.
My problem is I want to get data from an excel sheet to an access database, but do not want the column headers, since this is a database that already exists. I have tried countless ways of writing it but keep either erroring out in debug or within the code. I would love to provide a sample of the code that I had, but I have deleted to try a new method which was to display the excel data in a gridview and import it from thgere to access. The gridview idea seems a bit drawn out so if someone can help me get back on track.
I have added so many using directives that I have no more room in my project j/k. Anyway I have been writing this different ways trying to get it accomplished from interop to OLEDB. I am sure I am doing something wrong but I am not sure what. I have the database created, and a dataset and the database is in my project. The database has a connection in server explorer and I can preview it to confirm.
The database is called Survey. The dataset is called SurveyDataSet. I am using the variables fleName to hold the file name, flePath to hold the file path, and SLASH to hold a backslash for proper formatting of the excel path (this is done because the user will pick the path so it will always vary).
I dont think this is enough data on your problem. If I have understood correctly, you just want to import the data from XL to Access without the headers in XL, right? So using your code ignore the header (the whole row at known location).