Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comma in Text String of Excel Cell

Status
Not open for further replies.

mychal

Programmer
Feb 13, 2002
41
US
I'd like to use the data in an Excel spreadsheet in SAS. One of the fields in my spreadsheet sometimes contains a comma. I'm not able to access SAS right now, but I'm being told that the comma will cause a problem when I bring the data into SAS.

Is this true?
 
If you read the data in as a CSV file then yes, it'll cause problems, however, if you use the import procedure that should hopefully circumvent this issue.
If you HAVE to export it from Excel to a flat file, then read it in to SAS, use a different delimiter than a comma, personally, I always opt for using pipes "|" as delimiters as you can be pretty sure that there will not be any of those used in the actual text, whereas the two most common delimiters (tabs and commas) are frequently used (be especially careful of tab delimited files exported from Access).
Another pitfall to watch out for is header rows which I have occasionally come across containing carriage returns, which obviously signify the end of the line to SAS and can cause havoc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top