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
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 Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!