SAS通过DDE将数据放入Excel [英] SAS put data to Excel via DDE

查看:587
本文介绍了SAS通过DDE将数据放入Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过DDE将一些数据写入Excel并具有以下代码:

I want to write some data to Excel via DDE and have the following code:

option noxwait noxsync;
x call "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE";

%let delay=5;
data _null_;
    rc=sleep(&delay); 
run;

filename random dde 'excel|Tabelle1!r1c1:r100c3';
data _null_;
    set sashelp.class;
    file random;
    put name sex age;
run;

Excel已成功打开,但工作表仍为空。日志告诉我有19条记录已写入文件RANDOM。

Excel opens successfully however the sheet remains empty. The log tells me that 19 records were written to the file RANDOM.

有人建议为什么不将数据写入Excel工作表?

Any suggestions why the data is not written to my Excel sheet? Could it be connected with my language settings (German) in Excel?

推荐答案

从头到尾很疯狂的故事:当我改变我的故事时,它可以与Excel中的语言设置(德语)联系起来吗?

Very mad story from my end: When I changed my language settings from German to English it works fine with the shown code.

更新:
它也适用于德语设置,但是我必须翻译所有语句,例如写入的范围:

Update: It also works with German language settings, however I have to translate all statements, e.g. the range written to:

英语Excel

filename random dde 'excel|Sheet1!r1c1:r100c3';

德国Excel使用z(eile)和s(palte)代替r(ow)和c(

German Excel use z(eile) and s(palte) instead of r(ow) and c(olumn)

filename random dde 'excel|Tabelle1!z1s1:z100s3';

这篇关于SAS通过DDE将数据放入Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