全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1469 3
2010-11-15
版主peijiamei建议我将内容与博客链接都发上来,我很赞同。


将指定目录下的xls文件'd:\book1.xls'导入到work逻辑库中,建立名为accounts的临时数据集。
this program is:
proc import datafile='d:\book1.xls'; /*use "proc import" to import file , here datafile='the file adress in computer category".*/
out=work.accounts /*out="where will you put the data file you import"*/
dbms=excel replace; /*dbms="the file's data base manegement system" , to xls file, it's always excel. replace means if the data set already exist , sas will overwrite it.*/
getnames=yes; /*whether you will get variables's name in the xls file , here we choose yes .*/
run;




博客原文地址:http://hi.baidu.com/_guobailing/blog/item/0952edd4cecaca289a5027d4.html



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-11-15 13:23:43
格式很好看


看到这个程序想补充一下


导入数据时excel的版本需要注意,现在的SAS9.1.3是不能导入excel07的文件的。


在实际操作中excel总是不能导入的话,可以将excel文件先转化为csv文件,然后导入
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-11-15 13:33:44
我先跟进楼主的学习, 同时谢谢版主提示!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-11-15 14:57:46
2# peijiamei


谢谢斑竹指点。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群