I have seen the answer for importing multiple spreadsheets though I haven't tried it. How do I include the spreadsheet filename as the first field for all rows. By the way how does this handle if the workbooks are sometimes formated as one worksheet and sometimes two worksheets. The format is generally very similar.
After this task I going to work on merging the data many records when some have a common name (field) which I want as one record perhaps in a separate table with the unique data all together- there is a lot of duplicate data.
Thanks in advance
Code:
Function Impo_allExcel() Dim myfile Dim mypath mypath = "n:\importxls\aramiska\" Do myfile = Dir(mypath & "*.xls") 'this will import ALL the excel files (one at a time, but automatically) in this folder. Make sure that's what you want. DoCmd.TransferSpreadsheet acImport, 8, "aramiskaimport2", mypath & myfile myfile = Dir Loop Until myfile = "" End Function
Thanks in advance
Comment