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 ?

3 visualizzazioni (ultimi 30 giorni)
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 Commento
dpb
dpb il 6 Giu 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.

Accedi per commentare.

Risposte (1)

Jon
Jon il 6 Giu 2022
Modificato: Jon il 6 Giu 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

Categorie

Scopri di più su Data Import from MATLAB in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by