<?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 Re: libname oledb to import Excel files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116875#M24132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with using the OLDB engine but I use the Excel engine quite a bit.&amp;nbsp; I don't work with password-protected spreadsheets and I don't work with .xlsb files but I _think_ it has an option that allows you to pass a password to Excel. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the documentation on the Excel libname engine.&amp;nbsp; You'll likely have to rework your code to use the Excel engine but it might be a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip about password-protected files throwing this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Feb 2013 14:51:59 GMT</pubDate>
    <dc:creator>bentleyj1</dc:creator>
    <dc:date>2013-02-22T14:51:59Z</dc:date>
    <item>
      <title>libname oledb to import Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116873#M24130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAS-Users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the code below to access lots of Excel files that we receive from our subsidiaries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname myxls oledb access=readonly provider="Microsoft.ACE.OLEDB.12.0"&lt;/P&gt;&lt;P&gt;properties=("data source"="&amp;amp;fullname" "Mode"="Read")&lt;/P&gt;&lt;P&gt;provider_string="Excel 12.0;ReadOnly=True;HDR=no;IMEX=1;"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel files are in .xlsb format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for some files i get the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Error trying to establish connection: Unable to Initialize: External table is not in the expected format.&lt;/P&gt;&lt;P&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These problem Excel files are opening in Excel without any errors.&lt;/P&gt;&lt;P&gt;I tried to open file in Excel and save it as another copy. But it does not help.&lt;/P&gt;&lt;P&gt;The only way i found :&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Open file in Excel&lt;/P&gt;&lt;P&gt;2. Copy and paste only values (paste special) to another file.&lt;/P&gt;&lt;P&gt;3. Save this new file and then import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope someone knows how to solve this problem. May be i missed some option in the libname statement.&lt;/P&gt;&lt;P&gt;Files are hundreds and it is very difficult manually copy/paste data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 12:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116873#M24130</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2013-02-21T12:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: libname oledb to import Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116874#M24131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I find out that error files have protected structure enabled with a password.&lt;/P&gt;&lt;P&gt;I googled some information about this protection. Programmers (non-SAS) say that it is not possible to make an OLEDB access to protected Excel files.&lt;/P&gt;&lt;P&gt;I can not use DDE unfortunatly. I am running EG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 07:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116874#M24131</guid>
      <dc:creator>Oleg_L</dc:creator>
      <dc:date>2013-02-22T07:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: libname oledb to import Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116875#M24132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with using the OLDB engine but I use the Excel engine quite a bit.&amp;nbsp; I don't work with password-protected spreadsheets and I don't work with .xlsb files but I _think_ it has an option that allows you to pass a password to Excel. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the documentation on the Excel libname engine.&amp;nbsp; You'll likely have to rework your code to use the Excel engine but it might be a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip about password-protected files throwing this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 14:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libname-oledb-to-import-Excel-files/m-p/116875#M24132</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2013-02-22T14:51:59Z</dc:date>
    </item>
  </channel>
</rss>

