trying to import excel sheet that contain 19 variable .but when i import this excel sheet only two column were export out of 19
@aanan1417 wrote:
Hi Sir,
i m trying to import csv file that consist of 20 variable and 6400000 observation.
but the issue is few observation are blank due to this i am getting data only 2400000
What code did you run? Here is how to structure a data step to read a delimited file (such as a CSV file).
data want;
infile "filename" dsd firstobs=2 truncover ;
input var1-var20;
run;
The DSD option tells it to properly handle empty values and quoted values. The TRUNCOVER option tells it to properly handle lines with fewer than 20 values. The FIRSTOBS=2 option tells it to skip the header row, remove if your file does not have a header row.
Adjust the INPUT statement to match the variable names and types needed for your file. The syntax shown will work if all of the variable are numeric.
Please post code and log, so that we the what's happening actually.
Hi Sir,
i m trying to import excel file that consist of 20 variable and 6400000.
but the issue is few observation are blank due to this i am getting data only 2400000
I have merged your posts, it seems as if they are about the same problem.
As requested earlier: post code + log, so that we see, what you are doing.
Hi Sir,
i m trying to import csv file that consist of 20 variable and 6400000 observation.
but the issue is few observation are blank due to this i am getting data only 2400000
Show your code.
Show the log.
CSV files are read with a data step generated by Proc Import and the actual content of the data can be critical.
You have been asked REPEATEDLY to post your code and log. How should we help you when you ignore our requests?
@aanan1417 wrote:
Hi Sir,
i m trying to import csv file that consist of 20 variable and 6400000 observation.
but the issue is few observation are blank due to this i am getting data only 2400000
What code did you run? Here is how to structure a data step to read a delimited file (such as a CSV file).
data want;
infile "filename" dsd firstobs=2 truncover ;
input var1-var20;
run;
The DSD option tells it to properly handle empty values and quoted values. The TRUNCOVER option tells it to properly handle lines with fewer than 20 values. The FIRSTOBS=2 option tells it to skip the header row, remove if your file does not have a header row.
Adjust the INPUT statement to match the variable names and types needed for your file. The syntax shown will work if all of the variable are numeric.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.