From: RaS Sandra on
"Yingbo " <yobbo.yu(a)gmail.com> wrote in message <hjjm99$dqb$1(a)fred.mathworks.com>...
> I am running xlsread to read data from .xls files. But I found that excel.exe is still running and taking 50% of my 2core cpu, by looking at the 'task manager'. I looked into xlsread.m and found that it is the lines:
>
> ExcelWorkbook.Close(false);
> Excel.Quit;
>
> that failed to finish up the job. Could anyone help me solve this issue? Many thanks!
>
> And this might have to do with my O/S, it is WinXP SP3. And Matlab is 7.6.0

How can the program quit when the workbook (where the macro resides) is already closed? You can try to tell excel that the workbook is already saved (to avoid the question 'do you want to save ...'), and then do a quit ...
From: Andy on
"Yingbo " <yobbo.yu(a)gmail.com> wrote in message <hjjm99$dqb$1(a)fred.mathworks.com>...
> I am running xlsread to read data from .xls files. But I found that excel.exe is still running and taking 50% of my 2core cpu, by looking at the 'task manager'. I looked into xlsread.m and found that it is the lines:
>
> ExcelWorkbook.Close(false);
> Excel.Quit;
>
> that failed to finish up the job. Could anyone help me solve this issue? Many thanks!
>
> And this might have to do with my O/S, it is WinXP SP3. And Matlab is 7.6.0

Just to be clear, the file that you're writing to does close, but the Excel application remains open? Do you have any other Excel files open? Does this happen if you run your code after first closing Excel completely?

After checking the above things, you might try this after your code finishes:

e=actxGetRunningServer('excel.application');
e.Quit;
From: Neil Stewart on
"Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i3ec3o$dd7$1(a)fred.mathworks.com>...
> "Yingbo " <yobbo.yu(a)gmail.com> wrote in message <hjjm99$dqb$1(a)fred.mathworks.com>...
> > I am running xlsread to read data from .xls files. But I found that excel.exe is still running and taking 50% of my 2core cpu, by looking at the 'task manager'. I looked into xlsread.m and found that it is the lines:
> >
> > ExcelWorkbook.Close(false);
> > Excel.Quit;
> >
> > that failed to finish up the job. Could anyone help me solve this issue? Many thanks!
> >
> > And this might have to do with my O/S, it is WinXP SP3. And Matlab is 7.6.0
>
> Just to be clear, the file that you're writing to does close, but the Excel application remains open? Do you have any other Excel files open? Does this happen if you run your code after first closing Excel completely?
>
> After checking the above things, you might try this after your code finishes:
>
> e=actxGetRunningServer('excel.application');
> e.Quit;

I'm having the same problem; it's really annoying having to manually end the processes of 15+ "EXCEL.EXE"s.

I don't know how that code is supposed to work but it doesn't appear to do anything.
From: Andy on
"Neil Stewart" <neil.stewart(a)lr.org> wrote in message <i3efco$gco$1(a)fred.mathworks.com>...
> "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i3ec3o$dd7$1(a)fred.mathworks.com>...
> > "Yingbo " <yobbo.yu(a)gmail.com> wrote in message <hjjm99$dqb$1(a)fred.mathworks.com>...
> > > I am running xlsread to read data from .xls files. But I found that excel.exe is still running and taking 50% of my 2core cpu, by looking at the 'task manager'. I looked into xlsread.m and found that it is the lines:
> > >
> > > ExcelWorkbook.Close(false);
> > > Excel.Quit;
> > >
> > > that failed to finish up the job. Could anyone help me solve this issue? Many thanks!
> > >
> > > And this might have to do with my O/S, it is WinXP SP3. And Matlab is 7.6.0
> >
> > Just to be clear, the file that you're writing to does close, but the Excel application remains open? Do you have any other Excel files open? Does this happen if you run your code after first closing Excel completely?
> >
> > After checking the above things, you might try this after your code finishes:
> >
> > e=actxGetRunningServer('excel.application');
> > e.Quit;
>
> I'm having the same problem; it's really annoying having to manually end the processes of 15+ "EXCEL.EXE"s.
>
> I don't know how that code is supposed to work but it doesn't appear to do anything.

Could you be more specific about what the problem is? That is, can you provide a small snippet of code that we can run that will reproduce this problem? Also, it would be helpful to know what version of MATLAB, what version of Windows, and what version of Excel you're using.
From: Neil Stewart on
"Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i3egck$ldj$1(a)fred.mathworks.com>...
> "Neil Stewart" <neil.stewart(a)lr.org> wrote in message <i3efco$gco$1(a)fred.mathworks.com>...
> > "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i3ec3o$dd7$1(a)fred.mathworks.com>...
> > > "Yingbo " <yobbo.yu(a)gmail.com> wrote in message <hjjm99$dqb$1(a)fred.mathworks.com>...
> > > > I am running xlsread to read data from .xls files. But I found that excel.exe is still running and taking 50% of my 2core cpu, by looking at the 'task manager'. I looked into xlsread.m and found that it is the lines:
> > > >
> > > > ExcelWorkbook.Close(false);
> > > > Excel.Quit;
> > > >
> > > > that failed to finish up the job. Could anyone help me solve this issue? Many thanks!
> > > >
> > > > And this might have to do with my O/S, it is WinXP SP3. And Matlab is 7.6.0
> > >
> > > Just to be clear, the file that you're writing to does close, but the Excel application remains open? Do you have any other Excel files open? Does this happen if you run your code after first closing Excel completely?
> > >
> > > After checking the above things, you might try this after your code finishes:
> > >
> > > e=actxGetRunningServer('excel.application');
> > > e.Quit;
> >
> > I'm having the same problem; it's really annoying having to manually end the processes of 15+ "EXCEL.EXE"s.
> >
> > I don't know how that code is supposed to work but it doesn't appear to do anything.
>
> Could you be more specific about what the problem is? That is, can you provide a small snippet of code that we can run that will reproduce this problem? Also, it would be helpful to know what version of MATLAB, what version of Windows, and what version of Excel you're using.

Any piece of code
eg. "john = xlsread('johndata.xls');" (this would leave one instance of "EXCEL.EXE" running in the taskbar; if there were to be three xlsread functions there would be 3 "EXCEL.EXE"s in the taskbar

Currently on Matlab R2008b on Windows Xp Professional. Using Excel 2003.

Thanks for any help