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

Hi,

I would like to change the title from "Class_Number" to "Class Number". Even though i try so many ways, i couldn't write the right codes. Since i'm not very familiar with the coding i need some help.

*The reason that i ask for this is this is the last step of the coding before exporting it into excel. So i don't want to see the "_" between the words.

Here is some example of my codes which haven't worked.

1- Data ABC;

    Set ABCD;

    Class_Number = "Class Number";

    Run;

2- Data ABC;

    Set ABCD;

    Class_Number =Class +char(160)+Number;

    Run;

3- Data ABC;

    Set ABCD;

    A1="Sales Number"

    Class_Number =A1;

    Run;

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16

you can use the label statement to label the variables and display the labels in the created excel file

consider that you have the variable Class_Number and you are changing the variable label to "Class Number".

1- Data ABC;

    Set ABCD;

label    Class_Number = "Class Number";

    Run;

proc export data=ABC outfile='~path\abc.xls'

label dbms=excel replace;

  run;

Thanks,

Jag

Thanks,
Jag

View solution in original post

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16

you can use the label statement to label the variables and display the labels in the created excel file

consider that you have the variable Class_Number and you are changing the variable label to "Class Number".

1- Data ABC;

    Set ABCD;

label    Class_Number = "Class Number";

    Run;

proc export data=ABC outfile='~path\abc.xls'

label dbms=excel replace;

  run;

Thanks,

Jag

Thanks,
Jag
agodba
Calcite | Level 5

Hi Jag,

Thank you very much for your answer.

Regards,

Dogus Burak

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1552 views
  • 0 likes
  • 2 in conversation