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!