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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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