LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 18 Jul 2002 09:56:51 -0700
Reply-To:     Thomas.Hauge@EDDIEBAUER.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Thomas Hauge <Thomas.Hauge@EDDIEBAUER.COM>
Subject:      Proc Tabulate Formatting
Content-type: text/plain; charset="us-ascii"

Hello everyone,

I have a couple of proc tabulate formatting questions. For the sake of differing e-mail formats and [hopefully] clarity, I've greatly simplified and <snipped> the resulting table:

Inventory Catalog Internet Non-Buyers Only Only CLASS SUBCLASS CU 0 256,955 196,932 0 SUBCLASS TOTAL 0 256,955 196,932 0

1N SUBCLASS Dual Channel 30,670 3,844 5,858 18,963 Catalog Only 423,863 69,764 10,628 339,413 Internet Only 326,778 10,985 50,071 260,461 SUBCLASS TOTAL 781,311 84,593 66,557 618,837

1E SUBCLASS Dual Channel ....

1) On the far left is are "classes" CU, and 1N. The CU (current customers) bucket will always have a value of 0 for the "Inventory", and Proc Tabulate seems to compress the SUBCLASS categories giving me only a Total line. What I'd like is to somehow still create the "subclasses" anyway -- with, for example, Dual Channel appearing with "0" for a value, etc. I cannot seem to make this happen. Is it possible?

2) When I try and open the resulting HTML file in Excel, it comes out great, except for certain "cells" which end up as merged cells. For instance, the values associated with the first line of each SUBCLASS, Dual Channel, are in merged cells, appearing right above the next lower cell, but really referenced to 2 cells above. For futher manipulation in Excel, I must un-merge each one, then cut/paste the value down one cell, since after un-merging the cells, the value gets assigned to the top of the two cells. Can anything be done about this?

For reference, here is the full tabulate procedure I used to create the HTML:

options nocenter formchar='82838485868788898A8B8C'x NODATE NONUMBER PAGESIZE=200;

%tab2htm(capture=on, runmode=b); proc tabulate data=total2 missing order=data; class statuscd invchanl channel; var gdemand hh_key; table statuscd*(invchanl ALL='SUBCLASS TOTAL') ALL='TOTAL INVENTORY', hh_key=' '*(n='Inventory'*F=comma10.) channel='#BUYING HOUSEHOLDS'*(n=' '*F=comma10.) gdemand=' '*(n='TOTAL BUYING HOUSEHOLDS'*F=comma10.) channel='BUYING HOUSEHOLDS DEMAND'* gdemand=' '*(SUM=' '*F=dollar12.) gdemand=' '*(SUM='TOTAL BUYING HOUSEHOLDS DEMAND'*F=dollar12.) / BOX="Customer File - &season"; label statuscd='CLASS' invchanl='SUBCLASS'; format channel $chanfmt. invchanl $invfmt.; title1 "CUSTOMER FILE - &season Buyers"; run;

%tab2htm(capture=off, htmlfile=&season.CustomerFile.html, twidth=50, center=y, talign=left, tsize=+2, tface='Arial' septype=none);


Thomas Hauge Market Planning Consultant

Back to: Top of message | Previous page | Main SAS-L page