How can I debug my MATLAB code called from Excel using Spreadsheet Link?

3 views (last 30 days)
I have written a function in MATLAB which I am calling from Excel using Spreadsheet Link. I want to be able to debug my MATLAB code when I run the VBA code.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Feb 2018
Before you begin, I recommend closing all open MATLAB sessions. Spreadsheet Link will start an instance of MATLAB to use. Closing other MATLAB windows will make it easier for you to locate the MATLAB instance started by Excel.
  1. Open Excel
  2. Verify that you have the correct preferences set to be able to debug:
  3. Select "Preferences" from the MATLAB menu in the "Home" tab of the ribbon.
  4. Check "Use MATLAB desktop".
  5. Click "OK"
  6. Start MATLAB from Excel
  7. Select "Start MATLAB" from the MATLAB menu in the "Home" tab of the ribbon.
  8. You should see MATLAB start.
  9. In MATLAB, navigate to the folder where the function you want to debug is present.
  10. Put a break point in that function.
  11. In Excel, run the VBA code which calls the MATLAB function.

More Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Products


Release

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!