Main Content

Copy and Paste Lookup Table Data from Excel

This example shows how to copy data from an Excel® spreadsheet or any spreadsheet application into a lookup table.

  1. Add a 2-D Lookup Table block to a model.

  2. Open the Lookup Table Editor. For example, open the block dialog and click Edit table and breakpoints.

  3. Create or open an existing Excel spreadsheet, for example, an Excel spreadsheet that contains this data.

  4. Copy and paste the contents of the Excel spreadsheet into the lookup table spreadsheet.

    Lookup table with pasted 3-by-3 data.

  5. Notice that the pasted elements in the lookup table spreadsheet have a yellow border. This yellow border indicates that the data has not yet been saved. To save the data to the data source, click Apply. In this example, the data source is the 2-D Lookup Table block.

  6. At the bottom of the Lookup Table Editor is a table of sources for the data.

    Lookup Table Editor with data source table highlighted

    To display and hide this table, click Data Source in the toolstrip.

  7. To get the data from the data source into the Lookup Table Editor, click Reload. If you do not click Apply before clicking Reload, the editor discards the spreadsheet before loading the data from the data source.

  8. To save the data from Lookup Table Editor spreadsheet to the data source, click Apply.

Related Topics