Results 1 to 4 of 4
  1. #1
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    408

    Import excel in table and add values


    Hi,
    i have a table that has the following columns

    "IDpeople","IDdeal","portfolio1","portfolio2","por tfolio2" etc etc

    i have a spreadshit with these columns
    "portfolio1","portfolio2","portfolio2"


    now, i want to import the spreadsheet in my table, and i want to add a fixed value (easy to get) to every row i import in the columns "idpeople" and "Iddeal" that are not present in the spreadsheet.

    ideas?

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,557
    Hi

    It would be easier to do an Import of the Excel sheet into a temp table but the obvious question is "Why do you have Repeating Group?"

    The fields Portfolio1, Portfolio2, Portfolio3 - In Access these should be records in a separate table.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Firstly you cannot have two filednames the same in a table.
    Link to your spreadsheet and use an Append query to add the data and your hardcoded vlaues. As well as the spreadsheet column data, you would have 800 AS IDPeople, 20 as IDDeal, where 800 and 20 are your hardcoded values.

    Use a Select query first to get the data correct, then change it to an Append query.

  4. #4
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    408
    thanks very much, maybe i'll import in a query def, and then an append query
    the fieldname were just placeholder...not the true name. thanx for the advice however
    i'll try then i'l set as solved

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-23-2020, 02:33 PM
  2. Replies: 4
    Last Post: 03-19-2015, 06:14 PM
  3. Replies: 4
    Last Post: 12-17-2012, 01:21 PM
  4. Importing Excel file. (2 non numeric values won't import)
    By Amerigo in forum Import/Export Data
    Replies: 3
    Last Post: 05-20-2011, 11:31 AM
  5. Replies: 3
    Last Post: 12-21-2010, 11:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums