BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
yael
Quartz | Level 8

Hello

 

I have SAV file that includes 124 columns and 4000 lines.

 

I do not know why I can not import an excel file to SAS (working via the university), so now I am trying to do other action in order to add data.

 

I want to add an additional column (new variable) with 4000 lines to the existing SAV file. How do you suggest to do it (I check in this community and find many options like SQL but I am not sure about it).

 

Thanks for any clue

 

Hedva

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

SAS UE can deal with Excel files and SPSS files without issues. 

 

How are you importing your data? If you're not sure of the code and such and are more familiar with SPSS point and click interface, I recommend using the GUI tasks instead of trying to code. 

 

 

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

What is a SAV file?

 

"I do not know why I can not import an excel file to SAS (working via the university)" - we don't know either, perhaps if you told us what you were doing, what errors you get etc.  As UE runs on a virtual linux image which Office is not, then yes SAS cannot process Excel files.  You can of course save the Excel file as CSV and then import that into SAS (the problem here lies with Office which is proprietary Windows only software).  

 

As for adding another column, you can do this in any number of ways through datastep (this is the main language) or sql sub component.  For example here I add a column to the dataset have outputting to a new dataset want:

data want;
  set have;
  new_var=1 + 2;
run;

new_var will default to numeric length 8 as I did not specify any format or type.  You need to provide more information on your specifics for us to help.

Reeza
Super User

SAS UE can deal with Excel files and SPSS files without issues. 

 

How are you importing your data? If you're not sure of the code and such and are more familiar with SPSS point and click interface, I recommend using the GUI tasks instead of trying to code. 

 

 

SuryaKiran
Meteorite | Level 14

Also note that upgrading the VirtualBox from 5.2.6 to 5.2.8 have issues with shared folder. In case if you have problem accessing the local files in SAS UE then downgrade the VirtualBox to 5.2.6. You can find the previous version of Virtual Box here VirtualBox-5.2.6-120293-Win.exe

Thanks,
Suryakiran

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 884 views
  • 3 likes
  • 4 in conversation