How do I send data to excel formula input cell , and receive the output cell data back to Matlab command window. Any examples please help thanks ?

1 vue (au cours des 30 derniers jours)
How do I send data to excel formula input cell , and receive the output cell data back to Matlab command window. Any examples please help thaks.
  1 commentaire
dpb
dpb le 6 Juin 2022
writetable and readtable are the currently in vogue high-level routines -- there's any number of examples in the doc and Answers using Excel extensively for reference.
You can poke at Excel innards with ActiveX and do virtually anything that can be done -- this entails using the native Excel object model and can be very frustrating. There are a lot of examples at Answers that use it as well plus some submission on FEX that provide some user interfaces for various tasks.
I'll turn the Q? around -- give us some concrete examples of what you're trying to accomplish.

Connectez-vous pour commenter.

Réponses (1)

Jon
Jon le 6 Juin 2022
Modifié(e) : Jon le 6 Juin 2022
Assuming it is really required that you go back and forth between Excel and MATLAB you can use MATLAB's spreadsheet link product https://www.mathworks.com/products/spreadsheet-link.html
Often however as @dpb points out you can just read the data in from the spreadsheet perform what ever math you want with this data and then finally write it back to some other cells, using readtable, writetable (or even readmatrix, writematrix).
The former approach (using Spreadsheet Link) is probably only needed if you have users that work exclusively with Excel (not MATLAB) and you want to provide some nice functionality in the background using the power of MATLAB

Catégories

En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by