文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机软件及应用 > matlab读取excel
侵权投诉

matlab读取excel

matlab读取excel数据方法

Matlab如何读取Excel 表格数据

Subject:

Are there any examples that show how to use the ActiveX automation interface to connect MATLAB to Excel?

Problem Description

I am trying to control Excel from MATLAB using ActiveX. Are there any examples that show how to use the ActiveX automation interface from Excel to do this?

Solution:

Most of the functionality that you get from ActiveX is dependent on the object model, which the external application implements. Consequently, we are usually unable tp provide much information about the functions that you need to use in the remote application to perform a particular function. We do, however, have an example that shows how to do perform common functions in Excel.

We also recommend that you become more familiar with the Excel object model in order to better use Excel's ActiveX automation interface from MATLAB. You can find more information on this interface by selecting the "Microsoft Excel Visual Basic Reference" topic in the Microsoft Excel Help Topic dialog. This topic area contains a searchable description of Excel methods and properties.

The following example demonstrates how to insert MATLAB data into Excel. It also shows how to extract some data from Excel into MATLAB. For more information, refer to the individual comments for each code segment.

% Open Excel, add workbook, change active worksheet,

% get/put array, save, and close

% First open an Excel Server

Excel = actxserver('Excel.Application');

set(Excel, 'Visible', 1);

% Insert a new workbook

Workbooks = Excel.Workbooks;

Workbook = invoke(Workbooks, 'Add');

% Make the second sheet active

Sheets = Excel.ActiveWorkBook.Sheets;

sheet2 = get(Sheets, 'Item', 2);

invoke(sheet2, 'Activate');

% Get a handle to the active sheet

上一页第5页

你可能喜欢

热门文档

相关文档

  • 关于matlab读取excel以及处理

    在许多时候我们要借助于 matlab 读取 excel 的 内容进行处理, 内容进行处理,一下是一种常用的处理方法文件本质上就是一个二维矩阵, office 的表格文件也就是 xls...

  • matlab读取txt和excel

    matlab读取txt和excel_数学_自然科学_专业资料。matlab读取txt和excelText 的读写 1.读文本文件 fid=fopen('matlab3.txt','r') %我已把 txt 放入 matlab 默认...

  • matlab读取excel数据

    matlab读取excel数据_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 matlab读取excel数据_计算机软件及应用_IT/计算机_专业资料。1.用 ...

  • Matlab 如何读取 Excel 表格数据

    Matlab 如何读取 Excel 表格数据_理学_高等教育_教育专区。Excel 表格数据? 上一篇: 在 VC++程序中输出空心文字 Matlab 如何读取 Excel 表格数据 下一篇: My ANN...

  • Excel 读入Matlab

    ? 1.利用 matlab 从 excel 中读取数据使用:xlsread 命令、uiimport 可视化导入命令 exp:excel 表的文件名为 book1.xls,存放在 E:\ 读取命令:data = xlsread(...

  • MATLAB读取TXT excle

    MATLAB读取TXT excle_电脑基础知识_IT/计算机_专业资料。matlab教程文本读写matlab 中读取 excel 的 xls 文件 1.使用函数 xlsread 读取单个文件 (1)num=xlsread(...

  • MATLAB读取excel数据求助

    MATLAB 读取 excel 数据求助 想从 excel 中读取一个这样的矩阵 0 9 inf 3 inf 9 0 2 inf 7 inf 2 0 2 4 3 inf 2 0 inf inf 7 4 inf 0 可是用...

  • matlab与excel

    原理是这样的,当用户系统安装有 Excel 时,MATLAB 创建 Excel 服务器,通过服务器接口读取数 据。当用户系统没有安装 Excel 或 MATLAB 不能访问 COM 服务器时,...

  • MATLAB如何导入excel数据

    MATLAB如何导入excel数据_计算机软件及应用_IT/计算机_专业资料。下面我就通过实例介绍一下 MATLAB 如何导入 excel 数据。 1. 读取 sheet1 中的所有数据 我们以 03...

  • Matlab如何在Excel中提取数据

    clc;clear; dname=input (' 数据文件名:\n') ; %读入数据 Excel→Matlab A=xlsread (dname) ; 3 实验数据处理 - 64 - DATABASE AND INFORMATION MANAGEMENT...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email