Help using Base SAS procedures

Question on   in table

Reply
Frequent Contributor
Posts: 117

Question on   in table

Hi All,

I keep getting the following in my tables in sas (in the autofilter):

http://i.imgur.com/r5tjKcr.png

I have a total at the end of the table which is causing this - any way to remove/hide it?

Super Contributor
Posts: 543

Re: Question on   in table

could you provide a snippet of your code.

I am assuming this is a proc report?

Frequent Contributor
Posts: 117

Re: Question on   in table

Posted in reply to AncaTilea

Actually, I am using proc print:

proc print data=testdata noobs label;

   var Org Unit N;

   where Org="Org1";

   sum N;

   label N="Number of x";

   label Org="Organization";

   label unit="Unit";

run

Super User
Posts: 19,805

Re: Question on   in table

What do you mean in autofilter? Are you using EG?

Frequent Contributor
Posts: 117

Re: Question on   in table

I am using tagsets, so the ables have an autofilter at the top:

style=sasweb

options(toc_background="white"

           toc_expand="yes"

            toc_print="yes"

autofilter="yes"

filter_cols="1,2,3"

Super Contributor
Posts: 543

Re: Question on   in table

What happens when you run this code:

ods tagsets.excelxp file = "\\your_path\to_test.xls" style = sasweb

    options(autofilter="yes" );

    proc print data=sashelp.class noobs label;

       var name height;

       where age=12;

       sum age;

       label age="Age";

    run;

ods tagsets.excelxp close;

You note I removed the toc_...options because SAS said unrecognized option...

Does this work?

PS: change the path where the file is saved

Frequent Contributor
Posts: 117

Re: Question on   in table

Posted in reply to AncaTilea

Nop, same "&nbsp" shows up in the filter. :smileycry:

Super User
Posts: 19,805

Re: Question on   in table

What version of Excel are you using?

Post your full code and log or a smaller sample if it generates the problem.

Frequent Contributor
Posts: 117

Re: Question on   in table

I am not using excel - the output is done in HTML file.

Super User
Posts: 19,805

Re: Question on   in table

You need to post your full code and log of what you're doing. We're really just trying to guess without it and its a waste of time for us and yourself.

Super Contributor
Posts: 543

Re: Question on   in table

Hi Vomer,

Would you please post the code?

Thanks.

Anca.

Frequent Contributor
Posts: 117

Re: Question on   in table

Posted in reply to AncaTilea

Sure:

ods tagsets.tableeditor file="file1.html"

path="PATH\HERE" (url=none)

style=styles.button

options(toc_background="white"

           toc_expand="yes"

            toc_print="yes"

autofilter="yes"

filter_cols="1,2,3"

AUTOFILTER_ENDCOL="3"

frozen_headers="yes"

pageheight="400"

autofilter_width="15em"

);

title1 'Number of Clients';

proc print data=testdata noobs label;

   var Org Unit N;

   where Org="Org1";

   sum N;

   label N="Number of x";

   label Org="Organization";

   label unit="Unit";

run;

ods tagsets.tableeditor close;

Super Contributor
Posts: 543

Re: Question on   in table

So, in the SAS Output wahtever you are trying to print will look (more or less) like this:

AgeHeight
12  57.3
12  59.8
12  59.0
12  56.3
12  64.8
   ======
    297.2

The 'problem' is the line ===== which translate to a non blank space (nbsp) (I may over-reaching here)...but when you try to filter your data, you also have this option...the ====

So, I need to read/google more to figure out how to 'restrict' it from showing in your html...

more later.

Frequent Contributor
Posts: 117

Re: Question on   in table

Posted in reply to AncaTilea

Hi Anca, Yes I think it is that extra line that is causing the "space" to appear. Hope you can find a solution - I could not find anything so far Smiley Sad

Super Contributor
Posts: 543

Re: Question on   in table

Hi,

would you please try this addition to your existing code:

ods tagsets.tableeditor file="file1.html" event = cell_is_empty

path="\\yourPath..." (url=none)

    style=styles.button

    options(toc_background="white"

....rest of code....

I think it may work!

Smiley Happy

Actually it will only work if you are summing over all the variables you are printing...

Message was edited by: Anca Tilea

Ask a Question
Discussion stats
  • 19 replies
  • 487 views
  • 7 likes
  • 3 in conversation