Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an Excel Workbook that I'm trying to Import data from, but I only want about 6 columns of the 80 columns that have data. 


What I have tried:

I have an Excel Workbook that I'm trying to Import data from, but I only want about 6 columns of the 80 columns that have data. 
Posted
Updated 6-Dec-18 2:26am
Comments
Mohibur Rashid 6-Dec-18 1:38am    
Have you considered VBA?
Member 14075301 6-Dec-18 6:07am    
no
Richard MacCutchan 6-Dec-18 4:49am    
Then you need to specify which columns to import. But since you have given no clue as to how you are trying to do the import we cannot guess how to fix it.

1 solution

As you have stated that you are not using VBA then I am assuming you are using External Data on the ribbon.

When you choose "New Data Source", From File, Excel and choosing the file that you want to import, the Import Wizard is loaded.

The first thing you must do is choose the specific sheet that the data is on (this may be skipped if there is only one sheet in the workbook). Then press Next >

The next section allows you to tell Access whether or not the worksheet contains Column Headings in the first row. I can't help you there because I don't know what is in your spreadsheet. You may get an error message at this stage
Quote:
The first row contains some data that can't be used for valid Access field names. In these cases, the wizard will automatically assign valid field names.
Just click Ok to this message. Now press Next >

This is the important bit. In this section you get to decide what the Fieldnames are going to be, what the Data Type of each field will be, whether or not the field should be indexed and … whether or not to import the field (column)

Highlight each of the columns you do not want to import and tick the box next to "Do not import field (Skip)"

Now press Next >

The next section allows you to decide whether or not to have Access add a primary key, or you can choose a specific column for the primary key, or you can have none.

Now press Next >

Choose the name of the table you are importing into (assuming you were importing to a new table from the start of this process)

Now press Finish

If you like you can save these import steps if it is a file you are likely to load often.


Alternatively of course, you could always copy the columns you do want into another sheet and import that as-is.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900