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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2444 views
  • 0 likes
  • 2 in conversation