Search
   >> Home >> Products >> Features >> Overview >> Excel® import/export

Excel® import and export

Stata for Windows, Mac, and Linux can directly import data and export data and results to Microsoft Excel files. Both Excel 1997/2003 (.xls) files and Excel 2007/2010/2013 (.xlsx) files are supported.

Above you see the preview tool, which you can use to see the data in an Excel worksheet before importing it and adjust options controlling how the data are imported.

import excel features

  • .xls and .xlsx support
  • import any worksheet from a workbook with multiple worksheets
  • import a custom cell range
  • treat first row of Excel data as Stata variable names
  • automatic conversion of Excel dates to Stata dates
  • automatic optimization of Stata storage types

export excel features

  • .xls and .xlsx support
  • replace an entire workbook
  • add a worksheet to an existing workbook
  • replace a single worksheet within an existing workbook
  • modify a subset of cells within an existing worksheet
  • save Stata variable names or variable labels to first row of worksheet
  • automatic conversion of Stata dates to Excel dates
  • export value labels or the underlying values
  • specify a custom missing-value code to use in worksheet

putexcel features

  • .xls and .xlsx support
  • export Stata returned results to a worksheet
  • export a Stata matrix in memory to a worksheet
  • export a custom numeric or string expression
  • replace an entire workbook
  • add a worksheet to an existing workbook
  • replace a single worksheet within an existing workbook
  • modify a subset of cells within an existing worksheet

produces this

Excel is a registered trademark of Microsoft.

Explore more data management features in Stata.

The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube