repeatedly invoking xlsread/xlswrite results in multiple EXCEL.EXE sessions in Task Manager
Show older comments
I have an issue with MATLAB on a laptop running Windows 7 that I never had on XP. When I use xlsread or xlswrite many times sequentially I get multiple EXCEL.EXE sessions activated, which can be seen in Task Manager (say just typing "xlswrite('test',1)" repeatedly at the command line prompt). They do die off eventually, but very slowly. In my previous setups there would only ever be one EXCEL.EXE session activated through the actxserver. The problem is that I invoke this command hundreds of times in loops, which results in many EXCEL.EXE sessions, and I eventually run up against memory issues. I could use a "pause" command but this causes big delays in my code, or kill off EXCEL completely at some point in the loops, which isn't desirable either. Other solutions are to use xlsread1/xlswrite1 for parts of the loops, but that gets tricky too (and I already utilise them when it is useful). I wonder if anyone had faced this issue, why it happens in some setups, and if there is a better work around. Thank you, Stephen.
Answers (0)
Categories
Find more on Use COM Objects in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!