Quote:
Originally Posted by Guessed
Ahh, I see what your problem is. The Split command is not returning a two dimensional array. Have a look at how many 'lines' you have after running the split command.
If you split a string containing carriage returns but don't use those CRs as the split trigger then the result will include those CRs in the middle of the array item. This means that
++ 105<CR>0 ++ splits to become and item in the array which is 105<CR>0
|
Guessed, thanks for helping. Your input is very helpful... indeed, issue is clearly the line break character.
I generate the .txt file with PHP and I use PHP_EOL for line break, which adds \r, \n\, or both \r\n, depending of server (Windows or Linux) - I need to check this. Also, it seems that opening files in txt mode in Windows will also change CRLF into CR...
Well, I need to do more testing.
a) Use something else than PHP_EOL for line break (in PHP)
b) Clean the line in VBA before splitting, to remove any vbLf, vbCr, vbCrLf and/or vbNewLine.
Thanks a lot
I wish there was a way to avoid this, generating