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, ?

3 次查看(过去 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