- Open Excel
- Verify that you have the correct preferences set to be able to debug:
- Select "Preferences" from the MATLAB menu in the "Home" tab of the ribbon.
- Check "Use MATLAB desktop".
- Click "OK"
- Start MATLAB from Excel
- Select "Start MATLAB" from the MATLAB menu in the "Home" tab of the ribbon.
- You should see MATLAB start.
- In MATLAB, navigate to the folder where the function you want to debug is present.
- Put a break point in that function.
- In Excel, run the VBA code which calls the MATLAB function.
How can I debug my MATLAB code called from Excel using Spreadsheet Link?
3 views (last 30 days)
Show older comments
MathWorks Support Team
on 15 Jun 2017
Answered: MathWorks Support Team
on 7 Jul 2017
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
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!