<?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 Reading Excel files without extension? in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46491#M702</link>
    <description>Good morning folks – I need your advice.&lt;BR /&gt;
&lt;BR /&gt;
I have a macro that reads a single worksheet out of a group of Excel files that change both in number and content on a regular basis.&lt;BR /&gt;
&lt;BR /&gt;
Historically, these files have been located on a shared drive.  When our laboratory document management system became available, I moved the files in there because they were accessible by the same filename using a UNC path.&lt;BR /&gt;
&lt;BR /&gt;
Unfortunately, the document management system was recently changed, and direct access is now by URL.  To make things more complicated, the files are now stored as a section title and number that has no extension (something like LAB_000000000).  The original filename is stored in an Oracle table I can see, so I can get the storage name (dDocName).&lt;BR /&gt;
&lt;BR /&gt;
I have successfully used a FILENAME URL statement to read a .csv file from the new system, but have not able to find any documentation or examples of FILENAME with LIBNAME when reading an Excel file under Windows.  I am running a remote session to a server with SAS 9.2 (TS2M0), and SAS/ACCESS for Oracle and PC File Formats. &lt;BR /&gt;
&lt;BR /&gt;
To see a single Excel file in our previous document management system, I used the following: &lt;BR /&gt;
&lt;BR /&gt;
LIBNAME GETIT EXCEL "\\dmsprod2\labs\Project Manager\PM_lightfile_001.xlsx"  access=readonly ;&lt;BR /&gt;
  DATA README  ; &lt;BR /&gt;
        SET GETIT.'FINAL$'n  ;&lt;BR /&gt;
  RUN ;&lt;BR /&gt;
LIBNAME GETIT CLEAR ; RUN ;&lt;BR /&gt;
&lt;BR /&gt;
In the new document management system, the file PM_lightfile_001.xlsx corresponds to something like this: &lt;BR /&gt;
&lt;A href="http://ecm.ouragency.com/ecm/idcplg?IdcService=GET_FILE&amp;amp;RevisionSelectionMethod=Latest&amp;amp;dDocName=LAB_000263478" target="_blank"&gt;http://ecm.ouragency.com/ecm/idcplg?IdcService=GET_FILE&amp;amp;RevisionSelectionMethod=Latest&amp;amp;dDocName=LAB_000263478&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
However, I could not get past the extension problem to tell if the URL was a problem or not. &lt;BR /&gt;
&lt;BR /&gt;
I then went back to the original drive method, and established copies of the same Excel file with and without the .xlsx extension.  The version without the extension does not work (log below).&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have experience with this, or could you please point me to an example or two? Going back to text files is not an option, and I would prefer not to pull all these files back out of the document management system onto a drive.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any advice or help you can give me.&lt;BR /&gt;
&lt;BR /&gt;
Wendy T.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
19   %LET NAMO = &amp;amp;data_req.\PM_lightfile_001.xlsx ;&lt;BR /&gt;
20   libname GETIT excel "&amp;amp;NAMO" access=readonly ;&lt;BR /&gt;
NOTE: Libref GETIT was successfully assigned as follows:&lt;BR /&gt;
      Engine:        EXCEL&lt;BR /&gt;
      Physical Name: \\palfile\sjrx\ES\IRL\IRLDB\data_req\PM_lightfile_001.xlsx&lt;BR /&gt;
21    DATA README   ;&lt;BR /&gt;
22       SET GETIT.'FINAL$'n  ;&lt;BR /&gt;
23   RUN ;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 208 observations read from the data set GETIT.'FINAL$'n.&lt;BR /&gt;
NOTE: The data set WORK.README has 208 observations and 19 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.13 seconds&lt;BR /&gt;
      cpu time            0.10 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
24   LIBNAME GETIT CLEAR ;&lt;BR /&gt;
NOTE: Libref GETIT has been deassigned.&lt;BR /&gt;
24 !                       RUN ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
25   %LET NAMO = &amp;amp;data_req.\PM_lightfile_001 ;&lt;BR /&gt;
26   libname GETIT excel "&amp;amp;NAMO" access=readonly ;&lt;BR /&gt;
ERROR: ERROR: File extension  specified is invalid.&lt;BR /&gt;
ERROR: Error in the LIBNAME statement.&lt;BR /&gt;
27    DATA README   ;&lt;BR /&gt;
28       SET GETIT.'FINAL$'n  ;&lt;BR /&gt;
ERROR: Libname GETIT is not assigned.&lt;BR /&gt;
29   RUN ;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
WARNING: The data set WORK.README may be incomplete.  When this step was&lt;BR /&gt;
         stopped there were 0 observations and 0 variables.&lt;BR /&gt;
WARNING: Data set WORK.README was not replaced because this step was stopped.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.03 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
30   LIBNAME GETIT CLEAR ;&lt;BR /&gt;
WARNING: Libname GETIT is not assigned.&lt;BR /&gt;
30 !                       RUN ;</description>
    <pubDate>Mon, 25 Jan 2010 15:56:57 GMT</pubDate>
    <dc:creator>WendyT</dc:creator>
    <dc:date>2010-01-25T15:56:57Z</dc:date>
    <item>
      <title>Reading Excel files without extension?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46491#M702</link>
      <description>Good morning folks – I need your advice.&lt;BR /&gt;
&lt;BR /&gt;
I have a macro that reads a single worksheet out of a group of Excel files that change both in number and content on a regular basis.&lt;BR /&gt;
&lt;BR /&gt;
Historically, these files have been located on a shared drive.  When our laboratory document management system became available, I moved the files in there because they were accessible by the same filename using a UNC path.&lt;BR /&gt;
&lt;BR /&gt;
Unfortunately, the document management system was recently changed, and direct access is now by URL.  To make things more complicated, the files are now stored as a section title and number that has no extension (something like LAB_000000000).  The original filename is stored in an Oracle table I can see, so I can get the storage name (dDocName).&lt;BR /&gt;
&lt;BR /&gt;
I have successfully used a FILENAME URL statement to read a .csv file from the new system, but have not able to find any documentation or examples of FILENAME with LIBNAME when reading an Excel file under Windows.  I am running a remote session to a server with SAS 9.2 (TS2M0), and SAS/ACCESS for Oracle and PC File Formats. &lt;BR /&gt;
&lt;BR /&gt;
To see a single Excel file in our previous document management system, I used the following: &lt;BR /&gt;
&lt;BR /&gt;
LIBNAME GETIT EXCEL "\\dmsprod2\labs\Project Manager\PM_lightfile_001.xlsx"  access=readonly ;&lt;BR /&gt;
  DATA README  ; &lt;BR /&gt;
        SET GETIT.'FINAL$'n  ;&lt;BR /&gt;
  RUN ;&lt;BR /&gt;
LIBNAME GETIT CLEAR ; RUN ;&lt;BR /&gt;
&lt;BR /&gt;
In the new document management system, the file PM_lightfile_001.xlsx corresponds to something like this: &lt;BR /&gt;
&lt;A href="http://ecm.ouragency.com/ecm/idcplg?IdcService=GET_FILE&amp;amp;RevisionSelectionMethod=Latest&amp;amp;dDocName=LAB_000263478" target="_blank"&gt;http://ecm.ouragency.com/ecm/idcplg?IdcService=GET_FILE&amp;amp;RevisionSelectionMethod=Latest&amp;amp;dDocName=LAB_000263478&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
However, I could not get past the extension problem to tell if the URL was a problem or not. &lt;BR /&gt;
&lt;BR /&gt;
I then went back to the original drive method, and established copies of the same Excel file with and without the .xlsx extension.  The version without the extension does not work (log below).&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have experience with this, or could you please point me to an example or two? Going back to text files is not an option, and I would prefer not to pull all these files back out of the document management system onto a drive.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any advice or help you can give me.&lt;BR /&gt;
&lt;BR /&gt;
Wendy T.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
19   %LET NAMO = &amp;amp;data_req.\PM_lightfile_001.xlsx ;&lt;BR /&gt;
20   libname GETIT excel "&amp;amp;NAMO" access=readonly ;&lt;BR /&gt;
NOTE: Libref GETIT was successfully assigned as follows:&lt;BR /&gt;
      Engine:        EXCEL&lt;BR /&gt;
      Physical Name: \\palfile\sjrx\ES\IRL\IRLDB\data_req\PM_lightfile_001.xlsx&lt;BR /&gt;
21    DATA README   ;&lt;BR /&gt;
22       SET GETIT.'FINAL$'n  ;&lt;BR /&gt;
23   RUN ;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: There were 208 observations read from the data set GETIT.'FINAL$'n.&lt;BR /&gt;
NOTE: The data set WORK.README has 208 observations and 19 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.13 seconds&lt;BR /&gt;
      cpu time            0.10 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
24   LIBNAME GETIT CLEAR ;&lt;BR /&gt;
NOTE: Libref GETIT has been deassigned.&lt;BR /&gt;
24 !                       RUN ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
25   %LET NAMO = &amp;amp;data_req.\PM_lightfile_001 ;&lt;BR /&gt;
26   libname GETIT excel "&amp;amp;NAMO" access=readonly ;&lt;BR /&gt;
ERROR: ERROR: File extension  specified is invalid.&lt;BR /&gt;
ERROR: Error in the LIBNAME statement.&lt;BR /&gt;
27    DATA README   ;&lt;BR /&gt;
28       SET GETIT.'FINAL$'n  ;&lt;BR /&gt;
ERROR: Libname GETIT is not assigned.&lt;BR /&gt;
29   RUN ;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
WARNING: The data set WORK.README may be incomplete.  When this step was&lt;BR /&gt;
         stopped there were 0 observations and 0 variables.&lt;BR /&gt;
WARNING: Data set WORK.README was not replaced because this step was stopped.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.03 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
30   LIBNAME GETIT CLEAR ;&lt;BR /&gt;
WARNING: Libname GETIT is not assigned.&lt;BR /&gt;
30 !                       RUN ;</description>
      <pubDate>Mon, 25 Jan 2010 15:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46491#M702</guid>
      <dc:creator>WendyT</dc:creator>
      <dc:date>2010-01-25T15:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel files without extension?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46492#M703</link>
      <description>It seems to me that now you must read an Oracle table, not an Excel workbook?  How have other individual you work with addressed the need to retrieve "objects", given the system change?&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 25 Jan 2010 17:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46492#M703</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-25T17:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel files without extension?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46493#M704</link>
      <description>Scott-&lt;BR /&gt;
&lt;BR /&gt;
So sorry I was unclear in my original post.  &lt;BR /&gt;
&lt;BR /&gt;
I am generating a list of filenames that conform to a pattern (PM_lightfile_*.xlsx) to feed a macro that uses that list to open an Excel file, read data from one worksheet, close the Excel file, and add the data to a SAS dataset (until it runs out of filenames).  &lt;BR /&gt;
&lt;BR /&gt;
The rest of the program then massages the data and preps it to be matched with other data I download directly from our in-house Oracle database. All of this takes place as scheduled jobs in the early morning. &lt;BR /&gt;
&lt;BR /&gt;
I have no problems reading the Oracle table to get the list of storage filenames (dDocName) that correspond to the actual filenames (dOriginalName) I need.  &lt;BR /&gt;
&lt;BR /&gt;
An original filename like 'myfile.xlsx' would actually be stored as something like LAB_12345.  If I put in http:/blah blah blah/LAB_12345 in a browser, it opens up the Excel file.  If I put in http:/blah blah blah/myfile.xlsx in a browser, it says that the file is unknown. I have absolutely no idea how it happens, but the IR folks assure me that it's internal to the document management software.&lt;BR /&gt;
&lt;BR /&gt;
Problem #1 is that the storage 'dDocName' (LAB_12345) has no extension, and I can't seem to find a way to get SAS to recognize the Excel file without the extension even though I'm explicitly specifying Excel in the LIBNAME.&lt;BR /&gt;
&lt;BR /&gt;
Problem #2 is that I can't find if I can use a FILENAME URL substitution in the LIBNAME statement for Excel.  Of course, if I can't find a workaround for the lack of extension on the storage filename, this becomes a moot point.&lt;BR /&gt;
&lt;BR /&gt;
I'm the first person to deal with this, as I set up the UNC path to the old system as a drive mapping on my computer, and when the change was made, the drive would no longer reconnect.  There are only a few of us that use the UNC path method to get groups of files, as we have and enforce consistent conventions for filenames.  Other folks rely on metadata and the front-end interface to look for a single file.&lt;BR /&gt;
&lt;BR /&gt;
I was hoping someone here might have run into this lack of extension before and solved the problem.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help you can give me...&lt;BR /&gt;
&lt;BR /&gt;
Wendy T</description>
      <pubDate>Mon, 25 Jan 2010 18:12:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46493#M704</guid>
      <dc:creator>WendyT</dc:creator>
      <dc:date>2010-01-25T18:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel files without extension?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46494#M705</link>
      <description>I expect you will need to revise your "fetch/open" process to be more like FTP, but possibly needing to use the URL Access Method instead, then create a local file with the appropriate file-extension.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Dictionary, &lt;BR /&gt;
FILENAME Statement, URL Access Method&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000223242.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000223242.htm&lt;/A&gt;</description>
      <pubDate>Mon, 25 Jan 2010 19:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46494#M705</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-25T19:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Excel files without extension?</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46495#M706</link>
      <description>Scott-&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for the idea - I hadn't considered ftping files back from the document management system to a drive and reading from there.&lt;BR /&gt;
&lt;BR /&gt;
Wendy T</description>
      <pubDate>Tue, 26 Jan 2010 16:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Reading-Excel-files-without-extension/m-p/46495#M706</guid>
      <dc:creator>WendyT</dc:creator>
      <dc:date>2010-01-26T16:24:27Z</dc:date>
    </item>
  </channel>
</rss>

