Search results

  1. I

    importing Excel files - how to add additional columns?

    There is no CustomerName in my staging table, I thought I need to hard code it the same way as I did with filename via appendquery. Unless I miss the trick here? Even if I add CustomerName in staging table, it does not work well. The code runs but then I get 'Name AutoCorrect Save Failures' in...
  2. I

    importing Excel files - how to add additional columns?

    I am so sorry but this code still returns error "Run-time error 3061: Too few parameters. Expected 1" as per attached print screen. I did try to fix it myself but it is above my abilities :mad: I googled this problem and it looks like I need to use single quotes ' to make it work but when I...
  3. I

    importing Excel files - how to add additional columns?

    Stupid me! I did not realize I have to follow the same process as for filename. I have done everything exactly the same way as for filename but something is not working too well. I keep getting error message: "Run-time error 3061: Too few parameters. Expected 1" Dim strFile As String Dim rsC...
  4. I

    importing Excel files - how to add additional columns?

    Many thanks! I knew the answer was simple, hopefully next time I will find it myself :) The code runs now without problems but the result is not exactly as needed. In CustomerName I get only value from first imported spreadsheet and then it repeats for all other tables/imported files as per...
  5. I

    importing Excel files - how to add additional columns?

    Hello there! Yeah, I managed to get filename all right. All I had to do is to change "[FileName]" to "[filename]" in your code. But I really struggle with the one above. If I just run it as it is, I get error: “Compile error: Expected list separator or )”. I guessed it had something to do...
  6. I

    importing Excel files - how to add additional columns?

    Hi Namlian, I have attached a print screen with a copy of imported spreadsheet. Would you be able to suggest how to get customer name in a similar way to File Name? I have highlighted in yellow imported range 'name'. I have done it because sometimes users insert some additional columns, so I...
  7. I

    importing Excel files - how to add additional columns?

    Many thanks for your prompt response, I have amended my query but I got following in my filename column in Data table: [filename] I have used exactly your code (copy/paste) I even used exactly the same names for tables queries etc, just to make sure it is gonna work the way it should but the...
  8. I

    importing Excel files - how to add additional columns?

    I am sorry, I am sure I must be missing a very simple trick but I keep getting error message: "Run-time error 3061 Too few parameters. Expected 1" I guess this is because I added filename in table Data but not DataStaging and then my append query goes crazy because I reference to the column...
  9. I

    importing Excel files - how to add additional columns?

    I am sorry but I cannot really see how to apply above to my problem. I use above code to import all Excel files from a particular folder into one table in Access, so basically I consolidate them. I did set up a range name in Excel files because often users add new columns to some files. So I...
  10. I

    importing Excel files - how to add additional columns?

    Hello! I am using below Macro for importing Excel files into Access. The code works very well but unfortunately now I need to modify it. My knowledge of VBA is extremely limited (below code I just found and modified a little bit), so I would appreciate help. I need to add two additional...
  11. I

    how to 'unpivot' table

    Many thanks, UNION query did the trick!
  12. I

    how to 'unpivot' table

    Hi Guys, I have been trying to solve below problem for couple weeks now without much luck. So I do really hope someone could help me. I import from Excel attached table. I need now somehow 'unpivot' this table and in order to do it I need to concatenate columns and rows names and then match...
Back
Top Bottom