%matlab coder
h=actxcontrolselect
[h,info]=actxcontrolselect
%h返回的是一个句柄
%info 是一个1行3列的元胞数组,分别对应各空间的名称、程序标识符和空间所在的路径
COM functions can only be used in instances under the Microsoft Windows operating system: use MATLAB to manipulate Excel table 1, create a COM server to run Microsoft Excel:
e=actxserver(‘Excel.Application‘);
%使得excel框架窗口可见
- e.visible=1;
- % use the Get method of the Excel object E to list all properties of the app
- E.get
- % Create a "eworkbooks" interface:
- Eworkbooks=e.workbooks
- % Add a new workbook
- Eworkbooks.invoke% can list method methods
- W=eworkbooks.add% Create a new workbook, and add another interface:
- % can also use W to create new worksheet (table key to list functions)
- % close Excel, and delete objects
- E.quit:
- E.delete:
From for notes (Wiz)
PS: Blog editor can not insert MATLAB code, so the impact of the quality of reading, please forgive me!
MATLAB _01_ Operations Excel