Hi,
Many users like to put a CR or LF in Excel to split out two address lines.
Ex. -
123 Any Street
Apt. 123
This is fine when importing as I normally read files with an EOR marker of CRLF, pretty standard.
However, now I am receiving a file where the address lines within a field are delimited by a CRLF in the middle of the file.
It seems that ADO reads this just fine:
The code above it just checking for the quantity however, what is the best way to open a CSV file like this and write it back out so another software can consume is handily? The other software does not like the CRLF in the middle of the file whether the field is enclosed by quotes or not.
Attached is a snippet of the file. Thanks.
Swi
Many users like to put a CR or LF in Excel to split out two address lines.
Ex. -
123 Any Street
Apt. 123
This is fine when importing as I normally read files with an EOR marker of CRLF, pretty standard.
However, now I am receiving a file where the address lines within a field are delimited by a CRLF in the middle of the file.
It seems that ADO reads this just fine:
Code:
Set connCSV = New ADODB.connection
connCSV.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ProcessFolder & ";Extended Properties=" & Chr$(34) & "text;HDR=Yes;FMT=Delimited;IMEX=1" & Chr$(34) & ";"
Set rsCSV = New ADODB.Recordset
rsCSV.Open "SELECT COUNT(*) AS [Qty] FROM [" & U_pageflexDataFile & "]", connCSV, adOpenStatic, adLockReadOnly, adCmdText
The code above it just checking for the quantity however, what is the best way to open a CSV file like this and write it back out so another software can consume is handily? The other software does not like the CRLF in the middle of the file whether the field is enclosed by quotes or not.
Attached is a snippet of the file. Thanks.
Swi