2

I have an old COBOL system that spits out Simple CSV files. These files have no headers. i.e. all lines in the CSV are data/record sets.

I have the code to import the CSV file into VBA and pop it into an array. All works well but I lose the first line of data because it thinks it is a header row.

the SQL string I am using is SELECT * FROM Data.CSV

Shall I just pull the fields and script a work around or is there a more elegant solution.

thanks in advance for reading this post.

6
  • Modify the VBA code so that it doesn't drop the first row, surely. Commented Mar 3, 2015 at 23:54
  • 1
    Have you tried HDR=NO in the extended properties of the connection string? Commented Mar 3, 2015 at 23:56
  • thanks hobo but its seems not that simple. Commented Mar 4, 2015 at 0:31
  • I have tried HDR= NO but now I'm getting a EOF/BOF error, I get EOF = true and I can't pull the record sets. Commented Mar 4, 2015 at 0:32
  • 1
    Hi @barrowc I think your comment should be an answer. Commented Mar 5, 2015 at 11:36

1 Answer 1

1

Putting HDR=NO in the extended properties of the connection string should fix that error

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.