<?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: DDE Excel internal value in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26561#M510</link>
    <description>Based on the code example you posted, suggest you use an INFORMAT statement to control SAS' read-up of your V1-V8 columns, rather than taking the SAS default -- also, similar to what has been posted with an INPUT statement and having an explicit INFORMAT coded.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Mon, 14 Dec 2009 14:18:30 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-12-14T14:18:30Z</dc:date>
    <item>
      <title>DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26551#M500</link>
      <description>Hi, &lt;BR /&gt;
In Excel, I have data in cell as "123.12" or "123" This a formatted value for internal value "123.123456789" and "123"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
By DDE, I would read this kind of data without modifying the formatted value in order to have internal value in SAS (with all digit after the period)&lt;BR /&gt;
&lt;BR /&gt;
If i have only decimal value, a informat as best16.8 is sufficient&lt;BR /&gt;
If I have integer value as "123" I obtain false result as "0.00000123"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Please, who knows how to do this ?&lt;BR /&gt;
(without modifying formatted value in Excel)</description>
      <pubDate>Sun, 06 Dec 2009 17:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26551#M500</guid>
      <dc:creator>RLC</dc:creator>
      <dc:date>2009-12-06T17:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26552#M501</link>
      <description>Given what you have explained, you should not need to use BEST16.8 at all with a decimal field/value.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
x = input('123.1212',16.);&lt;BR /&gt;
y = input('123',16.);&lt;BR /&gt;
putlog _all_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument:&lt;BR /&gt;
&lt;BR /&gt;
input decimal number informat site:sas.com</description>
      <pubDate>Mon, 07 Dec 2009 00:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26552#M501</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-07T00:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26553#M502</link>
      <description>Thanks sbb, you don't understand my question&lt;BR /&gt;
&lt;BR /&gt;
Please reread this&lt;BR /&gt;
&lt;BR /&gt;
In Excel the formatted value (in the screen) is "0.12"&lt;BR /&gt;
In Excel the internal value is 0.123456&lt;BR /&gt;
&lt;BR /&gt;
In SAS the internal value is 0.12 whatever the informat use to read data&lt;BR /&gt;
&lt;BR /&gt;
In SAS I would like 0.123456 without modifying the Excel sheet&lt;BR /&gt;
&lt;BR /&gt;
I have different value in the same column as &lt;BR /&gt;
Excel internal value&lt;BR /&gt;
12&lt;BR /&gt;
12.12&lt;BR /&gt;
0.12345&lt;BR /&gt;
Excel formatted (screen) values&lt;BR /&gt;
12&lt;BR /&gt;
12.12&lt;BR /&gt;
0.12&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Roger</description>
      <pubDate>Mon, 07 Dec 2009 08:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26553#M502</guid>
      <dc:creator>RLC</dc:creator>
      <dc:date>2009-12-07T08:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26554#M503</link>
      <description>Suggest you share whatever SAS code you have tried to attempt to import your Excel data using DDE.  My point was specific to the use of an INFORMAT to control how SAS reads a data field, not specific to Excel in particular.  I would expect that when you specify an INFORMAT, you will see expected data conversion / input.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument for SAS support website:&lt;BR /&gt;
&lt;BR /&gt;
dde import excel read internal cell value site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 07 Dec 2009 15:58:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26554#M503</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-07T15:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26555#M504</link>
      <description>euh...&lt;BR /&gt;
Thank for the training about Google... &lt;BR /&gt;
&lt;BR /&gt;
I preferred a serious answer&lt;BR /&gt;
&lt;BR /&gt;
It seem that nobody knows if it's possible (Ihave a way by xml file but it is not appicable for my type of Excel sheet)&lt;BR /&gt;
&lt;BR /&gt;
I wait for SAS answer</description>
      <pubDate>Sun, 13 Dec 2009 14:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26555#M504</guid>
      <dc:creator>RLC</dc:creator>
      <dc:date>2009-12-13T14:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26556#M505</link>
      <description>As previously suggested, share your code for serious consideration.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sun, 13 Dec 2009 18:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26556#M505</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-13T18:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26557#M506</link>
      <description>&amp;gt; (without modifying formatted value in Excel)&lt;BR /&gt;
&lt;BR /&gt;
I believe the only way to achieve this using DDE is to CLEAR the formats before reading.  Which can be easliy accomplished using DDE.  &lt;BR /&gt;
&lt;BR /&gt;
Example input all values are actually 123.12345678.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
123.1	123.1	123.1234568	$123.12 &lt;BR /&gt;
123.1	123.1	123.1234568	$123.12 &lt;BR /&gt;
123.1	123.1	123.1234568	$123.12 &lt;BR /&gt;
123.1	123.1	123.1234568	$123.12 &lt;BR /&gt;
123.1	123.1	123.1234568	$123.12 &lt;BR /&gt;
123.1	123.1	123.1234568	$123.12 &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
A little DDE to read it.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data RLC;&lt;BR /&gt;
   length ddetext $128;&lt;BR /&gt;
   ddetext = 'excel|system';&lt;BR /&gt;
&lt;BR /&gt;
   file dummy1 dde filevar=ddetext;&lt;BR /&gt;
   put '[SELECT.SPECIAL(5)]';&lt;BR /&gt;
   put '[CLEAR(2)]';&lt;BR /&gt;
&lt;BR /&gt;
   ddeText = 'excel|system!Selection';&lt;BR /&gt;
   infile dummy2 dde notab dlm='09'x dsd filevar=ddeText lrecl=256;&lt;BR /&gt;
   input selection:$128.;&lt;BR /&gt;
   putlog selection;&lt;BR /&gt;
