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

Good morning. I was wondering if anyone has come up with a solution to this problem? When I run the code below I get a "style" error when I try to open the file. When I look to the log file I get the following error. I've been going over this code for awhile but see nothing different from other code I run that seems to work. I would so appreciate any insights anyone might have regarding this problem.

Thank you very much.

XML ERROR in Style

REASON: Too many tags

FILE: C:\Users\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\IFESGBSK\MH3_assigned_special_housing 04MAY15.xls

GROUP: Styles

TAG: Style

ATTRIB: ID

VALUE: NoteContent11

title1;

title2;

title3;

footnote1;

odslisting close;

ods tagsets.ExcelXP file"F:\sasdata\attachments\FILENAME_&SYSDATE..xls"style=SASDocPrinter

      style(REPORT)={cellpadding=5 background=#D0C7A8}
      style(COLUMN)={font_face=Arial font_size=1 background=white}
      style(HEADER)={font_face=Arial font_size=1 font_weight=bold foreground=black background=#EBE8DA};

      column facility idno namel namef unitno cellno moveindt moveoutdt dsu asu imu bhu condition_code condition_type condition_description dd3need count;

      define facility / group 'Inst';
      define idno / 'SID';
      define namel / 'Last Name';
      define namef / 'First Name';
      define unitno / 'Unit';
      define cellno / 'Cell';
      define moveindt / 'In Date';
      define moveoutdt / 'Out Date';
      define dsu / 'DSU';
      define asu / 'ASU';
      define imu / 'IMU';
      define bhu / 'BHU';
      define condition_code / 'BHS Code';
      define condition_type / 'BHS Type';
      define condition_description / 'BHS Description';
      define dd3need / 'DD3';
      define count / 'Count' noprint;

    compute after facility / style=[font_face=Arial font_weight=bold font_size=1 foreground=black background=#DCD6BE];
        line count.sum comma5. ' Inmate(s)';
        line ' ';
    endcomp;

    compute after;
        line count.sum comma5. ' People';
    endcomp;

run;

ods tagsets.ExcelXP close;
ods listing;

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Your tagset version is way out of date. I suggest you download and try the current version 1.130 which is still compatible with SAS 9.1.3:

Base SAS: ODS MARKUP

View solution in original post

5 REPLIES 5
Reeza
Super User

Your code appears truncated - missing proc report line and end of ods tagsets call?

What version of tagsets are you using and what happens if you change the style from SASDocPrinter - Journal may be a good one.

Jeff_DOC
Pyrite | Level 9

Thank you very much for the response. I didn't realize I hadn't pasted in all the code. It is below. We are using tagset 9.1.3, v1.28 8/29/2005


title1;
title2;
title3;

footnote1;
ods listing close;
ods tagsets.ExcelXP file= "F:\sasdata\attachments\MH3_assigned_special_housing &SYSDATE..xls" style=Journal
                    options(sheet_interval = 'none'
                    sheet_name = 'MH3 SH Assignments'
                    autofit_height = 'yes'
                    suppress_bylines = 'yes'
                    gridlines = 'yes'
                    frozen_headers = '4'
                    absolute_column_width = '6, 7, 15, 15, 6, 8, 7, 7, 4, 4, 4, 4, 8, 8, 15, 8');

proc report data=mh13 nowd
      style(REPORT)={cellpadding=5 background=#D0C7A8}
      style(COLUMN)={font_face=Arial font_size=1 background=white}
      style(HEADER)={font_face=Arial font_size=1 font_weight=bold foreground=black background=#EBE8DA};

      column facility idno namel namef unitno cellno moveindt moveoutdt dsu asu imu bhu condition_code condition_type condition_description dd3need count;

      define facility / group 'Inst';
      define idno / 'SID';
      define namel / 'Last Name';
      define namef / 'First Name';
      define unitno / 'Unit';
      define cellno / 'Cell';
      define moveindt / 'In Date';
      define moveoutdt / 'Out Date';
      define dsu / 'DSU';
      define asu / 'ASU';
      define imu / 'IMU';
      define bhu / 'BHU';
      define condition_code / 'BHS Code';
      define condition_type / 'BHS Type';
      define condition_description / 'BHS Description';
      define dd3need / 'DD3';
      define count / 'Count' noprint;

    compute after facility / style=[font_face=Arial font_weight=bold font_size=1 foreground=black background=#DCD6BE];
        line count.sum comma5. ' Inmate(s)';
        line ' ';
    endcomp;

    compute after;
        line count.sum comma5. ' Inmate(s)';
    endcomp;

run;

ods tagsets.ExcelXP close;
ods listing;

SASKiwi
PROC Star

Your tagset version is way out of date. I suggest you download and try the current version 1.130 which is still compatible with SAS 9.1.3:

Base SAS: ODS MARKUP

Cynthia_sas
SAS Super FREQ

Hi:

  I'm just curious why you're not using the BREAK and RBREAK statements:

BREAK AFTER FACILITY/SUMMARIZE;

RBREAK AFTER/SUMMARIZE;

  You want to summarize the COUNT column, but not show the COUNT column on the report???

cynthia

Jeff_DOC
Pyrite | Level 9

The code is a bit dated and created by a different person. The summarized total should appear but not the actual count column. I would own most error of this nature due to my lack of SAS knowledge. Sorry.

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!

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
  • 5 replies
  • 1368 views
  • 3 likes
  • 4 in conversation