Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Ways to Import Spreadsheets

Import Data from Spreadsheets

You can import data from spreadsheet files into MATLAB® interactively, using the Import Tool, or programmatically, using an import function.

This table compares the primary import options for spreadsheet files.

Import Option

Description

For More Information, See...

Import Tool

Import a worksheet or range to column vectors, a matrix, a cell array, or a table. You can generate code to repeat the operation on multiple similar files.

Select Spreadsheet Data Using Import Tool

readtable

Import a worksheet or range to a table.

Import a Worksheet or Range

xlsread

Import a worksheet or range to numeric and cell arrays.

importdata

Import one or more worksheets in a file to a structure array.

Import All Worksheets from a File

Some import options require that your system includes Excel® for Windows®. For more information, see System Requirements for Importing Spreadsheets.

Paste Data from Clipboard

Paste data from the clipboard into MATLAB using one of the following methods:

  • On the Workspace browser title bar, click , and then select Paste.

  • Open an existing variable in the Variables editor, right-click, and then select Paste Excel Data.

  • Call uiimport -pastespecial.

Was this topic helpful?