Someone is creating a CSV for me and then I deal with the CSV trying to bring it into SAS.
There are some text fields that contain commas in the CSV, which SAS doesn't like, understandably, since the CSVs use commas at delimiters. Is the best way to deal with this to do CTRL-F in Excel to find all the commas and get rid of them? Or should I insist that the person creating the CSV for me get rid of the comma during that step? I don't know how easy or hard or standard or non-standard that is.
And I have another issue. I'm not sure if this is caused by " or by a carriage return in Excel. Sometimes when I bring data in I don't get an error at that step but then I look at the data and there are some obvious errors. Sometimes something at the end of a row gets wrapped into the beginning of the next row and it may be that a carriage reutrn in Excel is the problem. If the text field is like this
blah blah blah blah blah
then it's okay. But sometimes in the Excel cell you see only
blah blah blah
and then you make the row wider (in the up and down sense) and you see the data is actually
blah blah blah
blah blah
IOW, it's continue below not because it's too long for the cell (because the data in the other cells happily overflows into the next cell) bur rather because there is a carriage return within that cell. I remove the carriage return and then it's all in one cell.
Again, I don't know if the best way to deal with that is try to detect them and then manually remove the carriage returns or instead tell the person creating the CSV for me to fix that before it gets to me.
So that's about it, although I do get some quotes in my data, although they're only in one cell in the Excel and there appear to be more of them when I bring it into SAS. But perhaps a CTRL-F and deleting the quotes manually like with the comma would fix that. I don't think the commas or the quotes matter in terms of data content so from that perspective they could be removed without consequence.
That's it. TIA for any thoughts.
... View more