As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Excel
Microsoft Excel is a spreadsheet software used by analysts in many fields to view, maintain, and perform analysis on data. It has many business, statistical, and visualization capabilities. For more information, see Wikipedia and/or the Excel website.
Excel to SAS
Proc Import
SAS Libname Engine
ODBC OleDb
SAS to Excel
There are many ways to get SAS data into Excel. There are also a number of pros and cons with each approach. Below are a number of approaches, each with its pro and con and also examples for how to accomplish a specific task.
ODS ExcelXP Tagset
DDE
SAS Libname Engine
HTML ODBC OleDb XML
Proc Export
SAS Add-in for Microsoft Office [1]
VB Script An example of a SAS macro that writes and runs VB script to accomplish an export to Excel can be found here.
3rd Party Tools
This methodology encompasses a number of approaches using 3rd party tools under any of a number of frameworks (.NET/Java/Perl/Etc.). This approach is arguably the fastest and most flexible approach possible.[1]
Excel VBA macros
Excel has macro capabilities, not to be confused with SAS macros. They use the Visual Basic for Applications (VBA) language.
Here are some useful links to learn more:
- 100 useful macros, including how to enable and use them
- This site is great for other tips & tricks
- Comments in Excel macros start with a single quote (
'
) [2] - Use an Excel macro to write to a text file
- call VLOOKUP via an Excel macro
- Add radio buttons to a workbook
- Using named ranges (works in regular Excel formulas and macros)
- if/then/else statements
References
See also
- So, Your Data are in Excel!
- Creating Summary and Detail Sections in an Excel Worksheet Using the ExcelXP Tagset
- Creating an Excel report: A comparison of the different techniques
- Be Aware of Implicit Pass-Through
- PROC DATASETS can be case sensitive
- Tips:Datasets DELETE is Case Sensitive in Excel - but SQL DROP isn't
- Handling too-big Excel exports
- How To Produce Almost Perfect Excel® Output