<?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 Importing issues - .Xlsb file(Excel Binary format) into SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315605#M270863</link>
    <description>&lt;P&gt;I am trying to import .xlsb excel files into sas using below code. This code works perfectly for xlsm &amp;amp; Xlsx format files but it is not working for .xlsb files.Please assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xlsFile1 XLSX "/path/file_name.xlsb";
options validvarname=v7;
options SYMBOLGEN MPRINT;
options errorabend;



PROC SQL;
    create table  work.raw_data as 
	(select * from xlsFile1.data);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Could not find 'workbook' entry in xlsx file.  rc=8014900E (-2146136050)
Requested Input File Is Invalid&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Nov 2016 17:00:35 GMT</pubDate>
    <dc:creator>jayakumarmm</dc:creator>
    <dc:date>2016-11-30T17:00:35Z</dc:date>
    <item>
      <title>Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315605#M270863</link>
      <description>&lt;P&gt;I am trying to import .xlsb excel files into sas using below code. This code works perfectly for xlsm &amp;amp; Xlsx format files but it is not working for .xlsb files.Please assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xlsFile1 XLSX "/path/file_name.xlsb";
options validvarname=v7;
options SYMBOLGEN MPRINT;
options errorabend;



PROC SQL;
    create table  work.raw_data as 
	(select * from xlsFile1.data);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Could not find 'workbook' entry in xlsx file.  rc=8014900E (-2146136050)
Requested Input File Is Invalid&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 17:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315605#M270863</guid>
      <dc:creator>jayakumarmm</dc:creator>
      <dc:date>2016-11-30T17:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315619#M270864</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Here are three solutions

 ___ __  __ _
|_ _|  \/  | |
 | || |\/| | |
 | || |  | | |___
|___|_|  |_|_____|

proc iml;
submit / R;
library(RODBC);
wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
data &amp;lt;- sqlFetch(con2, "class");
data;
endsubmit;
call importdatasetfromr('data','data');
quit;

 ____
|  _ \
| |_) |
|  _ &amp;lt;
|_| \_\

%utl_submit_r64('
library(RODBC);
wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
data &amp;lt;- sqlFetch(con2, "classxlb");
data;
');

&amp;gt; library(RODBC);wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
data &amp;lt;- sqlFetch(con2, "classxlb");
data;

      NAME SEX AGE HEIGHT WEIGHT
1   Alfred   M  14   69.0  112.5
2    Alice   F  13   56.5   84.0
3  Barbara   F  13   65.3   98.0
4    Carol   F  14   62.8  102.5
5    Henry   M  14   63.5  102.5
6    James   M  12   57.3   83.0
7     Jane   F  12   59.8   84.5
8    Janet   F  15   62.5  112.5
9  Jeffrey   M  13   62.5   84.0
10    John   M  12   59.0   99.5
11   Joyce   F  11   51.3   50.5
12    Judy   F  14   64.3   90.0
13  Louise   F  12   56.3   77.0
14    Mary   F  15   66.5  112.0
15  Philip   M  16   72.0  150.0
16  Robert   M  12   64.8  128.0
17  Ronald   M  15   67.0  133.0
18  Thomas   M  11   57.5   85.0
19 William   M  15   66.5  112.0
&amp;gt;
__        ______  ____
\ \      / /  _ \/ ___|
 \ \ /\ / /| |_) \___ \
  \ V  V / |  __/ ___) |
   \_/\_/  |_|   |____/


%utl_submit_wps64('
options set=R_HOME "C:/Program Files/R/R-3.2.4";
libname saswork "%sysfunc(pathname(work))";
proc r;
submit;
library(RODBC);
wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
classxlb &amp;lt;- sqlFetch(con2, "classxlb");
classxlb;
endsubmit;
import r=classxlb data=saswork.classxlb;
run;quit;
');

proc print data=classxlb;
run;quit;

Up to 40 obs from classxlb total obs=19

Obs    NAME       SEX    AGE    HEIGHT    WEIGHT

  1    Alfred      M      14     69.0      112.5
  2    Alice       F      13     56.5       84.0
  3    Barbara     F      13     65.3       98.0
  4    Carol       F      14     62.8      102.5
  5    Henry       M      14     63.5      102.5
  6    James       M      12     57.3       83.0
  7    Jane        F      12     59.8       84.5
  8    Janet       F      15     62.5      112.5
  9    Jeffrey     M      13     62.5       84.0
 10    John        M      12     59.0       99.5
 11    Joyce       F      11     51.3       50.5
 12    Judy        F      14     64.3       90.0
 13    Louise      F      12     56.3       77.0
 14    Mary        F      15     66.5      112.0
 15    Philip      M      16     72.0      150.0
 16    Robert      M      12     64.8      128.0
 17    Ronald      M      15     67.0      133.0
 18    Thomas      M      11     57.5       85.0
 19    William     M      15     66.5      112.0



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 17:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315619#M270864</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-11-30T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315620#M270865</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Here are three solutions

 ___ __  __ _
|_ _|  \/  | |
 | || |\/| | |
 | || |  | | |___
|___|_|  |_|_____|

proc iml;
submit / R;
library(RODBC);
wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
data &amp;lt;- sqlFetch(con2, "class");
data;
endsubmit;
call importdatasetfromr('data','data');
quit;

 ____
|  _ \
| |_) |
|  _ &amp;lt;
|_| \_\

