Clear Filters
Clear Filters

xlsread problems with macro

5 views (last 30 days)
Dries
Dries on 18 Jul 2017
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

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!