help: xls2stata dialog:

Title

xls2stata: Import Excel Files into Stata

Syntax

odbc load, dsn("Excel Files; DBQ=(path_of_excel_file_name)") table(sheet_name$)

Description

xls2stata Is a simple dialog box imports EXCEL files into STATA , the user must specify the workbook excel file name, and select the sheet name which will be converted and imported into stata.

Examples

clear all

db xls2stata

odbc load, dsn("Excel Files; DBQ=C:\xls2stata.xls") table(Sheet1$)

odbc load, dsn("Excel Files; DBQ=C:\xls2stata.xls") table(Sheet1$) clear

odbc load, dsn("Excel Files; DBQ=C:\xls2stata.xls") table(panel$) clear

odbc load, dsn("Excel Files; DBQ=C:\xls2stata.xls") table(theil1$) clear

odbc load, dsn("Excel Files; DBQ=C:\xls2stata.xls") table(theil2$) clear

- Note that variables names are imported as typed either small or capital letters

- Dont forget to put a sign dollar $ at the end of sheet name

Author

Emad Abd Elmessih Shehata
Assistant Professor
Agricultural Research Center - Agricultural Economics Research Institute - Egypt
Email: emadstat@hotmail.com
WebPage: http://emadstat.110mb.com/stata.htm
WebPage at IDEAS: http://ideas.repec.org/f/psh494.html
WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm

xls2stata Citation

Shehata, Emad Abd Elmessih (2012)

XLS2STATA: "Stata Module Dialog Box to Import Excel Files into Stata"