Skip to content

MlHsieh/easy-excel-plot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy MATLAB Plot with Excel

Version 1.1 is now out.

Plot data in a Excel file with MATLAB featuring:

  • Easy plotting by pasting data into Excel spreadsheet and clicking buttons
  • Linked brush tools between subplots

How to use

  1. Download the latest version from here.
  2. Install and setup Spreadsheet Link, see instructions below.
  3. Unzip the file and open Plot.xlsm.
  4. Follow the steps in Plot.xlsm.

Requirements

  1. OS: Windows.
  2. MATLAB:
    • Version: R2019b or newer.
    • Toolbox: Spreadsheet Link (for Microsoft Excel) Spreadsheet Link™ connects Microsoft® Excel® spreadsheet software with the MATLAB® workspace, enabling you to access the MATLAB environment from an Excel spreadsheet.
  3. Enable macros of Plot.xlsm in Excel. See instructions on Microsoft Support.

Install and setup Spreadsheet Link toolbox

  1. Follow the documentation to install Spreadsheet Link, if it is not installed.
  2. To enable the Spreadsheet Link add-in, start a Microsoft Excel session and follow the steps in the documentation.
  3. Open the Preferences dialog of Spreadsheet Link from MATLAB group on the top right of Home tab of Ribbon.

  1. Modify following settings:

    1. Change "MATLAB startup folder" to where PlotColumns.m is located.

    2. Enable "Treat missing/empty cells as NaN", as shown above.

    3. Optional settings:

      • Start MATLAB at Excel start up: Kind of annoying. I recommend disable this option. However, if this option is disabled, you must start MATLAB manually in Excel before plotting. MATLAB sessions not launched by Excel cannot be used to run macro with Spreadsheet Link. To start MATLAB manually: Click MATLAB group on the top right of the Home tab in your Excel worksheet and click Start MATLAB.

      • MATLAB program id: Specifies the MATLAB version to open when Spreadsheet Link starts in Microsoft Excel.

      • Use MATLAB desktop: Launch MATLAB with full gui or command line only, default is command line only.

      • Force use of MATLAB cell arrays with MLPutMatrix: DO NOT enable this option. It might cause some trouble if your data have no headings.

  2. You might need to update the references in Plot.xslm:

    1. Open Plot.xslm with Microsoft Excel
    2. open the Visual Basic® Editor window by clicking Visual Basic on the Developer tab. (If you do not find the Developer tab, see the Excel Help.)
    3. In the left pane, select a module for which you want to update a reference.
    4. From the main menu, select Tools > References.
    5. In the References dialog box, select the SpreadsheetLink check box.
    6. Click OK.