LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 29 Feb 2008 05:39:31 -0800
Reply-To:   Peter <crawfordsoftware@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Peter <crawfordsoftware@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: maximize number of decimals when using DDE triplets to import
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset=ISO-8859-1

On 28 Feb, 19:43, hs AT dc-sug DOT org ("Howard Schreier)" wrote: > On Thu, 28 Feb 2008 11:23:44 -0800, nchapi...@YAHOO.COM wrote: > >On Feb 15, 11:30 am, nchapi...@yahoo.com wrote: > >> I like to export my excel datasets using the DDE triplets. To those > >> who are not familiar with that, here you have an example code. You > >> need to have the excel file open: > > >> DATA feeddata; > >> INFILE XLSdata; > >> FILENAME xlsdata dde "Excel|[Book8]big intervals!R2C1:R947C7"; > >> INPUT cow day parity treat meal; > > >> Due to excel rows restriction, I have my dataset divided into 200 > >> hundred excel sheets that I got from an automatic device. I want to > >> put them together in order to summarize them with SAS. Is there any > >> way to import them in an efficient way? With the DDE triplet method, I > >> should open all the files (indeed, not at the same time) and write 200 > >> hundred pieces of codes... > > >> thanks in advance! > > >By the way, how can I import all the decimals that I see in Excel when > >I use the DDE triplet method. > >I mean, in my excel file there are like 20 decimals, and when I import > >that to SAS, I get fewer.... > > DDE "sees" the *formatted* values in spreadsheet cells, so you need to > change the numeric formats in your worksheet.- Hide quoted text - > > - Show quoted text -

If the dde ranges can be "named", then with SAS/Access to ODBC or SAS/ Access to PC Files you could treat the workbook as a bound library. Use code like : libname wbook 'that excel workbook.xls' ; data collected ; set wbook.range1 wbook.range2 wbook.range3 ,,,,, ,,,,, wbook.range200 ; run;

If they cannot be "named", the libname method might still work. Try libname wbook 'that excel workbook.xls' ; proc contents data= wbook._all_; run;

That will show up the default interpretation the excel libname engine will assume. The On-line doc for SAS/Access tp PC Files, shows the considerable range of options available to support and improve on that interpretation of the data that is in excel.

The syntax for the odbc libname engine is just a little different.

PeterC


Back to: Top of message | Previous page | Main SAS-L page