some problem while accessing the Microsoft Excel using “actxserver” command
7 views (last 30 days)
Show older comments
In our application through, “actxserver” it constantly updates few excel Excel files. Since this application is time critical I can’t close those Excel files(which are connected to “actxserver”),because for updating those files again we need to open it through invoke(that will take some time depending upon the size of these Excel files)
But while this application is running & we are updating these Excel files through “actxserver” commands, if user want to open any other Excel sheet (which is been created earlier) not through Matlab but by just double clicking on that Excel Sheet, all the existing Excel files(which are updated by Matlab through “actxserver” commands) are also getting visible.
And now its hard to go through User’s Excel sheet(which he opened afterwards just by double clicking), because all these files(files which are updted through “actxserver” commands in Matlab + User’s Excel file) are visible now & they are continously poping on the desktop one by one.
So is there any way so that I can create another connection to Excel, which won’t be used by User when he tries to open some of his existing Excel files.
Right now we are establishing a connection to excel just by simplly executing following command:
Excel = actxserver('Excel.Application');
Excel.Visible = 0;
Workbooks = Excel.Workbooks;
set(Excel, 'DisplayAlerts', 0);
Kindly let me know, if you have any suggestions/queries.
2 Comments
Image Analyst
on 4 Apr 2020
Since it's been 6 years, I imagine he got it solved by now. For you today, see my attached ActiveX Excel Demo.
Answers (1)
Image Analyst
on 10 Jun 2014
Perhaps there is a way to set visibility of individual worksheet in addition to the visibility of the whole Excel application. I don't know, I'd have to look through the ActiveX methods, which you can do just as well as I can. If so, set those workbooks invisible then maybe when the use launches Excel they still won't be visible.
See Also
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!