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>
 

carpy1985

Board Regular
Joined
Nov 16, 2011
Messages
79
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?
 

AHalpain

New Member
Joined
Jan 6, 2012
Messages
12
I am trying run it directly through the VBA to run it in the background So i guess that would be directly into access.
 

Forum statistics

Threads
1,081,415
Messages
5,358,533
Members
400,502
Latest member
price83

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top