BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Aniket
Calcite | Level 5

Hi kuri,

i have tried your link for the excel file and its working perfectly and the code which i have already marked for the correct answer.

Can you please tell me how could i get the right link like you have posted. Thanks a lot.....

kuridisanjeev
Quartz | Level 8

Hi Aniket.

Its Pretty Simple..

Right Click On "Excel" in that site and select Copy Link location..paste that link in your Code,, that's it 🙂

Attached Screenshot..

scrn.JPG

Regards.

Sanjeev.K

Aniket
Calcite | Level 5

Hi Louiss,

I have tried your method but it's showing error

see the log:

FILENAME website URL 'http://www.energystar.gov/index.cfm?fuseaction=find_a_product.showProductGroup&pgw_code=FRZ/Freezers Product List.xls';

28

29   FILENAME COPY "I:\Newfolder\abc.xls";

30     data _NULL_;

31      n=-1;

32         infile website recfm=s nbyte=n length=len;

33        file copy recfm=n;

34        input;

35        put _infile_ $varying32767. len;

36   run;

NOTE: Unable to connect to host www.energystar.gov. Check validity of host name.

ERROR: Hostname www.energystar.gov not found.

NOTE: UNBUFFERED is the default with RECFM=N.

NOTE: The file COPY is:

      Filename=I:\Newfolder\abc.xls,

      RECFM=N,LRECL=256,File Size (bytes)=0,

      Last Modified=15Mar2013:11:35:32,

      Create Time=15Mar2013:11:34:31

NOTE: The SAS System stopped processing this step because of errors.

NOTE: DATA statement used (Total process time):

      real time           4.56 seconds

      cpu time            0.11 seconds

37

38   filename copy clear;

NOTE: Fileref COPY has been deassigned.

39

40   libname Excel "I:\Newfolder\abc.xls" ;

ERROR: Connect: External table is not in the expected format.

ERROR: Error in the LIBNAME statement.

41

42   Data WORK.PROCtoNDC;

43   * Because the worksheet name is

44   the SAS Dataset Name and it has a non standard format you need it in quotes.;

45          SET Excel."Freezers Product List"n;

ERROR: Libname EXCEL is not assigned.

46     run;

NOTE: Compression was disabled for data set WORK.PROCTONDC because compression overhead would increase the size of the data set.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.PROCTONDC may be incomplete.  When this step was stopped there were 0 observations and 0 variables.

WARNING: Data set WORK.PROCTONDC was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

      real time           0.02 seconds

      cpu time            0.03 seconds

_n_p_t_
Calcite | Level 5

Anybody tried downloading from google doc?

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 16832 views
  • 4 likes
  • 6 in conversation