&lt;BR /&gt;
   ddeText = cats('EXCEL|',selection);   &lt;BR /&gt;
   infile dummy3 dde notab dlm='09'x dsd end=eof filevar=ddeText lrecl=256 missover;&lt;BR /&gt;
   do while(not eof);&lt;BR /&gt;
      input (f1-f4)(:f16.);&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   stop;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   format _numeric_ F16.8;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Example result&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
                                                        The SAS System                     06:27 Monday, December 14, 2009  18&lt;BR /&gt;
&lt;BR /&gt;
 Obs                 selection                                f1                  f2                  f3                  f4&lt;BR /&gt;
&lt;BR /&gt;
   1    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   2    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   3    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   4    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   5    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   6    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   7    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   8    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
   9    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  10    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  11    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  12    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  13    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  14    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  15    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  16    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
  17    [BookFormated1.xls]Sheet1!R1C1:R17C4        123.12345680        123.12345680        123.12345680        123.12345680&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 14 Dec 2009 13:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26557#M506</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-12-14T13:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26558#M507</link>
      <description>SBB, It's not a question for beginers or end SAS user&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
filename ALIRE dde "Excel|DDE01!L2C1:L100C100" ;&lt;BR /&gt;
data __p4;&lt;BR /&gt;
   infile ALIRE dlm='09'x notab dsd missover LRECL=1000000;&lt;BR /&gt;
   input N V1-V8;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print data=__p4;&lt;BR /&gt;
   format v1-v8 16.8;&lt;BR /&gt;
   run;</description>
      <pubDate>Mon, 14 Dec 2009 13:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26558#M507</guid>
      <dc:creator>RLC</dc:creator>
      <dc:date>2009-12-14T13:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26559#M508</link>
      <description>Thank Data_null_&lt;BR /&gt;
at the first reading I don't understand all the statements - I read in detail during the next weekend and inform you about the results.&lt;BR /&gt;
Thank for your participation</description>
      <pubDate>Mon, 14 Dec 2009 13:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26559#M508</guid>
      <dc:creator>RLC</dc:creator>
      <dc:date>2009-12-14T13:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26560#M509</link>
      <description>This a quasi compléte exemple of my code&lt;BR /&gt;
&lt;BR /&gt;
I have more than 100 Excel file with many sheets by workbook to read&lt;BR /&gt;
&lt;BR /&gt;
*--------------------------------------------------------------------------;&lt;BR /&gt;
options noxwait noxsync;&lt;BR /&gt;
%let EXCELexe = %str(C:\Program Files\Microsoft Office\Office11\EXCEL.EXE);&lt;BR /&gt;
filename EXCELcmd dde "EXCEL|SYSTEM";&lt;BR /&gt;
%let EXCELdat = %nrbquote(&amp;amp;RACINE\DDE);&lt;BR /&gt;
 %let CLASSEUR = %nrbquote(DDE01.xls);&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  command='"' || "&amp;amp;EXCELexe" || '"';&lt;BR /&gt;
  call system(command);&lt;BR /&gt;
  run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 x=sleep(5);&lt;BR /&gt;
 run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file EXCELcmd;&lt;BR /&gt;
  length command $ 200;&lt;BR /&gt;
  command='[app.minimize()]';&lt;BR /&gt;
  put command;&lt;BR /&gt;
  run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file EXCELcmd;&lt;BR /&gt;
  length command $ 200;&lt;BR /&gt;
  command='[open("'  ||   "&amp;amp;EXCELdat\&amp;amp;CLASSEUR"  ||   '")]';&lt;BR /&gt;
  put command;&lt;BR /&gt;
  run;&lt;BR /&gt;
&lt;BR /&gt;
filename ALIRE dde "Excel|DDE01!L2C1:L100C100" ;&lt;BR /&gt;
&lt;BR /&gt;
data __p4;&lt;BR /&gt;
   infile ALIRE dlm='09'x notab dsd missover LRECL=1000000;&lt;BR /&gt;
   input N V1-V8;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print data=__p4;&lt;BR /&gt;
   format v1-v8 16.8;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file EXCELcmd;&lt;BR /&gt;
  put '[error(false)]';&lt;BR /&gt;
  put '[quit()]';&lt;BR /&gt;
  run;</description>
      <pubDate>Mon, 14 Dec 2009 14:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26560#M509</guid>
      <dc:creator>RLC</dc:creator>
      <dc:date>2009-12-14T14:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26561#M510</link>
      <description>Based on the code example you posted, suggest you use an INFORMAT statement to control SAS' read-up of your V1-V8 columns, rather than taking the SAS default -- also, similar to what has been posted with an INPUT statement and having an explicit INFORMAT coded.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 14 Dec 2009 14:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26561#M510</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-14T14:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: DDE Excel internal value</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26562#M511</link>
      <description>This code is not for beginner or end users.  You can consult the documentation to learn the details of the SAS code.  You will need the MACROFUN documentation from MicroSoft to learn details about SELECT.SPECIAL and CLEAR.  I'm not sure where the details of EXEC|SYSTEM are documented.&lt;BR /&gt;
&lt;BR /&gt;
The code I posted assumes the XL file is open, which I see you are able to do from looking at the code you posted.&lt;BR /&gt;
&lt;BR /&gt;
No need to report the results, I know what the program does.</description>
      <pubDate>Mon, 14 Dec 2009 15:35:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/DDE-Excel-internal-value/m-p/26562#M511</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-12-14T15:35:13Z</dc:date>
    </item>
  </channel>
</rss>

