![]() |
Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
|
Fixes embedded cr / lf / crlf in CSV. More...
Go to the source code of this file.
CSVs will sometimes contain lf or crlf within quotes (eg when saved by excel). When the termstr is ALSO lf or crlf that can be tricky to process using SAS defaults. This macro converts any csv to follow the convention of a windows excel file, applying CRLF line endings and converting embedded cr and crlf to lf.
usage:
fileref mycsv "/path/your/csv"; %mp_cleancsv(in=mycsv,out=/path/new.csv)
in= | provide path or fileref to input csv |
out= | output path or fileref to output csv |
qchar= | quote char - hex code 22 is the double quote. |
Definition in file mp_cleancsv.sas.