Stata import excel / export excel Import and Export Excel Files Manual

Stata documentation for import excel and export excel, covering syntax, options, examples, and Excel file handling on Windows, Mac, and Linux.


Stata import excel / export excel Import and Export Excel Files Manual - cover page
Brand
Stata
Category
Other software
Document type
User Manual
Language
English
Pages
7
File format
PDF
File size
138 KB
Published
09 November, 2026
Updated
09 November, 2026
MD5 checksum
10089843F7D1ACC00E2E097FC7151125

About this manual

The document describes Stata's import excel and export excel commands for loading Excel workbooks into Stata and saving data in memory to Excel files. It covers both Excel 1997/2003 (.xls) and Excel 2007/2010 (.xlsx) files and notes support on Windows, Mac, and Linux.

It presents quick-start examples, menu paths, syntax, and options for both commands, including worksheet and cell-range selection, first-row handling, replacement behavior, and locale settings. It also covers remarks and examples, Excel date and mixed-data-type notes, stored results from describe, and references.

What's inside

  • Description
  • Quick start
  • Menu
  • Syntax
  • Options for import excel
  • Options for export excel
  • Remarks and examples
  • Stored results
  • References
  • Also see

Specifications

Supported Excel formatsExcel 1997/2003 (.xls) and Excel 2007/2010 (.xlsx)
Supported operating systemsWindows, Mac, and Linux
.xlsx import size limit40 MB
Default export file extension.xls
Default localeUTF-8
.xls worksheet size limit65,536 rows by 256 columns
.xlsx worksheet size limit1,048,576 rows by 16,384 columns

Frequently asked questions

How can I check the sheets and ranges in an Excel file before importing it?

Use import excel filename, describe; it lists the available sheets and ranges in the workbook.

Which Excel formats can import excel and export excel handle?

They can import, export, and describe Excel 1997/2003 (.xls) and Excel 2007/2010 (.xlsx) files.

What is the default file extension used by export excel when none is specified?

.xls.

Are import excel and export excel supported on Windows, Mac, and Linux?

Yes; the document states they are supported on Windows, Mac, and Linux.

Download PDF (138 KB)

More Stata Manuals


View all Stata manuals →