필터 지우기
필터 지우기

xlsread problems with macro

조회 수: 5 (최근 30일)
Dries
Dries 2017년 7월 18일
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개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by