I'm curious if anyone has done this or knows how to go about doing it. I need to bring Excel data into Access. The files will be in varying layouts. We're thinking about editing each spreadsheet header to selectively choose which columns get imported. Each spreadsheet may have 5 columns or 100. By analysis we can determine which fields should be imported and into what fields. We are thinking of editing the header with specific names like _AssetID, _Location, and _Cost. From Access I want to read the excel files header and "discover" these specific header names then only import those columns.
My thought was to dynamically generate a SQL statement based on the header name then import....
The final query might look like
INSERT INTO Table1 ( assetID, location, cost)
SELECT _AssetID, _Location,_Cost
I'm not sure how to go about this...
I should also note that at some point we may want to use SQL server to store this data - potentially through access... I'm hoping the groundwork I lay here in Access will at least establish a process for moving this to sql server.
Right now - I just need to get this data into Access