Quantcast
Viewing all articles
Browse latest Browse all 12

Access VBA code to import specific columns of excel csv

I need to import the entire set before I edit the wasted space in vba.

Hi tmd63,

If you read the CSV-file line by line, you can keep the first line with the headers in a variable, e.g. Header_arr, using the Split function

Then the next lines are read and converted to e.g. Line_arr.

When you loop throuh the Line_arr, x = 0 to UBound(Line_arr), you can skip the non relevant elements. For a relevant value at position x, you can find the corresponding header as Header_arr(x).

In fact you only import the relevant data.

Imb.


Viewing all articles
Browse latest Browse all 12

Trending Articles