DATA Step, Macro, Functions and more

Macro in ODS multiple tabs

Posts: 59

Macro in ODS multiple tabs

data one two three;

set main;

if a=2 output one;

if a=3 output two;

if a=4 output three;


/*creates three data sets*/

%macro all_tabs(ds,name);

ods tagset (sheet interval='none' sheet_name = &name.....etc);

proc report data = &ds. NOWD; headskip split = '*' wrap nowd

col   etc..........; /*the column fields go here*/







ods tagset.excelXP close;

ods listing;


When I run the report to populated the 3 different tabs I get the error message LINE AND COLUMN CANNOT BE DETERMINED

Why am I getting this error and will I have to rename the &name portion since it is in quotes

Super User
Posts: 23,776

Re: Macro in ODS multiple tabs

Posted in reply to omega1983

ods tagset

should be odd tagset.excelxp perhaps?

Usually means there's an error in the code somewhere but hard to see without all the code.

If you're splitting the data by a variable, in a proc report you can do it in one step using the sheet_interval option and adding in a variable that has the name.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation