SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

output excel as an Excel table (ctrl+t)?

Reply
Regular Contributor
Posts: 196

output excel as an Excel table (ctrl+t)?

Hi,
Is it possible to output an excel file with the data formatted as a table (ctrl+t)?
If so, how can this be done?
Thank you.

Esteemed Advisor
Posts: 6,735

Re: output excel as an Excel table (ctrl+t)?

For Excel support, consult a Microsoft-oriented forum.

Or do you need help in exporting SAS data to Excel? In that case, use proc export.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Regular Contributor
Posts: 196

Re: output excel as an Excel table (ctrl+t)?

What I'm trying to accomplish is exporting to excel and have the data automatically formatted as a Table.

So, instead of exporting the data, opening it in excel, and then formatting it as a Table (which can be accomplished by highlighting the data and pressing ctrl+t), I would like the table to be already formatted as a Table when it's exported by SAS.

Grand Advisor
Posts: 10,258

Re: output excel as an Excel table (ctrl+t)?

Once again for the Excel-centric: How and what are you currently moving the SAS results to Excel? If using proc export to send a dataset likely there is no solution as that procedure is intended for data interchange files and contains no formatting information at all on purpose.

 

Procedure output may be another matter.

 

Have you tried using ODS EXCELXP ? That creates xml that Excel can read and I would expect it bring it results as tablish of sorts.

 

Be aware that Excel will reformat things and you may have to spend time forcing values with leading zeroes to appear correctly.

Esteemed Advisor
Posts: 6,735

Re: output excel as an Excel table (ctrl+t)?

Using ods tagsets.excelxp or ods excel (if you run SAS 9.4) allows you to create formatted spreadsheets.

But be aware that it will take more work than just hitting ctrl-t.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 4 replies
  • 189 views
  • 0 likes
  • 3 in conversation