How do I get the corresponding output in VBA using deploytool Excel Add,when I set the output as an array of cells or an array of strings in matlab, ?

조회 수: 2 (최근 30일)
I have created Microsoft Excel add-ins from MATLAB® functions.
But cell arrays or string arrays in MATLAB cannot be grabbed in Excel VBA.
What data type should I convert them to in my MATLAB program? How can I make cell arrays or string arrays the same as double types that can be obtained as arrays in VBA?
  댓글 수: 2
Priyanka Kondapalli
Priyanka Kondapalli 2021년 12월 15일
Hello,
Here is an example of getting any MATLAB variable type into VBA using "MLGetVar" function in Spreadsheet Link:
Sub GetVar()
Dim Data As Variant
MLGetVar "A", Data
MsgBox "here"
End Sub
Also, if Data is not declared, it will default to the Variant type.
For futher details on Function "MLGetVar", refer to the below link. Hope this resolves the issue.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by