Programming the statistical procedures from SAS

Proc tabulate - naming the output table...

Reply
Occasional Contributor
Posts: 8

Proc tabulate - naming the output table...

Hi there,

I'm new to SAS and need to create many tables which are a cross tabulated format.

These outputs will then be exported and referenced by excel which will generate charts and conditional formats.

The trouble is that I don't seem to be able to name the output table with the proc tabulate - they all get called summary table1 etc.  When there will be so many tables, how can I then know which to export and save as what...

Suggestions?

I've tried multiple google searches and not returned much, as well as looked at these forums but not found this specific answer.  The questions to date are about naming the variables - not the table.

If there is documentation that directs on this, please could you tell me the name of the manuals to look at.

Cheers,

JJ

Grand Advisor
Posts: 9,451

Re: Proc tabulate - naming the output table...

Suggest post it at ODS and Report ,since it is a ODS problem.

what kind of way are you using to generate that excel ?  ods tagset.excelxp ?  there is an option    OPTION(sheet_name='xxxx') can do that.

Esteemed Advisor
Esteemed Advisor
Posts: 6,977

Re: Proc tabulate - naming the output table...

Well, you could try out proc document: http://www.sas.com/storefront/aux/en/spprocdocumentexample/63031_excerpt.pdf

You can modify parts of the output.  However I would suggest that your problem is because you are using Excel.  Make a choice, do you want SAS output or Excel output (note recommend not using Excel!).   If you want to create things and such like in Excel, then export your data to CSV, then in Excel use VBA to import and process the data, you then have full functionality of Excel.

Occasional Contributor
Posts: 8

Re: Proc tabulate - naming the output table...

My internal customers don't have SAS - it needs to be put into excel for them.  SAS has condensed, filtered and joined all the data but the outputs need to be in excel.  The original dataset has millions and millions of datapoints, but with SAS I can make that manageable enough so that it's still flexible enough to show the detail to the stakeholders.

Even if I could show them SAS, then the output in EG is called Summary Table1 which is not clear enough...

Thanks for the pointer to the docs though

Esteemed Advisor
Esteemed Advisor
Posts: 6,977

Re: Proc tabulate - naming the output table...

Ah, so it is for a presentation.  Display the outputs as slide shows or similar (PDF etc), you can have titles, notes, and other things.

When I talk about exporting the data as CSV from SAS, I mean the output from tabulate, which can save a dataset and then you can export that.

Grand Advisor
Posts: 16,889

Re: Proc tabulate - naming the output table...

Or use Tagsets.ExcelXP to create an XML file with all the cross tabs.  Not Excel, but Excel will open the file.

If you have SAS 9.4+ you can try ODS EXCEL

Occasional Contributor
Posts: 8

Re: Proc tabulate - naming the output table...

Hi,

FYI I got my answer having posted in ODS as suggested.. For those interested.

https://communities.sas.com/thread/86504

Thanks for taking the time to help me out.

Ask a Question
Discussion stats
  • 6 replies
  • 298 views
  • 0 likes
  • 4 in conversation