找回密码
 注册
Simdroid-非首页
查看: 61|回复: 2

请问读写excel文件的文件名可否动态的自动给出呢?

[复制链接]
发表于 2011-3-29 04:37:44 | 显示全部楼层 |阅读模式 来自 德国
请问如下的filename,即outex可否用变量字符动态给定呢,比如拿cell里面的一个字符元素
xlswrite('outex.xls',a);

或者如xlsread('inex.xls');里面的inex通过input给定呢?
b=input('give the name of the excel file:','s');
输入inex回车
xlsread('inex.xls')
我试过这样的,但是不行

谢谢:)
发表于 2011-3-29 08:46:12 | 显示全部楼层 来自 河北廊坊
Simdroid开发平台
试试下面的
  1. xlsread(sprintf('%s.xls',input('give the name of the excel file:','s')))
复制代码

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2011-3-29 19:15:43 | 显示全部楼层 来自 德国
完全无误,衷心感谢祁斑主:D:handshake
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-10-4 23:26 , Processed in 0.029820 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表