BookmarkSubscribeRSS Feed
vomer
Obsidian | Level 7

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?

19 REPLIES 19
AncaTilea
Pyrite | Level 9

could you provide a snippet of your code.

I am assuming this is a proc report?

vomer
Obsidian | Level 7

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

Reeza
Super User

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

vomer
Obsidian | Level 7

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"

AncaTilea
Pyrite | Level 9

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

vomer
Obsidian | Level 7

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

Reeza
Super User

What version of Excel are you using?

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

vomer
Obsidian | Level 7

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

Reeza
Super User

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.

AncaTilea
Pyrite | Level 9

Hi Vomer,

Would you please post the code?

Thanks.

Anca.

vomer
Obsidian | Level 7

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;

AncaTilea
Pyrite | Level 9

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.

vomer
Obsidian | Level 7

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

AncaTilea
Pyrite | Level 9

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

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 19 replies
  • 1403 views
  • 7 likes
  • 3 in conversation