MATLAB _01_ Operations Excel

Source: Internet
Author: User

    1. %matlab coder
    2. h=actxcontrolselect
    3. [h,info]=actxcontrolselect
    4. %h返回的是一个句柄
    5. %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:
  1. e=actxserver(‘Excel.Application‘);
  2. %使得excel框架窗口可见
  3. e.visible=1;
  4. % use the Get method of the Excel object E to list all properties of the app
  5. E.get
  6. % Create a "eworkbooks" interface:
  7. Eworkbooks=e.workbooks
  8. % Add a new workbook
  9. Eworkbooks.invoke% can list method methods
  10. W=eworkbooks.add% Create a new workbook, and add another interface:
  11. % can also use W to create new worksheet (table key to list functions)
  12. % close Excel, and delete objects
  13. E.quit:
  14. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.