Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Disable Excel Macro
Date: Tue, 6 Jan 2009 10:14:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <gjvata$otq$1@fred.mathworks.com>
References: <gjv9nq$1v8$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1231236842 25530 172.30.248.35 (6 Jan 2009 10:14:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 Jan 2009 10:14:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869539
Xref: news.mathworks.com comp.soft-sys.matlab:509985


"Alex Thiele" <bert1234@yahoo.com> wrote in message <gjv9nq$1v8$1@fred.mathworks.com>...
> Hi all,
> 
> I have a script which interogates hundreds of .XLS files using XLSREAD. However, these XLS files all have macros which display a pop up window if macros are enabled.
> 
> This means that I have to sit at the computer closing all the pop up windows as they appear, rather than just being able to set the program off and walk away.
> 
> Does anyone know of a way in which I can disable these macros from my MATLAB script, or close the pop up windows as they appear?
> 
> Many thanks,
> 
> Alex

can you use 'basic' mode: (quote from help xlsread)

    [NUMERIC,TXT,RAW]=XLSREAD(FILE,SHEET,RANGE,'basic') reads an XLS file as
    above, using basic input mode. This is the mode used on UNIX platforms
    as well as on Windows when Excel is not available as a COM server.  
    In this mode, XLSREAD does not use Excel as a COM server, which limits
    import ability. Without Excel as a COM server, RANGE will be ignored
    and, consequently, the whole active range of a sheet will be imported. 
    Also, in basic mode, SHEET is case-sensitive and must be a string.