How to convert .xls file into CSV format?
Answers were Sorted based on User's Feedback
Answer / manjunath wadi
It is very simple.
1. Click on "FILE" menu of the MS Excel file
2. Select "Save As" Option and click on that
3. Now you can see a dialog box "Save As", type the file
name select location to save
4. Select the option CSV(comma delimited)option from Save as
Type drop down box and click Save button.
Its Done!
Note: Only active worksheet can be saved if you are saving
your file in CSV format
Is This Answer Correct ? | 16 Yes | 5 No |
Answer / krishna
proc import datafile=file.xls out=<datasetname> dbms=excel
replace;
sheet='sheetno$';
run;
proc export outfile=filepath data=<datasetname> dbms=csv
replace;
run;
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / paul
step#1:Import excel file into SAS
proc import datafile='file location/filename.xls'
out=datasetname dbms=excel replace;
sheet='sheetname$';
getnames=yes;
run;
step#2: Export file to csv file.
data _null_;
set datasetname;
file 'location/file1.csv';
put <var list> ;
run;
Is This Answer Correct ? | 7 Yes | 3 No |
Answer / khaja
proc import out=<datasetname>
datafile="path\file.xls"
dbms=excel replace;
sheet='sheetno$';
run;
proc export outfile=filepath data=<datasetname> dbms=csv
replace;
run;
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / khaja
%macro imp (datasetname=,path=,fname=)
proc import out=&datasetname
datafile = "&path"
dbms = "&fname" replace;
getnames=yes;
run;
%mend;
%imp(datasetname=xyz,path="D:\docs...",fname=csv)
if you want to convert into txt,xls,mdb then simply you use
%imp(datasetname=xyz,path="D:\docs...",fname=mdb)
%imp(datasetname=xyz,path="D:\docs...",fname=txt)
%imp(datasetname=xyz,path="D:\docs...",fname=.xls)
Is This Answer Correct ? | 0 Yes | 0 No |
How to convert HTML file into SAS dataset?
What is the difference between the proc sql and data step?
what kind of variables are collected in AE dataset?
3 Answers Accenture, Quintiles, SAS,
wt is a-z and a--z?
how many types of prompts are there? : Sas-bi
What are the limitations for memory allocation for SAS variables
if i having variables named a b c d e f ,how to find total of each variable ????give syntax...??
tell me about intnx, intcx functions?
/* This is example of age caluculate wihtout to display perfect days and years in output window */ data age; retain dob "12jun2003"d now "24may2011"d; age1=now-dob; age=(now-dob)/365.25; years=int(age); days1=round((age-years)*365.25); months=month(now)-1; if days1 gt 30 and months in(12,10,8,6,4,2)then do; month1=days1/30.4375; month=int(days1/30.4375); if day(now)=1 then days=1; else days=round((month1-month)*30.4375)+1; drop days1 month1 month; end; else if days1 gt 30 and months in (1,3,5,7,9,11)then do; month1=days1/30.4375; month=int(days1/30.4375); if day(now)=1 then days=1; else days=round((month1-month) *30.4375); drop days1 month1 month; end; drop age age1; proc print data=age; format dob now date.; run;
what is pdv? how it is related to input buffer in sas?
How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?
is data integration and etl programming is same? : Sas-di