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

查看:26
本文介绍了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 OfficeOffice15EXCEL.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 工作表的任何建议?能否与我在 Excel 中的语言设置(德语)相关联?

Any suggestions why the data is not written to my Excel sheet? Could it be connected with my language settings (German) in 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(olumn)

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天全站免登陆