%utl_submit_r64('
library(RODBC);
wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
data &amp;lt;- sqlFetch(con2, "classxlb");
data;
');

&amp;gt; library(RODBC);wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
data &amp;lt;- sqlFetch(con2, "classxlb");
data;

      NAME SEX AGE HEIGHT WEIGHT
1   Alfred   M  14   69.0  112.5
2    Alice   F  13   56.5   84.0
3  Barbara   F  13   65.3   98.0
4    Carol   F  14   62.8  102.5
5    Henry   M  14   63.5  102.5
6    James   M  12   57.3   83.0
7     Jane   F  12   59.8   84.5
8    Janet   F  15   62.5  112.5
9  Jeffrey   M  13   62.5   84.0
10    John   M  12   59.0   99.5
11   Joyce   F  11   51.3   50.5
12    Judy   F  14   64.3   90.0
13  Louise   F  12   56.3   77.0
14    Mary   F  15   66.5  112.0
15  Philip   M  16   72.0  150.0
16  Robert   M  12   64.8  128.0
17  Ronald   M  15   67.0  133.0
18  Thomas   M  11   57.5   85.0
19 William   M  15   66.5  112.0
&amp;gt;
__        ______  ____
\ \      / /  _ \/ ___|
 \ \ /\ / /| |_) \___ \
  \ V  V / |  __/ ___) |
   \_/\_/  |_|   |____/


%utl_submit_wps64('
options set=R_HOME "C:/Program Files/R/R-3.2.4";
libname saswork "%sysfunc(pathname(work))";
proc r;
submit;
library(RODBC);
wb &amp;lt;- "d:/xls/class.xlsb";
con2 &amp;lt;- odbcConnectExcel2007(wb);
classxlb &amp;lt;- sqlFetch(con2, "classxlb");
classxlb;
endsubmit;
import r=classxlb data=saswork.classxlb;
run;quit;
');

proc print data=classxlb;
run;quit;

Up to 40 obs from classxlb total obs=19

Obs    NAME       SEX    AGE    HEIGHT    WEIGHT

  1    Alfred      M      14     69.0      112.5
  2    Alice       F      13     56.5       84.0
  3    Barbara     F      13     65.3       98.0
  4    Carol       F      14     62.8      102.5
  5    Henry       M      14     63.5      102.5
  6    James       M      12     57.3       83.0
  7    Jane        F      12     59.8       84.5
  8    Janet       F      15     62.5      112.5
  9    Jeffrey     M      13     62.5       84.0
 10    John        M      12     59.0       99.5
 11    Joyce       F      11     51.3       50.5
 12    Judy        F      14     64.3       90.0
 13    Louise      F      12     56.3       77.0
 14    Mary        F      15     66.5      112.0
 15    Philip      M      16     72.0      150.0
 16    Robert      M      12     64.8      128.0
 17    Ronald      M      15     67.0      133.0
 18    Thomas      M      11     57.5       85.0
 19    William     M      15     66.5      112.0



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 17:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315620#M270865</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-11-30T17:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315622#M270866</link>
      <description>Left out code and manual operation to create xlsb workbook&lt;BR /&gt;&lt;BR /&gt;* create an xlsx dataset;&lt;BR /&gt;libname xel "d:/xls/class.xlsx";&lt;BR /&gt;data xel.classxlb;&lt;BR /&gt;set sashelp.class;&lt;BR /&gt;run;quit;&lt;BR /&gt;libname xel clear;&lt;BR /&gt;&lt;BR /&gt;* open and save as xlsb;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Nov 2016 17:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315622#M270866</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-11-30T17:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315625#M270867</link>
      <description>Thanks a lot for your multiple solutions to address this issue. I am using SAS EG linux environment, please let me know whether these solutions are environment compatible i.e. Linux or Windows</description>
      <pubDate>Wed, 30 Nov 2016 18:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315625#M270867</guid>
      <dc:creator>jayakumarmm</dc:creator>
      <dc:date>2016-11-30T18:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315630#M270868</link>
      <description>&lt;P&gt;xlsb is a binary format that does not follow the "XML in ZIP" principle (which is openly documented) of xlsx and needs (just like the old formats) a MS module to open. This module is not available on UNIX.&lt;/P&gt;
&lt;P&gt;Bottom line: while xlsx is just not suited as a data transfer format (see the gazillion of SAS community threads about this), xlsb is unusable.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 18:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315630#M270868</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-30T18:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issues - .Xlsb file(Excel Binary format) into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315978#M270869</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;To read and write native Excel files you must license and install the SAS/ACCESS Interface to PC Files:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acpcref/69731/HTML/default/viewer.htm#titlepage.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acpcref/69731/HTML/default/viewer.htm#titlepage.htm&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I started a PC Files Server on a Windows machine, placed an XLSB file in C:\temp\ on that same Windows machine, and then successfully ran this code from SAS Enterprise Guide connected to a Linux server running SAS 9.4 M3:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc import out=work.class&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; file='C:\temp\Class.xlsb'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; replace&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; dbms=excelcs;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; server='&lt;EM&gt;my.domain.com&lt;/EM&gt;';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; port=9621;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run; quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&amp;nbsp;&lt;/FONT&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 15:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issues-Xlsb-file-Excel-Binary-format-into-SAS/m-p/315978#M270869</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2016-12-01T15:42:25Z</dc:date>
    </item>
  </channel>
</rss>

