Back to main page

So, you use WinBUGS a lot? Want more?
Patrick Blisle
Division of Clinical Epidemiology
McGill University Health Center
Montreal, Quebec CANADA

Last modification: 21 sep 2017

Version 1.2 (September 2017)
Converting Excel codebooks to SAS code
[ ExcelCodebook2SasCode is a program to convert Excel codebook files to SAS code. ]


How to use ExcelCodebook2SasCode

The executable file is saved to c:\Program Files\Bayesian Software\ExcelCodebook2SasCode\ExcelCodebook2SasCode.exe by default. Double-click that executable file to run ExcelCodebook2SasCode.

Short instructions follow the screen capture of ExcelCodebook2SasCode's form below.

  1. Load your Excel codebook file by browsing to it (after clicking Browse button) or drag and drop it into the Excel Codebook label found in the top left corner. This codebook file must be built along the lines in Section 3 of How to write a good codebook.
  2. Select the appropriate variable and value labels worksheets through the drop down menu lists.
  3. Click the Generate code button to generate corresponding SAS code.
  4. Copy and paste the code that is generated into your SAS program(s).


ExcelCodebook2SasCode is a free executable (.exe) file. Download it now.

Installation instructions

Unzip the file, double-click the file ExcelCodebook2SasCode.msi and follow the instructions when prompted.