BookmarkSubscribeRSS Feed
phil27
Calcite | Level 5
Hi,
I am using ods ods tagsets.excelxp to make an xls file.

I need to customize the header with a macro-variable.

The Print_Header statement :

Print_Header='&E Fichier audité : ' &fichierATraiter
Produces a syntax error.

Print_Header='&E Fichier audité : &fichierATraiter'
Works but the header of the xls file is Fichier audité : ichierATraiter
instead of Fichier audité :
followed by the value of &fichierATraiter.

What syntax would be correct ?
Thanks.

Phil
6 REPLIES 6
Florent
Quartz | Level 8
Hi,

Couldn't you use the following statement ?

Print_Header="&E Fichier audité : &fichierATraiter"

Regards,
Florent
phil27
Calcite | Level 5
Thanks Florent,
it works but in this case the Excel layout doesn't work no more; & is not recognized by sas.

phil
Florent
Quartz | Level 8
Phil,

What & are you talking about ?

It doesn't appear in your first message.

Florent
phil27
Calcite | Level 5
Excuse me, I meant &E. &Amp was for the footer.

phil
Florent
Quartz | Level 8
Ok 🙂

Could you try with the following statement ?
Print_Header='&E Fichier audité : ' || "&fichierATraiter"

Florent
phil27
Calcite | Level 5
This syntax works well :

Print_Header="%nrstr(&)E Fichier audité : &fichierATraiter"

Thank you for your help.

phil

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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