How can I use activeX to access Microsoft Excel equation editor from matlab
Show older comments
2 Comments
Guillaume
on 22 Mar 2020
First, you should explain why you want to do that as it's a fairly odd thing to want to do.
Secondly, note that the equation editor was removed from all versions of Office in 2018. What the equation tool now does is insert a textbox shape with the appropriate font into excel. While it can probably be automated from matlab it's not going to be simple.
brolaja
on 22 Mar 2020
Accepted Answer
More Answers (1)
Image Analyst
on 22 Mar 2020
0 votes
Usually what I do is to start recording a macro in Excel. Then do what I want to do and then stop recording. Then look in the macro editor to see what commands it did. Then it's just a little bit of translation to go from the Excel VBA code to MATLAB. That's basically how I built my ActiveX Excel_utils class (attached).
So you'd basically do that to find out how the editor gets launched. But then the hard part is how to figure out how to bring that equation back into MATLAB. I have no idea, but good luck though. I agree with Guillaume that it won't be simple. Why can't you just have them type in their equation into MATLAB in a non-wysiwig form?
3 Comments
brolaja
on 22 Mar 2020
Guillaume
on 22 Mar 2020
"Usually what I do is to start recording a macro in Excel."
That's what I did before writing my comment to figure out that what excel does is insert a textbox shape. Unfortunately, the actual creation of the formula is not recorded as part of the macro.
brolaja
on 22 Mar 2020
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!