c******5 发帖数: 22 | 1 Dear all,
I want to import an excel file with 65500 rows and 21 columns into SAS.
After I used proc import, it gave me an error message. Why? And how to fix
the problem? Here is the log message: |
D******n 发帖数: 2836 | 2 u have multiple sheets? btw this is a really small dataset for SAS. |
c******5 发帖数: 22 | 3 没有啊? 就一个sheet。这个sheet我是从Access中导出的,是里面的一个query,所以
combine了几个tables。但是导出了以后还是一个excel sheet啊。 我觉得65500多行也
不应该到limit,不知道怎么回事。 希望大家给解答一下!不胜感激~~~ |
o****o 发帖数: 8077 | 4 what is the name of the sheet?
does it contain any illegal char in SAS? say begin with a number, etc.
【在 c******5 的大作中提到】 : Dear all, : I want to import an excel file with 65500 rows and 21 columns into SAS. : After I used proc import, it gave me an error message. Why? And how to fix : the problem? Here is the log message:
|
d*******o 发帖数: 493 | 5 You probably have mixed data type(char/numeric) for some of your 25 columns. |
p********a 发帖数: 5352 | 6 直接从ACCESS里IMPORT, ACCESS和SAS更相容些。
【在 c******5 的大作中提到】 : 没有啊? 就一个sheet。这个sheet我是从Access中导出的,是里面的一个query,所以 : combine了几个tables。但是导出了以后还是一个excel sheet啊。 我觉得65500多行也 : 不应该到limit,不知道怎么回事。 希望大家给解答一下!不胜感激~~~
|
c******5 发帖数: 22 | 7 The name of the excel sheet is 'Query2'(you could check from the log message
Do you have any suggestions? |
c******5 发帖数: 22 | 8
我是要把Access里的table转到SAS里去,如何在Access中用import实现这个呢?不好意
思,我不会用access,但拿到的data是access的。所以我想把access中的data先转成
excel,然后excel在到SAS。有更好的方法吗?
谢谢!
【在 p********a 的大作中提到】 : 直接从ACCESS里IMPORT, ACCESS和SAS更相容些。
|
c******5 发帖数: 22 | 9
columns.
的确是有mixed的数据。可是我转了个相似的data没问题啊。详细说说吧:
1. 我在access里要用到它的3个tables中的信息。首先,我一个table一个table的把它
们变成了excel file,然后用proc import一个一个的把它们转到SAS中。成功。
2. 因为我想把3个tables中的信息放在一个table中在SAS中做Analysis,但SAS中用
merge什么我怕有multiple entries (不同的table有不同数量的multiple entries)
容易出错。所以我在access里用query把这三个tables先放到一起,然后转成一个excel
sheet,最后录入SAS。 于是就给出了error message。
所以我觉得mixed的数据类型应该不是问题,因为之前没有出错啊。我能想到的就是
combine了以后row 太多,但前面也有朋友说SAS能handle很大的数据,应该也不是问题
。还有就是SAS能发现我这个新的excelsheet是从access中combine了不同的tables来的
所以有问题? 觉得这个也没有可能啊。
头疼中~~希望大家再给点建议,我可以试试。 刚才试了把excel 变成csv file 用
Infile 录入SAS, 有给了另一个error message:
NOTE: Invalid data errors for file ''C\Project\Query2.csv'' occurred outside
the printed range.
谢谢大家!
【在 d*******o 的大作中提到】 : You probably have mixed data type(char/numeric) for some of your 25 columns.
|
p********a 发帖数: 5352 | 10 这个你GOOGLE一下就行了。我用ACCESS转SAS,几乎从来没有格式的问题,因为ACCESS
本身就是数据库。EXCEL就不一样。ACCESS转EXCEL的过程中,还会因为FORMAT问题LOSE
INFORMATION。EXCEL本身是REPORTING用的,能避免做数据库就尽量避免
【在 c******5 的大作中提到】 : : columns. : 的确是有mixed的数据。可是我转了个相似的data没问题啊。详细说说吧: : 1. 我在access里要用到它的3个tables中的信息。首先,我一个table一个table的把它 : 们变成了excel file,然后用proc import一个一个的把它们转到SAS中。成功。 : 2. 因为我想把3个tables中的信息放在一个table中在SAS中做Analysis,但SAS中用 : merge什么我怕有multiple entries (不同的table有不同数量的multiple entries) : 容易出错。所以我在access里用query把这三个tables先放到一起,然后转成一个excel : sheet,最后录入SAS。 于是就给出了error message。 : 所以我觉得mixed的数据类型应该不是问题,因为之前没有出错啊。我能想到的就是
|
|
|
c******5 发帖数: 22 | 11 Thanks! I will have a try and then update. |
d*******1 发帖数: 854 | 12 是不是import的时候还开着excel?
【在 c******5 的大作中提到】 : Dear all, : I want to import an excel file with 65500 rows and 21 columns into SAS. : After I used proc import, it gave me an error message. Why? And how to fix : the problem? Here is the log message:
|
c******5 发帖数: 22 | 13
没开啊。 我还重启电脑,重新打开SAS重新运行也不行。很curious到底为什么~~~
欢迎更多可能我操作不当的线索~~~
【在 d*******1 的大作中提到】 : 是不是import的时候还开着excel?
|
l*******r 发帖数: 407 | 14 可试试把excel数据分成两个小的数据库,调入sas 后再合并。 |
c******5 发帖数: 22 | 15 我试了一下用enterprise guide好像可以把query存成SAS dataset。还有一点小问题,
但是基本上解决了,谢谢大家! |
c******5 发帖数: 22 | 16 突然发现其实我说的那个query有78445个行,不是先前说的~65000行,因为前面save
成excel,excel最多handle那么多行,所以剩下的都没了。抛开这个不说,话说我已经
把这个query转成sas dataset了。现在用proc print 在SAS中打开,结果出来了一个
pop up window,写着:
windows is full and must be cleared. 有四个选项:
1. F to file
2. P to print
3. S to save or
4. C to clear the window without saving
这个不是log中的,是弹出的窗口。在SAS中我还没见过 (sorry,可能太junior了)。
怎么回事呢?文件太大打不开?不应该啊~~~
谢谢大家!
【在 c******5 的大作中提到】 : 我试了一下用enterprise guide好像可以把query存成SAS dataset。还有一点小问题, : 但是基本上解决了,谢谢大家!
|
T*k 发帖数: 398 | 17 proc print data=xxx (obs=500);
run;
Add (obs=500) and try again. |