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

I was wondering if it's possible to create an excelfile with this on top in the sheet

&&B&i._Naam 2013-03.xls
Ontheffing Roerende Voorheffing - &&B&i._Naam
Datum Beslissing : 22/03/2013

followed with a dataset or if there is no data in the dataset  "nihil".

V1V2V3V4V5V6V7V8V9
dataset or nihil

Hope someone can help me.

Liej

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

If you want a macro variable to resolve you need to use double quotes instead of single quotes.

View solution in original post

6 REPLIES 6
suraestar
Calcite | Level 5

Hi. You can try with ods.tagset excel to have a customized excel

Liej
Calcite | Level 5

I'm trying the ods.tagset but I can't find a way to create such an excel.

Anyone who can help me?

Liej

suraestar
Calcite | Level 5

I thin you can find the solution here..Just try with the options in excelxp

Check the below links for samples and training,

http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html#toc

http://support.sas.com/resources/papers/proceedings12/276-2012.pdf

Thanks...

Liej
Calcite | Level 5

Thanks for the help.

This is my code and it works fine.

ODS Listing close;

ODS html3 body='/sas/prd/data/2013/Excel/CIT.xls' style=statdoc;     /*(1)*/

ODS noresults;

title c=brown bold "titel 1";

title2 "titel2";

title3 "title3";

data _null_;

set RVOut.CIT;

file print ODS=(Var=(a b c d e f));

put a b c d e f;

run;

ODS html3 close;

ODS listing;

ODS results;

BUT

(1)  ODS html3 body='&Excel' style=statdoc;    doesn't work

anyone who can help me to add the  '-sign before and after the &Excel variable?

Patrick
Opal | Level 21

If you want a macro variable to resolve you need to use double quotes instead of single quotes.

Liej
Calcite | Level 5

I used this to add the '-signs

%let Excel= %str(%'&path/Excel/&&E&i._Excel%');

but then I get this error when using it in

ODS listing close;

ODS html3 body=&Excel;

ERROR 22-322: Syntax error, expecting one of the following: a name, a suoted string

Smiley Sad

Thanks Patrick.

%let Excel=&path/Excel/&&E&i._Excel;

ods html3 body="&Excel";

These two little changes made it work.

Thanks a lot.

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!

Discussion stats
  • 6 replies
  • 1641 views
  • 6 likes
  • 3 in conversation