In the Vyverman paper Using Dynamic Data Exchange to Export Your SAS® Data to MS Excel
— Against All ODS, Part I —
you can find code by Roper on how to start Excel. It looks like this:
options noxsync noxwait;
filename sas2xl dde 'excel|system';
length fid rc start stop time 8;
if (fid le 0) then do;
do while (fid le 0);
if (time ge stop) then fid=1;
When I try to run the code I get the message:
ERROR 23-2: Invalid option name excel .
What can be wrong? Of course I have Excel installed.
I copied the code you posted and it does start excel on my PC. Excel2003.
Determine the "command" that starts excel from the excel short cut on your PC.
Right click "properties".
Copy the target field from that dialog.
Open CMD window
Enter START "title" "and paste from target"
Where past from target is what you copied from properties.target.
"title" is a place holder.
If you can get that to work than replace the START command in the ROPER code, with the start command that actually works on your system.
I don't use this enough to be much help but I belive this is the function you need.
Equivalent to choosing the Number tab in the Format Cells dialog box, which appears when you choose Cells from the Format menu. Formats numbers, dates, and times in the selected cells, data labels, and axis labels on charts. Use FORMAT.NUMBER to apply built-in formats or to create and apply custom formats.
Format_text is a format string, such as "#, ##0.00", specifying which format to apply to the selection.