楼主: playmore
15699 24

[问答] 请问如何将多个数据集导出至同一Excel文件的多个Sheet? [推广有奖]

11
jingju11 发表于 2013-5-24 01:44:23
Just ask a question:
I use proc export to do the job. it works fine. A problem is that the number of sheets(tabs) in one .xls file cannot be more than 269 or so. Beyond that, the file won't accpet more tabs.
But that should not be a problem if we don't use SAS to export multiple sheets(tabs), right?
Does anyone know how to resolve this issue?
Thanks, Jingju

12
playmore 发表于 2013-5-24 08:41:37
jingju11 发表于 2013-5-24 01:44
Just ask a question:
I use proc export to do the job. it works fine. A problem is that the number o ...
嗯,应该就是proc export的问题
要不试试DDE?这东西直接操作Excel,应该受SAS限制较少
但是我用这玩艺会经常死机
后来就不用了
playmore邀请您访问ChinaTeX论坛!!!进入ChinaTeX论坛

13
邓贵大 发表于 2013-5-24 10:00:51
there's no limit on the # of worksheets allowed per excel file as long as you have enough memory to open it.
And I do prefer 可~乐's DATA step approach rather than many PROC EXPORT steps.
Basically, both methods use the SAS/ACCESS interface to PC files, but the DATA steps establishes connection for once only and thus more efficient.
I could be wrong.
Be still, my soul: the hour is hastening on
When we shall be forever with the Lord.
When disappointment, grief and fear are gone,
Sorrow forgot, love's purest joys restored.

14
jingju11 发表于 2013-5-24 10:39:10
邓贵大 发表于 2013-5-24 10:00
there's no limit on the # of worksheets allowed per excel file as long as you have enough memory to  ...
Thanks for all replies.
I don't prefer to DDE since I am running SAS in server.
I may lose some efficiency as you suggest. On the other hand, I am not very concerned about the efficiency in this situation. In my job, about 150,000 records were distributed to 6 files with many tabs (about 1,200) using proc export, which takes me less than 5 minutes. I use data step to drive proc export. the code is very clear and simple.
Jingju

15
zjwdjcz 发表于 2013-5-28 11:46:51
好東西

16
linggol 发表于 2013-6-27 15:31:49
好多高人啊

17
lewis8992 发表于 2013-7-6 22:10:51
謝謝分享

18
lxqleaves 发表于 2013-7-23 09:31:44
高人啊

19
henryyhl 发表于 2013-8-6 09:21:16
学习了。都是高人,这个要学习。
It's not going to be easy, but it is going to be worth it.

20
edwardzxf 学生认证  发表于 2013-8-6 13:21:52
可~乐 发表于 2013-5-22 15:40
如本身class1 class2存在于那个excel里面,如何replace呀

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 17:29