BookmarkSubscribeRSS Feed
omega1983
Calcite | Level 5

data one two three;

set main;

if a=2 output one;

if a=3 output two;

if a=4 output three;

run;

/*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*/

run;

%mend;

%all_tabs(one,"0-30");

%all_tabs(one,"31-60");

%all_tabs(one,"61-90");

%insertCode(report_name.sas);

ods tagset.excelXP close;

ods listing;

quit;

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

1 REPLY 1
Reeza
Super User

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.

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
  • 1 reply
  • 691 views
  • 0 likes
  • 2 in conversation