VBA - Importing CSV files with blank fields to Access

AHalpain

New Member
Joined
Jan 6, 2012
Messages
12
Good evening everyone,

I have a data set of 500+ CSV files with more than 50K lines of data in each. Through out the data there are a number of empty cells. Unfortunately none of the cells as a fixed width or anything like it. I have included the code I am using to transfer the data in and a sample of a table similar to what I am facing. The question I have to the collective Guru's here is what do I need to update, change or add to keep these blank fields in the data set while not losing any data integrity?



The code I have is:

Workbooks.OpenText filename, , , xlDelimited, xlTextQualifierNone, True, True


A Sample file would be:

Name
Sandwhiches
Pasta
Drinks
Tables
Color
Cory
18
43
7
12
Yellow
Tapenga
12
43
Purple
Eric
14
700
Red
Mr. Feeny
170
Black

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi,

are you having trouble when uploading the data to access?

also how are you uploading the data to access? via excel or via access direct?
 
Upvote 0
I am trying run it directly through the VBA to run it in the background So i guess that would be directly into access.
 
Upvote 0

Forum statistics

Threads
1,214,992
Messages
6,122,631
Members
449,095
Latest member
bsb1122

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