Open an xls file
2 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I'm trying to open an excel file with actxserver function in Matlab R2019a.
The command line written are:
A = actxserver('Excel.Application');
B= A.workbooks.Open(strFilePath);
We are able to read the Excel file only in some PC, not in all.
The Open function is suggested by Matlab, but it doesn't work. What could be the problem?
回答(1 个)
Shashank Arya
2020-12-17
Hi,
From my understanding, you want to open an excel file using the actxserver function, which works in specific machines but not all.
I am assuming, this does not works for you in PC, but not in MAC.
MATLAB does not support COM functions on MAC since COM is Microsoft technology, and available only on Windows.
An easier alternative for you would be to use ”readtable” function available in MATLAB, which creates a table by reading column-oriented data from a file.
Refer to the below link to access readtable documentation
Thanks and Regards,
Shashank Arya
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!