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

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
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
  • 1469 views
  • 0 likes
  • 2 in conversation