How to open SAS files using Excel?

31,106

Solution 1

I help develop the Colectica for Excel addin, which opens SAS data files in Excel. No SAS software or ODBC configurations are required. The addin directly reads the SAS file and then inserts the data and metadata into your worksheet.

  • Imports SAS .sas7bdat data and column names
  • Imports SAS .sas7bcat formats and value labels when avalaible

The Excel addin is downloadable from http://www.colectica.com/software/colecticaforexcel

Documentation is available in the user manual.

Solution 2

You could use SAS add in for Microsoft office to open the SAS dataset in Excel. Not sure if it is free though.

As Reese suggested you can use - SAS Universal Viewer , its free!!

Here is the link :-

https://support.sas.com/downloads/browse.htm?fil=&cat=74

Or you can download SAS University Edition, which is also free, it is more than just a viewer, you can write and execute programs in here.

http://www.sas.com/en_us/software/university-edition/download-software.html

Solution 3

Here a quick-and-dirty python five-liner to convert a .xpt file to .csv

import pandas as pd
FILE_PATH = "(directory containing file)"
FILE = "ABC"  # filename itself (without suffix)

# Note: might need to substitute the column name of the index (in quotes) for "None" here

df = pd.read_sas(FILE_PATH + FILE + '.XPT', index=None)

df.to_csv(FILE_PATH + FILE + '.csv')

Hopefully this might help someone

Share:
31,106
Shashaank Sivakumar
Author by

Shashaank Sivakumar

Updated on August 22, 2021

Comments

  • Shashaank Sivakumar
    Shashaank Sivakumar over 2 years

    I have a set of SAS data sets and I want to open it using Excel or R. I don't have a SAS software with me so i can't use the export option in it. Is there any converter that converts from SAS7BDAT to excel?

    Thanks