由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 請教許多data 快速import and transpose的方法
相关主题
SAS macro to import multiple csv file??help on importing csv file to SAS
sas大牛们这个要怎么实现呀请教如何同时用sas打开多个excel文件?多谢!
SAS ADV passed!!!How to write a simple macro to read multiple spreadsheets from one excel file?
SAS不能导入EXCEL2003的数据!SAS 数据读入的问题 (proc import)
Help:import excel file into sasSAS Technical Interview Questions
SAS的一个小问题questions about SAS import Excel data
SAS中如何只保留变量名中含有reading的变量啊Proc import 读excel文件,怎么略去前面几行?
如何用SAS Macro来计算这个公式?包子问,SAS里data long to wide format
相关话题的讨论汇总
话题: macro话题: files话题: data话题: import话题: stored
进入Statistics版参与讨论
1 (共1页)
x******e
发帖数: 42
1
現有500 excel files and these file names are stored in another file called
file.dat.
How to quickly import these files (500 excel files) and stored as SAS files
respectly after transposing them?
I wrote the code for a single file, but have to run the macro 500 times with
different numbers. It will be tedious.......... Any other convenient way
by taking advantage of the file.dat?
3xs!!!
%macro dataread(number);
PROC IMPORT OUT= file&number
DATAFILE= "C\chart_data\CR&number..xls"
DBMS
P****D
发帖数: 11146
2
http://www.nesug.org/proceedings/nesug08/cc/cc16.pdf
这个可以做到在一个文件夹下面见excel文件(或其他你规定的extention name)就处
理。
http://www2.sas.com/proceedings/sugi27/p105-27.pdf
这个可以列出一个文件夹下面的所有文件的文件名(当然还有文件最后修改时间之类的
其他参数,不过对你没用)。
我觉得随便哪一个都差不多能解决你的问题了。
t**s
发帖数: 156
3
Did you try "call execute"?
s*********e
发帖数: 1051
4
copied from my blog:
*************************************************
* READ ALL EXCEL FILES WITH SAME STRUCTURE *
* FROM A FOLDER INTO SAS USING MACRO *
* DATE: SEP-29, 2005 *
*************************************************;
%macro ReadXls(dir = , out = );
*************************************************
* MACRO PARAMETERS: *
* DIR: FOLDER WHERE DATA IS STORED *
* OUT: NAME OF OUTPUT DATA TABLE *
*************************************************;
/* DELETE TABLE WITH SAME NAME AS OUTPUT DAT
1 (共1页)
进入Statistics版参与讨论
相关主题
包子问,SAS里data long to wide formatHelp:import excel file into sas
SAS date format 的问题SAS的一个小问题
SAS proc import excel file 紧急求助SAS中如何只保留变量名中含有reading的变量啊
请教大神关于sas从ftp server上import 文件的问题如何用SAS Macro来计算这个公式?
SAS macro to import multiple csv file??help on importing csv file to SAS
sas大牛们这个要怎么实现呀请教如何同时用sas打开多个excel文件?多谢!
SAS ADV passed!!!How to write a simple macro to read multiple spreadsheets from one excel file?
SAS不能导入EXCEL2003的数据!SAS 数据读入的问题 (proc import)
相关话题的讨论汇总
话题: macro话题: files话题: data话题: import话题: stored