Ricky

链接

RSS

RSS Link
UTF-8文件上传到z/OS并转IBM-1388
Rexx提交JCL的两种方式

VBA中调用Shell执行外部命令并返回结果

Ricky posted @ 2013年10月21日 14:27 in Other , 8329 阅读

要实现获取执行外部程序的结果可以用run或者exec

关于这两则的区别:http://www.codeproject.com/Tips/507798/Differences-between-Run-and-Exec-VBScript

另外稍复杂的程序可以参考这个链接

http://zhiqiang.org/blog/it/exec-shell-in-excel-vba.html

调用FTP需加-v参数才能获得所有输出:

var shell = new ActiveXObject("WScript.Shell");
    cmd = Environ("windir") & "\System32\ftp.exe -v -n -s:" & sWorkingDirectory & ftpFile
    Set oExec = oShell.exec("cmd.exe /c " & cmd)
var output = oExec..StdOut.ReadAll();

这样VBA会等待FTP执行完毕后再继续执行。

Avatar_small
f88tw 说:
2021年4月25日 18:20

敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. f88tw粗工粗工内容 粗工粗工内容 |墓园|捡骨流程|捡骨费用|捡骨时间|禁忌|捡骨颜色|捡骨师|新竹|时间|台北|桃园|苗栗|头份|https://mypaper.m.pchome.com.tw/f88tw

Avatar_small
Porn Star Wiki 说:
2021年7月06日 15:27

This is such a great resource that you are providing and you give it away for free.

Avatar_small
Chennai Escort 说:
2021年9月08日 14:20

you need a girl for sex so meet me tonight. before you book me my site.
then I meet you.

Avatar_small
Chennai Escort 说:
2021年9月08日 14:23

your discover is the best at this time.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter