<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I import Excel data from a webpage? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584608#M14203</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to access data in SAS from the Excel workbook at the following location:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workbook has multiple sheets, and ideally I'd like to be able to reference them individually.&amp;nbsp; For starters I'm trying to pull cells A9:P298 from the Employment sheet and arrange the data according to the existing Excel columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my first attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Lib1 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xlsx&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.Table1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Lib&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Employment"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW Other_NonFarm_Proprietors;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the log for this attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 libname Lib1 xlsx "&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;";&lt;/P&gt;&lt;P&gt;NOTE: Libref LIB1 was successfully assigned as follows:&lt;/P&gt;&lt;P&gt;Engine: XLSX&lt;/P&gt;&lt;P&gt;Physical Name: &lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3 data work.Table1;&lt;/P&gt;&lt;P&gt;4 infile Lib1."Employment";&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;201&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.&lt;/P&gt;&lt;P&gt;ERROR 201-322: The option is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;5 input freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces&lt;/P&gt;&lt;P&gt;5 ! Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business&lt;/P&gt;&lt;P&gt;5 ! Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW&lt;/P&gt;&lt;P&gt;5 ! Other_NonFarm_Proprietors;&lt;/P&gt;&lt;P&gt;6 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.TABLE1 may be incomplete. When this step was stopped there were 0&lt;/P&gt;&lt;P&gt;observations and 16 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.03 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my second attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;import&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datafile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Y:\SAS\Load\us_total_hrs_emp.xlsx"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dbms&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = xlsx&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = work.Table2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;sheet&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Employment"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;range&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"EmploymentA9:P298"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;getnames&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = no;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because proc import does not work with web locations, I saved the file locally and refer to that location here.&amp;nbsp; I would prefer to call directly from the web and not have to do this, but I can if need be.&amp;nbsp; Here is the log for this attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7 proc import&lt;/P&gt;&lt;P&gt;8 datafile = "Y:\SAS\Load\us_total_hrs_emp.xlsx"&lt;/P&gt;&lt;P&gt;9 dbms = xlsx&lt;/P&gt;&lt;P&gt;10 out = work.Table2&lt;/P&gt;&lt;P&gt;11 replace;&lt;/P&gt;&lt;P&gt;12 sheet = "Employment";&lt;/P&gt;&lt;P&gt;13 range = "EmploymentA9:P298";&lt;/P&gt;&lt;P&gt;14 getnames = no;&lt;/P&gt;&lt;P&gt;15 run;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;ERROR: An exception has been encountered.&lt;/P&gt;&lt;P&gt;Please contact technical support and provide them with the following traceback information:&lt;/P&gt;&lt;P&gt;The SAS task name is [IMPORT]&lt;/P&gt;&lt;P&gt;ERROR: Read Access Violation IMPORT&lt;/P&gt;&lt;P&gt;Exception occurred at (0DD5A7B3)&lt;/P&gt;&lt;P&gt;Task Traceback&lt;/P&gt;&lt;P&gt;Address Frame (DBGHELP API Version 4.0 rev 5)&lt;/P&gt;&lt;P&gt;000000000DD5A7B3 000000000DD3D6D0 sasimxlx:tkvercn1+0x19773&lt;/P&gt;&lt;P&gt;000000000DD56419 000000000DD3E210 sasimxlx:tkvercn1+0x153D9&lt;/P&gt;&lt;P&gt;000000000DD469D1 000000000DD3E260 sasimxlx:tkvercn1+0x5991&lt;/P&gt;&lt;P&gt;000000000DD418DD 000000000DD3E290 sasimxlx:tkvercn1+0x89D&lt;/P&gt;&lt;P&gt;000000000D1D31D5 000000000DD3E298 sasimctr:tkvercn1+0x2195&lt;/P&gt;&lt;P&gt;000000000D1D1844 000000000DD3F640 sasimctr:tkvercn1+0x804&lt;/P&gt;&lt;P&gt;000000000D1B1352 000000000DD3F648 sasimpor:tkvercn1+0x312&lt;/P&gt;&lt;P&gt;00000000034DA066 000000000DD3FBE8 sashost:Main+0x11BA6&lt;/P&gt;&lt;P&gt;00000000034E011D 000000000DD3FF50 sashost:Main+0x17C5D&lt;/P&gt;&lt;P&gt;00007FF942054034 000000000DD3FF58 KERNEL32:BaseThreadInitThunk+0x14&lt;/P&gt;&lt;P&gt;00007FF9424B3691 000000000DD3FF88 ntdll:RtlUserThreadStart+0x21&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.07 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.07 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my third attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Table3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;temp&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;http&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;url&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = Table3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.Table4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Table3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW Other_NonFarm_Proprietors;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the log for this attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;16 filename Table3 temp;&lt;/P&gt;&lt;P&gt;17&lt;/P&gt;&lt;P&gt;18 proc http&lt;/P&gt;&lt;P&gt;19 url = "&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;20 out = Table3;&lt;/P&gt;&lt;P&gt;21 run;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE HTTP used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.20 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;NOTE: 200 OK&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;23 data work.Table4;&lt;/P&gt;&lt;P&gt;24 infile Table3;&lt;/P&gt;&lt;P&gt;25 input freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces&lt;/P&gt;&lt;P&gt;25 ! Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business&lt;/P&gt;&lt;P&gt;25 ! Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW&lt;/P&gt;&lt;P&gt;25 ! Other_NonFarm_Proprietors;&lt;/P&gt;&lt;P&gt;26 run;&lt;/P&gt;&lt;P&gt;NOTE: The infile TABLE3 is:&lt;/P&gt;&lt;P&gt;Filename=C:\Users\palmer_d\AppData\Local\Temp\SAS Temporary&lt;/P&gt;&lt;P&gt;Files\_TD2096_243224LT-OPT_\#LN00056,&lt;/P&gt;&lt;P&gt;RECFM=V,LRECL=32767,File Size (bytes)=173139,&lt;/P&gt;&lt;P&gt;Last Modified=28Aug2019:10:58:12,&lt;/P&gt;&lt;P&gt;Create Time=28Aug2019:10:58:12&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for Total_US in line 1 51-630.&lt;/P&gt;&lt;P&gt;NOTE: LOST CARD.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data errors for file TABLE3 occurred outside the printed range.&lt;/P&gt;&lt;P&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/P&gt;&lt;P&gt;freq=PK&amp;#3;&amp;#4;&amp;#20; &amp;#6; Total_US=. Tot_Gen_Govt=. Tot_Gen_FedGovt=. Tot_Gen_StateGovt=. Armed_Forces=.&lt;/P&gt;&lt;P&gt;Private_Households=. Non_Profits=. Farm=. Nonfarm_Business=. Private_Nonfarm_Business=.&lt;/P&gt;&lt;P&gt;Tot_Gov_Enterprises=. Fed_Gov_Enterprises=. State_Local_Enterprises=. Other_NonFarm_UPFW=.&lt;/P&gt;&lt;P&gt;Other_NonFarm_Proprietors=. _ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;NOTE: 1 record was read from the infile TABLE3.&lt;/P&gt;&lt;P&gt;The minimum record length was 630.&lt;/P&gt;&lt;P&gt;The maximum record length was 630.&lt;/P&gt;&lt;P&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TABLE4 has 0 observations and 16 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.04 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After all this is run, the Lib1 library is empty and only Table1 and Table4 are generated in SAS.&amp;nbsp; Both have 0 observations.&amp;nbsp; I'm using SAS 9.4 via Windowing Environment on Windows 10.&amp;nbsp; If possible, please let me know how to successfully get the data from the Excel sheet to a SAS table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2019 15:26:03 GMT</pubDate>
    <dc:creator>DrakePalmer</dc:creator>
    <dc:date>2019-08-28T15:26:03Z</dc:date>
    <item>
      <title>How do I import Excel data from a webpage?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584608#M14203</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to access data in SAS from the Excel workbook at the following location:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workbook has multiple sheets, and ideally I'd like to be able to reference them individually.&amp;nbsp; For starters I'm trying to pull cells A9:P298 from the Employment sheet and arrange the data according to the existing Excel columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my first attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Lib1 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xlsx&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.Table1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Lib&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Employment"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW Other_NonFarm_Proprietors;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the log for this attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 libname Lib1 xlsx "&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;";&lt;/P&gt;&lt;P&gt;NOTE: Libref LIB1 was successfully assigned as follows:&lt;/P&gt;&lt;P&gt;Engine: XLSX&lt;/P&gt;&lt;P&gt;Physical Name: &lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3 data work.Table1;&lt;/P&gt;&lt;P&gt;4 infile Lib1."Employment";&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;201&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.&lt;/P&gt;&lt;P&gt;ERROR 201-322: The option is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;5 input freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces&lt;/P&gt;&lt;P&gt;5 ! Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business&lt;/P&gt;&lt;P&gt;5 ! Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW&lt;/P&gt;&lt;P&gt;5 ! Other_NonFarm_Proprietors;&lt;/P&gt;&lt;P&gt;6 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.TABLE1 may be incomplete. When this step was stopped there were 0&lt;/P&gt;&lt;P&gt;observations and 16 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.03 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my second attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;import&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datafile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Y:\SAS\Load\us_total_hrs_emp.xlsx"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dbms&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = xlsx&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = work.Table2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;sheet&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Employment"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;range&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"EmploymentA9:P298"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;getnames&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = no;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because proc import does not work with web locations, I saved the file locally and refer to that location here.&amp;nbsp; I would prefer to call directly from the web and not have to do this, but I can if need be.&amp;nbsp; Here is the log for this attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7 proc import&lt;/P&gt;&lt;P&gt;8 datafile = "Y:\SAS\Load\us_total_hrs_emp.xlsx"&lt;/P&gt;&lt;P&gt;9 dbms = xlsx&lt;/P&gt;&lt;P&gt;10 out = work.Table2&lt;/P&gt;&lt;P&gt;11 replace;&lt;/P&gt;&lt;P&gt;12 sheet = "Employment";&lt;/P&gt;&lt;P&gt;13 range = "EmploymentA9:P298";&lt;/P&gt;&lt;P&gt;14 getnames = no;&lt;/P&gt;&lt;P&gt;15 run;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;ERROR: An exception has been encountered.&lt;/P&gt;&lt;P&gt;Please contact technical support and provide them with the following traceback information:&lt;/P&gt;&lt;P&gt;The SAS task name is [IMPORT]&lt;/P&gt;&lt;P&gt;ERROR: Read Access Violation IMPORT&lt;/P&gt;&lt;P&gt;Exception occurred at (0DD5A7B3)&lt;/P&gt;&lt;P&gt;Task Traceback&lt;/P&gt;&lt;P&gt;Address Frame (DBGHELP API Version 4.0 rev 5)&lt;/P&gt;&lt;P&gt;000000000DD5A7B3 000000000DD3D6D0 sasimxlx:tkvercn1+0x19773&lt;/P&gt;&lt;P&gt;000000000DD56419 000000000DD3E210 sasimxlx:tkvercn1+0x153D9&lt;/P&gt;&lt;P&gt;000000000DD469D1 000000000DD3E260 sasimxlx:tkvercn1+0x5991&lt;/P&gt;&lt;P&gt;000000000DD418DD 000000000DD3E290 sasimxlx:tkvercn1+0x89D&lt;/P&gt;&lt;P&gt;000000000D1D31D5 000000000DD3E298 sasimctr:tkvercn1+0x2195&lt;/P&gt;&lt;P&gt;000000000D1D1844 000000000DD3F640 sasimctr:tkvercn1+0x804&lt;/P&gt;&lt;P&gt;000000000D1B1352 000000000DD3F648 sasimpor:tkvercn1+0x312&lt;/P&gt;&lt;P&gt;00000000034DA066 000000000DD3FBE8 sashost:Main+0x11BA6&lt;/P&gt;&lt;P&gt;00000000034E011D 000000000DD3FF50 sashost:Main+0x17C5D&lt;/P&gt;&lt;P&gt;00007FF942054034 000000000DD3FF58 KERNEL32:BaseThreadInitThunk+0x14&lt;/P&gt;&lt;P&gt;00007FF9424B3691 000000000DD3FF88 ntdll:RtlUserThreadStart+0x21&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.07 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.07 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my third attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Table3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;temp&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;http&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;url&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = Table3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.Table4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Table3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW Other_NonFarm_Proprietors;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the log for this attempt:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;16 filename Table3 temp;&lt;/P&gt;&lt;P&gt;17&lt;/P&gt;&lt;P&gt;18 proc http&lt;/P&gt;&lt;P&gt;19 url = "&lt;A href="https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx" target="_blank" rel="noopener"&gt;https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;20 out = Table3;&lt;/P&gt;&lt;P&gt;21 run;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE HTTP used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.20 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;NOTE: 200 OK&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;23 data work.Table4;&lt;/P&gt;&lt;P&gt;24 infile Table3;&lt;/P&gt;&lt;P&gt;25 input freq $ Total_US Tot_Gen_Govt Tot_Gen_FedGovt Tot_Gen_StateGovt Armed_Forces&lt;/P&gt;&lt;P&gt;25 ! Private_Households Non_Profits Farm Nonfarm_Business Private_Nonfarm_Business&lt;/P&gt;&lt;P&gt;25 ! Tot_Gov_Enterprises Fed_Gov_Enterprises State_Local_Enterprises Other_NonFarm_UPFW&lt;/P&gt;&lt;P&gt;25 ! Other_NonFarm_Proprietors;&lt;/P&gt;&lt;P&gt;26 run;&lt;/P&gt;&lt;P&gt;NOTE: The infile TABLE3 is:&lt;/P&gt;&lt;P&gt;Filename=C:\Users\palmer_d\AppData\Local\Temp\SAS Temporary&lt;/P&gt;&lt;P&gt;Files\_TD2096_243224LT-OPT_\#LN00056,&lt;/P&gt;&lt;P&gt;RECFM=V,LRECL=32767,File Size (bytes)=173139,&lt;/P&gt;&lt;P&gt;Last Modified=28Aug2019:10:58:12,&lt;/P&gt;&lt;P&gt;Create Time=28Aug2019:10:58:12&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for Total_US in line 1 51-630.&lt;/P&gt;&lt;P&gt;NOTE: LOST CARD.&lt;/P&gt;&lt;P&gt;NOTE: Invalid data errors for file TABLE3 occurred outside the printed range.&lt;/P&gt;&lt;P&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/P&gt;&lt;P&gt;freq=PK&amp;#3;&amp;#4;&amp;#20; &amp;#6; Total_US=. Tot_Gen_Govt=. Tot_Gen_FedGovt=. Tot_Gen_StateGovt=. Armed_Forces=.&lt;/P&gt;&lt;P&gt;Private_Households=. Non_Profits=. Farm=. Nonfarm_Business=. Private_Nonfarm_Business=.&lt;/P&gt;&lt;P&gt;Tot_Gov_Enterprises=. Fed_Gov_Enterprises=. State_Local_Enterprises=. Other_NonFarm_UPFW=.&lt;/P&gt;&lt;P&gt;Other_NonFarm_Proprietors=. _ERROR_=1 _N_=1&lt;/P&gt;&lt;P&gt;NOTE: 1 record was read from the infile TABLE3.&lt;/P&gt;&lt;P&gt;The minimum record length was 630.&lt;/P&gt;&lt;P&gt;The maximum record length was 630.&lt;/P&gt;&lt;P&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TABLE4 has 0 observations and 16 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.04 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After all this is run, the Lib1 library is empty and only Table1 and Table4 are generated in SAS.&amp;nbsp; Both have 0 observations.&amp;nbsp; I'm using SAS 9.4 via Windowing Environment on Windows 10.&amp;nbsp; If possible, please let me know how to successfully get the data from the Excel sheet to a SAS table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 15:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584608#M14203</guid>
      <dc:creator>DrakePalmer</dc:creator>
      <dc:date>2019-08-28T15:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import Excel data from a webpage?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584675#M14218</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;/* --------------------------------------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;PROC IMPORT reads the data directly from the Excel source file.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;The range is defined to start at row 9 because the data starts there&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-------------------------------------------------------------------- */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;%let path=provide_your_path_here;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;PROC IMPORT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;DATAFILE="&amp;amp;path.\us_total_hrs_emp.xlsx"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;OUT=WORK.us_total_hrs_emp&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;REPLACE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;DBMS=EXCEL;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;RANGE="Employment$A9:P298";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;GETNAMES=NO;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RUN;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;/* --------------------------------------------------------------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;PROC DATASETS modifies the attributes of the columns within the&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;output data set.&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;The label statement uses the information from rows &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;6, 7 and 8 from&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;the excel file.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-------------------------------------------------------------------- */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;PROC DATASETS LIBRARY=WORK NOLIST;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;MODIFY us_total_hrs_emp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;FORMAT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F1 $CHAR6.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F2 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F3 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F4 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F5 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F6 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F7 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F8 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F9 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F10 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F11 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F12 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F13 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F14 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F15 F12.3&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F16 F12.3 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;INFORMAT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F1 $CHAR6.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F2 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F3 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F4 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F5 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F6 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F7 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F8 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F9 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F10 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F11 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F12 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F13 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F14 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F15 BEST12.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F16 BEST12. ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;LABEL&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F1 = "Sector - Worker coverage (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F2 = "Total U.S. Economy - all workers (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F3 = "General Government - [Total Govt. - Govt. Enterprises] - total employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F4 = "General Government - [Total Govt. - Govt. Enterprises] - federal employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F5 = 'General Government - [Total Govt. - Govt. Enterprises] - state &amp;amp; local employees (millions of jobs)'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F6 = "Armed Forces - personnel (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F7 = "Private Households - employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F8 = "Nonprofit Institutions - employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F9 = "Farm - all workers (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F10 = "Nonfarm Business sector - Total - all workers (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F11 = "Nonfarm Business sector - Private Nonfarm sector (excluding nonprofit institutions) - employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F12 = "Nonfarm Business sector - Government Enterprises - total employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F13 = "Nonfarm Business sector - Government Enterprises - federal employees (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F14 = 'Nonfarm Business sector - Government Enterprises - state &amp;amp; local employees (millions of jobs)'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F15 = "Nonfarm Business sector - Nonfarm non-employees - unpaid family workers (millions of jobs)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; F16 = "Nonfarm Business sector - Nonfarm non-employees - proprietors (millions of jobs)" ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;QUIT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Have a look at the following paper if you have time:&amp;nbsp;&lt;A href="https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/TASS/Sukloff-ImportingExcel-Fall2015.pdf" target="_self"&gt;https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/TASS/Sukloff-ImportingExcel-Fall2015.pdf&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 17:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584675#M14218</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-08-28T17:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import Excel data from a webpage?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584800#M14230</link>
      <description>&lt;P&gt;Thanks, this works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since it's only for locally saved files, is there a way to access the file through the link and save it locally using SAS?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 21:45:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584800#M14230</guid>
      <dc:creator>DrakePalmer</dc:creator>
      <dc:date>2019-08-28T21:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I import Excel data from a webpage?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584819#M14231</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;This code saves the file locally, and then uses a variation of the earlier PROC IMPORT code to import the file:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any validmemname=extend;

filename xlsxfile 'C:\temp\us_total_hrs_emp.xlsx';

filename resphdr temp;

proc http url='https://www.bls.gov/lpc/special_requests/us_total_hrs_emp.xlsx'
  out=xlsxfile
  headerout=resphdr;
run; quit;

proc import
  file=xlsxfile
  out=work.us_total_hrs_emp
  replace
  dbms=xlsx;
  range='Employment$a8:p298';
  getnames=yes;
run; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;You can add a PROC DATASETS step to change the names and/or labels.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 00:39:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-import-Excel-data-from-a-webpage/m-p/584819#M14231</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2019-08-29T00:39:35Z</dc:date>
    </item>
  </channel>
</rss>

