🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-15-2021 08:49 PM
(1066 views)
libname results 'C:\practice everyday';
proc import datafile = 'C:\practice everyday\input\ABC.xlsx'
out = results.ABC
dbms = xlsx
replace;
getnames = yes;
run;
proc print data = results.ABC;
run; With code above, just get a sas data set named results.ABC which is from sheetA ,isn't it ?(ABC.xlsx has three sheets, the first is sheetA, the second is sheetB, the third is sheetC)
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You ensure you get the sheet you want it is better to use the SHEET = option as documented here
Relying on the order of sheets to pick (the first will be selected by default) the one you want isn't reliable.
6 REPLIES 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So have you run it and got the expected results which would be the first sheet in the workbook?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Then why are you asking the question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I just want to make sure what I thought is correct .
Thank you for your reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You ensure you get the sheet you want it is better to use the SHEET = option as documented here
Relying on the order of sheets to pick (the first will be selected by default) the one you want isn't reliable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help.