hi Oleg,
your code looks great but í've got a small problem running it (since i am an absolute beginner in sas, i dont really fully understand your code as to say where my problem is). i have a file with 10 test data tables and there is only one table in each of them, containing the variables a b c d...n and each variable has 30 random values. I suppose RANGE gives the area where the data should be read, so i adjusted my code to 'RANGE="table1$A1:N30"' otherweise i didnt change any part of the code. and then i ran it and got the following warning message:
WARNING: Variable a was not found on BASE file. The variable will not be added to the BASE file.
and this for every variable a to n. As a result contains work.tt no columns.
why did this happen and how should i adjust my code so it works?
Many thanks again!
BR Dingdang
HI Oleg,
problem solved as i changed RANGE to SHEET. but many thanks anyway
BR Dingdang
Hi Oleg,
i used your code on another file. the excelsheets that i want to read into SAS have about 5000 variables and each of them have only 1 Observation. You code worked great but only 255 Variables were read into SAS, and each of them had then 8 observations (only the first one was originally in my excelsheets and the other 7 are just empty ones). why did this happen? how can i correct it so that all the variables could be correclty read into SAS?
thanks again for your super help!!
BR Dingdang
ok. found the problem. SAS can only import and export 255 variable when you access excel 2007 files. is it possible that i modify the code, so that SAS read 255 variables in once at a time and then merge them all together in the end?
Many thanks. BR Dingdang
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.