Help using Base SAS procedures

proc import with CSV

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 444
Accepted Solution

proc import with CSV

hi,

can i  use namerow,getnames,startrow and sheet within proc import  when trying to import a  CSV file?

Getting errors  when trying to  import.

 

Anyone pls?


Thanks,


Accepted Solutions
Solution
‎09-28-2015 03:40 PM
Super User
Posts: 11,343

Re: proc import with CSV

CSV files will not have sheets, so that won't work with csv, NAMEROW only applies to Excel spread sheet, not CSV.

Getnames will look for the names on the first line of the data. Datarow specifies which line of the file has the first row of data that you want read. You may also want to add a quessingrows =32000 to examine more values before guessing type of variable and length of character variables.

 

Post the code and the log results of errors for more specific help.

View solution in original post


All Replies
Solution
‎09-28-2015 03:40 PM
Super User
Posts: 11,343

Re: proc import with CSV

CSV files will not have sheets, so that won't work with csv, NAMEROW only applies to Excel spread sheet, not CSV.

Getnames will look for the names on the first line of the data. Datarow specifies which line of the file has the first row of data that you want read. You may also want to add a quessingrows =32000 to examine more values before guessing type of variable and length of character variables.

 

Post the code and the log results of errors for more specific help.

Super Contributor
Super Contributor
Posts: 444

Re: proc import with CSV

thanks ballardw

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 332 views
  • 0 likes
  • 2 in conversation