导入第一页程序:
proc import datafile = 'D:\Book1.xlsx' dbms = xlsx out = a;
sheet = 'sheet1';
range = 'sheet1$a1:c2';
run;
结果(log部分):
1 proc import datafile = 'D:\Book1.xlsx' dbms = xlsx out = a;
2 sheet = 'sheet1';
3 range = 'sheet1$a1:c2';
4 run;
NOTE: Variable Name Change. 1 -> _1
NOTE: Variable Name Change. 12 -> _12
NOTE: Variable Name Change. 26 -> _26
NOTE: The import data set has 25 observations and 3 variables.
NOTE: WORK.A data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.10 seconds
cpu time 0.10 seconds
导入第二页
程序:
proc import datafile = 'D:\Book1.xlsx' dbms = xlsx out = b;
sheet = 'sheet2';
range = 'sheet2$a1:c2';
run;
结果(log部分):
5 proc import datafile = 'D:\Book1.xlsx' dbms = xlsx out = b;
6 sheet = 'sheet2';
7 range = 'sheet2$a1:c2';
8 run;
ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [IMPORT]
ERROR: Read Access Violation IMPORT
Exception occurred at (0B0AF0E4)
Task Traceback
Address Frame (DBGHELP API Version 4.0 rev 5)
000000000B0AF0E4 000000000C8365C0 sasimxlx:tkvercn1+0xE0A4
000000000B0AC1C3 000000000C84E4A0 sasimxlx:tkvercn1+0xB183
000000000B0A8458 000000000C84E660 sasimxlx:tkvercn1+0x7418
000000000B0A1893 000000000C84E6A0 sasimxlx:tkvercn1+0x853
000000000B072E41 000000000C84E6A8 sasimctr:tkvercn1+0x1E01
000000000B0717C4 000000000C84F770 sasimctr:tkvercn1+0x784
000000000B051277 000000000C84F778 sasimpor:tkvercn1+0x237
0000000002F58B07 000000000C84FCB8 sashost:Main+0xF437
0000000002F5D13D 000000000C84FF50 sashost:Main+0x13A6D
000007FDF4B3167E 000000000C84FF58 KERNEL32:BaseThreadInitThunk+0x1A
000007FDF4CA3501 000000000C84FF88 ntdll:RtlUserThreadStart+0x21
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds