xlsread problems with macro
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to read in a bunch of excel files from a server. They all have a macro.
When I read in the file, excel shows a pop up screen saying the following:
'Unable to read myFileName sheet. PLease make sure, myFileName.xls is in the -xlstart- subdirectory of the -office- program.'
If I then select the ok button, Matlab reads in the file anyway so that is not an issue. But because I have several 100 of files I don't want to be doing this all the time.
I tried the following fixes: - setup a com link using the actxserver and then disable the warning messages
if true
% Excel = actxserver('Excel.Application');
% Excel.DisplayAlerts = false; % Suppress Excel warning popups, like for overwriting a file
end
- Use the basic function in xlsread but then it gives the following error: 'Error using xlsread (line 247) File contains unexpected record length. Try saving as Excel 98.'
Both didn't work. I think the reason is that the files contains a macro because when I save the file locally without the macro it works.
Does anybody have an idea how to fix this?
Thanks!!!
Kind regards,
Dries
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!