- This error may occur if a file with macros is saved in Excel 2003 and then used with Excel 2007 or Excel 2010. If this is the case, try opening the file with Excel 2007 or 2010 and re-saving it.
- This could be due to a limitation on the amount of data you can pass through the COM object to Excel.As a workaround you can try to write data into Excel in blocks until all of the data has been written to the file.
Matlab Excel COM API using actxserver causing "Invoke Error, Dispatch Exception: Type mismatch."
7 次查看(过去 30 天)
显示 更早的评论
Hello. I am trying to put a matrix of 605601 x 1055 double into excel using the COM API using this line:
eSh.Range('A9:ANO605609').Value = t;
where, eSh is the Excel Workbook Activesheet, and t is the matrix I'm trying to put into Excel.
However, the command above give me the error: "Invoke Error, Dispatch Exception: Type mismatch."
any comments or suggestions are appreciated.
Thanks.
0 个评论
回答(1 个)
Sangeetha Jayaprakash
2016-11-1
You seem to be encountering this error when you are trying to write data to an Excel file using "actxserver" from MATLAB. Some possible scenarios in which this error can occur are:
另请参阅
类别
在 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!