Creating a data import macro to Excel in Matlab using an activex link to Excel
1 次查看(过去 30 天)
显示 更早的评论
Greetings! I am having difficulties running an automated script that makes Excel import data from an external source using an activex connection from Matlab. Assuming Excel is my activex object, the following should (I think) add the data from my .dat document in cell A1
% Get a handle to the active sheet
Activesheet = Excel.Activesheet;
Excel.ActiveSheet.Connection.Add(Excel.Activesheet.get('Range', 'A1'), 'TEXT','C:\Users\isc.ISC1\Desktop\Matlab Programs\GTstrudl Output Postprocessing\WD-ULS-PUNCHING-JACKET-WEAK-LRFD.DAT')
The code gives me the error message: "No appropriate method, property, or field Activesheet for class handle.handle."
Any help is welcome!
Thanks in advance, Poul Reitzel
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!