How to Import or link CSV with more than 255 columns in ACCESS?

Stoorm

New Member
Joined
Jan 5, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a .csv with more than 255 columns (395 exactly), I only need 3 columns but I cannot manipulate the source file manually, that is, I cannot divide it in two.
The columns are: 131, 208 and 282

I have tried to do it by wizard but Access won't let me do it because it has more than 255 columns.
I have tried a thousand ways with vba but have not been successful.

Is there a way to do it with vba?
 
xenou,

I was concerned with >255 columns, not the rows. My thought was that the file was not normalized. So, by reading as a textstream and outputting appropriate data into proper structures.
Just my $.02
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
That makes sense to me actually. I think it should be possible as well. Normally when you have difficulty reading as a textstream and outputting data, it is either because of a very large amount of data or because of inconsistencies in the data (or both) ... so looking for clues was all.
 
Upvote 0
Microsoft Access has a limit of 255 columns per table. If you attempt to link to an external table that has more than 255 columns, Access will retrieve the first 255 columns only.

With a linked table, you cannot choose which columns are retrieved. If, say, you want to retrieve the 256th column but not the first, you can use a pass-through query instead:

Open your Microsoft Access database.
Create a new Query in Design View. Dismiss the Show Table dialog box.
Choose Pass-Through as the Query type.
Right-click the Query tab, and choose SQL View.
Enter your SQL statement in the Query pane. For example:
SELECT Col1, Col2, Col3 FROM Account
Choose the Run Button. Use the Select Data Source dialog box to choose your ODBC driver data source.

I hope this information answers your query.
Matt Henry
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top