The special variable _INFILE_ only contains the information from the input buffer. Although the information from the input buffer is written to the Program Data Vector, PDV, _INFILE_ does not receive any information from the program data vector. Modified variable values are contained in the PDV not in _INFILE_ as is shown here:
input x z$;
x = x+1;
You need to write the values directly from the PDV not the input buffer.
The first line tells the dataset to be created.The second lline tells the location of the excel file to be read.The third line tells SAS the type of DBMS, in this case it is excel file.The fourth line tells which work sheet needs to be selected from the excel file. First line of the work sheet will be used as variable names, this is mentioned in the fifth line.
Like this you can PROC EXPORT to export your SAS dataset to an excel file.