Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!z27g2000prd.googlegroups.com!not-for-mail
From: Andrew <andrewkgentile@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Disable Excel Macro
Date: Tue, 6 Jan 2009 05:50:18 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <266b8f39-1e44-42bb-b0af-b5de1ac25259@z27g2000prd.googlegroups.com>
References: <gjv9nq$1v8$1@fred.mathworks.com> <gjvata$otq$1@fred.mathworks.com> 
	<907bebc4-6579-4d03-aa25-1188d2fea18f@v15g2000yqn.googlegroups.com> 
	<gjvgsh$8vp$1@fred.mathworks.com>
NNTP-Posting-Host: 192.251.23.2
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1231249818 7652 127.0.0.1 (6 Jan 2009 13:50:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Jan 2009 13:50:18 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: z27g2000prd.googlegroups.com; posting-host=192.251.23.2; 
	posting-account=0QzK9QoAAAASked1gGMxOrY40XaDDtFq
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) 
	Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe)
Bytes: 2850
Xref: news.mathworks.com comp.soft-sys.matlab:510016


On Jan 6, 4:56=A0am, "Alex Thiele" <bert1...@yahoo.com> wrote:
> Hi,
>
> No I don't.
> Actually the full error message is
>
> > In xlsread at 200
>
> =A0 In SpreadsheetAnalyser>pushbutton1_Callback at 147
> =A0 In gui_mainfcn at 75
> =A0 In SpreadsheetAnalyser at 48
> ??? File contains unexpected record length. =A0Try saving as Excel 98.
>
> Error in =3D=3D> SpreadsheetAnalyser>pushbutton1_Callback at 147
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [WholeDataFile,txt] =3D xlsread([Pathname=
,Filename{1,counter}],'ATP results','A1:U146', 'basic'); %import data and d=
elete unwanted rows and columns
>
> Error in =3D=3D> gui_mainfcn at 75
> =A0 =A0 =A0 =A0 feval(varargin{:});
>
> Error in =3D=3D> SpreadsheetAnalyser at 48
> =A0 =A0 gui_mainfcn(gui_State, varargin{:});
>
> ??? Error while evaluating uicontrol Callback.
>
> I didn't post this bacuase I didn't think it contained useful information=
. But I could be wrong. If I remove the 'A1:U146', 'basic' from my XLS read=
 statement, then it works, but with the macro problem, Adding the 'A1:U146'=
, 'basic' gives me the error above.
>
> Thanks again
>
> Alex

I don't know how to deal with this through Matlab, but I doubt that
you can over-ride macros with an external program like Matlab.
Obviously you have access to Excel.  It would be fast and easy to
disable all macros in Excel.  Just set the macro security level to
High, then restart Excel.  Then you can run your program, and reset
the Excel macro security when you are done.  Is this a possibility?

Andy