R
RB Smissaert
I have text files holding comma separated values.
They are like this:
"bla-bla",,,,"",,""
"",,,,bla-bla,,
Now what I have to do is change the "" values to Empty values, so ,"", will
become ,,
This is easy, but I also want to know how many files had such an alteration
done.
This now proves very difficult, because I can't differentiate between ,, and
,"",
I can't do the alterations directly in the text file as I have to check a
few things, which are best done in an array.
I put the text files in an array and then the following loop runs:
For i = 1 To LR
For c = 1 To 35
If arr(i, c) = "" Then
arr(i, c) = Empty
bDoneClean = True
End If
Next
Next
The array has to be declared as a variant.
Because I can't differentiate bDoneClean becomes true even if the array
element was already empty, so I can't count how many files were altered.
I have tried numerous ways to differentiate this, but found nil that works.
Thanks for any advice.
RBS
They are like this:
"bla-bla",,,,"",,""
"",,,,bla-bla,,
Now what I have to do is change the "" values to Empty values, so ,"", will
become ,,
This is easy, but I also want to know how many files had such an alteration
done.
This now proves very difficult, because I can't differentiate between ,, and
,"",
I can't do the alterations directly in the text file as I have to check a
few things, which are best done in an array.
I put the text files in an array and then the following loop runs:
For i = 1 To LR
For c = 1 To 35
If arr(i, c) = "" Then
arr(i, c) = Empty
bDoneClean = True
End If
Next
Next
The array has to be declared as a variant.
Because I can't differentiate bDoneClean becomes true even if the array
element was already empty, so I can't count how many files were altered.
I have tried numerous ways to differentiate this, but found nil that works.
Thanks for any advice.
RBS