05-15-2017 11:01 AM
I am trying to save the .csv file with the same name using following data _NULL_. But my system hangs up when I use the following statements. I am using SAS 9.2 Can anybody help me in finding a solution?
filename exl dde 'excel|system';
options noxwait noxsync;
x "'C:\Program Files\Microsoft Office\Office15\EXCEL.EXE' C:\Temp\test.csv";
05-15-2017 11:05 AM
What are you actually trying to do?
And why are you trying to use DDE? DDE is not really supported and there are lots of known issues with it.
05-15-2017 11:30 AM
I am trying to save .csv file to read it back into SAS using PROC IMPORT. The reason I am doing this is that it gives me INVALID string error if I try to read the file directly using PROC IMPORT. If I save the file and then use PROC IMPORT, I don't get that error.
Is there any other way I can save the file. Please let me know.
05-15-2017 11:39 AM
Post the log from the failed import step.
Also post the test.csv, so we can play around with it to see what causes the invalid string error.
Most probably you have an encoding difference between the file and SAS; if you have SAS DBCS installed, you can use the encoding= option for the infile.
05-15-2017 01:11 PM - edited 05-15-2017 01:37 PM
What ENCODING is your SAS session using? What ENCODING is the CSV file using?
If the CSV file does not include encoding information in it then you can tell SAS what encoding to use.
filename myfile 'myfile.csv' encoding=utf8 ; proc import datafile=myfile ....
05-15-2017 12:30 PM
This code won't do anything. It should open the csv file, then close and quit but there's nothing actually done in the code.
What is your definition of 'hanging'? Most likely it's waiting for instructions once you hit Save. Click over to Excel and see what's happening.
05-15-2017 12:54 PM
There are several programs out there that if they are running they interfere with DDE. My person experience is with Cisco Jabber. If the SERVICE (not the program but the Service reported by Task Manger) is running then whatever it does to interfere with DDE means that none of the DDE statements are able to execute.