I want to import excel sheet which have multiple sheet and load the sheet's data in uppercase (i.e. everything in uppercase- variables and observations all ).
Can you post an example of how the resulting dataset should look like?
Using sashelp.cars a data step changing all alphanumeric vars to uppercase could look like this:
/* untested */
data want;
set sashelp.cars;
array cvars _character_;
do i = 1 to dim(cvars);
cvars[i] = upcase(cvars[i]);
end;
drop i;
run;
Do the import into a SAS data set, then you can convert everything to uppercase using the UPCASE function.
data want;
set have;
array text _character_;
do i=1 to dim(text);
text(i)=upcase(text(i));
end;
run;
Can you post an example of how the resulting dataset should look like?
Using sashelp.cars a data step changing all alphanumeric vars to uppercase could look like this:
/* untested */
data want;
set sashelp.cars;
array cvars _character_;
do i = 1 to dim(cvars);
cvars[i] = upcase(cvars[i]);
end;
drop i;
run;
The following example is copying sheets of excel "c:\temp\date.xlsx" into WORK library.
Change the path of excel file and libname according to yours.
options validvarname=any validmemname=extend;
libname x xlsx 'c:\temp\date.xlsx';
filename x temp;
proc cport library=x file=x OUTTYPE=UPCASE;
run;
proc cimport library=work infile=x;
run;
libname x clear;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.