Viable format that would satisfy the requirements for transfering from Matlab to Excel.
1 次查看(过去 30 天)
显示 更早的评论
I am dealing with a 4x4x4 matrix. It is easier to sent the results to Excel. I have the format as a "double" but Matlab does not like that when sending to Excel. Is there a viable format that would satisfy the requirements for transfering from Matlab to Excel.
Program:
exl = actxserver('excel.application');
exlWkbk = exl.Workbooks;
exlFile = exlWkbk.Open(['C:\MATLAB7\work\Analysis_Excel.xlsm']);
exlSheet1 = exlFile.Sheets.Item('Sheet1');
exl.visible = true;
for i=1:4
for j=1:4
for k=1:4
Affinity(i,j,k)=double(subs(Affinity0(i,j,k),{r,h},{7000,0.7071}))
end
end
end
exlSheet1.Range(['C' num2str(3)]).value=Affinity(1,1,1)
exlSheet1.Range(['D' num2str(3)]).value=Affinity(1,1,2)
...
Error code:
Warning: ActiveX - invalid argument type or value.
> In Analysis_Excel>Evaluate at 82
exlSheet1 =
Interface.Microsoft_Excel_12.0_Object_Library._Worksheet
What type or value do they mean? Format other than double?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!