Call/Execute/Run VBA Macro within Google sheets from/using Matlab

7 Ansichten (letzte 30 Tage)
Kamran Turkoglu
Kamran Turkoglu am 29 Sep. 2021
Hello everyone,
I am after solving a global optimization problem (using matlab script, and matlab solvers) where I do have parameters (and an internal macro VBA script) that lives and resides in google sheet (*.gs file). My problem is:
  1. I would like to define my matlab parameters
  2. Push/write them online to google sheet
  3. Run internal google sheet macro (VBA, *.gs script) using matlab commands,
  4. After google sheet macro finishes its calculations, read specific cell in matlab
  5. And optimize those parameters in matlab by keeping track of cost function, constraints, ...etc, and repeat the process.
I cannnot import google sheet to a local Excel copy because (since google sheet uses *.gs script) it does not import it. So saving a local *xls copy does not work bby any means. My only chance is to read the whole VBA code,spend almost a 1 month to re-write it in matlab, then spend another couple of weeks to debug and retest it in Matlab, and I simply do not have neither time nor the effort to do it.
Simply put, my goal is, define parameters in matlab, write them to a google sheet online, initiate a coogle sheet RUN_MACRO command from matlab, let google sheet do its own internal calculations, read the result, create cost function, and rinse-repeat to optimize parameters, till objective is achieved.
I truly and sincerely appreciate any help in this regard,
Sincerely

Antworten (0)

Kategorien

Mehr zu MATLAB Report Generator finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by