Is there a way to import SAS7BDAT
files to Stata without SAS?
usesas
requires SAS.
Asked
Active
Viewed 8,706 times
1
-
1Not sure why this is downvoted. I know someone have made a SAS table viewer in PowerShell, guess that could be rewritten to export to CSV instead. – Stig Eide Nov 04 '14 at 11:39
-
1what code do you want? if i knew the code i wouldn't ask the question. i did a research- that's why i wrote about usesas! it was a solution that did not work for me. – Tabi Nov 04 '14 at 13:03
-
I am guessing at why you were downvoted; I have no way of knowing 5 individual reasons from 5 people (to date). Please don't shoot at the journalist. The larger point is that this is a programming forum, so many members feel that questions without code don't belong here at all, as they are about how to use software, not how to write programs. – Nick Cox Nov 04 '14 at 14:13
3 Answers
6
Answering myself:
You can import SAS file to R using sas7bdat
library, and from R import to Stata.
import to R:
install.packages("sas7bdat")
library("sas7bdat")
data = read.sas7bdat("file_name.sas7bdat")
save dta file:
library(foreign)
write.dta(data, "stata_file_name.dta")

Tabi
- 162
- 2
- 11
0
0
SAS Universal Viewer (freely available from SAS website) allows exporting to csv files if I'm not mistaken. Then importing the csv file from Stata should be straightforward enough.

Dominic Comtois
- 10,230
- 1
- 39
- 61