BookmarkSubscribeRSS Feed
jwillis
Quartz | Level 8

HI RW9,

SAS has the agility to do anything.  There are as many SAS coding styles as there are people coding SAS.  The DDE solution works today and is a solution that will also write to a specific cell in any excel spreadsheet. My coding style was developed to read from and write to specific sheets and cells in "Data Source Record" worksheets.  I have encountered all of the items listed in the SUGI proceedings paper link at least once and I am certain that once the DDE solution is no longer viable, the brilliant folks at SAS will be able to create a solution to replace the DDE method**.

SAS Community is a place where a community can come together to learn.  I monitor the community to learn new ideas, methods and solutions.  I believe the SAS DDE solution was built to solve the problem "...Excel has...a whole bunch of encoding around the variables and SAS doesn't know how to parse through it...."  I also believe that SAS will not let SAS users down.  I read your replies and I thank you for those replies.  I learn a great deal from all who reply.

**"Note that DDE may be used to create, delete, or rename spreadsheets, as well as to format worksheets and enter and delete formulas."


RW9
Diamond | Level 26 RW9
Diamond | Level 26

Whilst I am not disagreeing with you, MS has moved to the Open Office XML based format now, hence any application type of coding which can read and write text to a file should be able to do most things in Excel.  I can see one area where this is not the case, VBA macros are still held in a proprietary binary file within the XLSX.  However saying that, you could build the VBA, compile that, and then copy the file from the old XLSX into your created file before zipping up.  Note in this instance I had created all the structure, XML files and definitions manual and packaged them into a zip to create the XLSX rather than using tagsets.

PoojaM
Calcite | Level 5

Try Using something like this :

 

 

filename soy dde 'Excel|C:\Courses\Independent Study\Data\[SOYREF95.XLS]REF95!R2C2:R229C10';
data bean;
infile soy missover;
input labid $ month reps moisture abn dead abn1 abn2 abn3;
run;
proc print data=bean; run;

 

Link : http://www.ats.ucla.edu/stat/sas/library/SASRead_os.htm#ReadingExcelFilesIntoSAS

 

Thanks!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 17 replies
  • 41191 views
  • 4 likes
  • 6 in conversation