dear all,
I have imported an .XLSX file into SAS by the following code,
proc import datafile = 'C:\Users\70660\Desktop\Datastream_GB.xlsx' OUT=sa_step5.DATASTREAM_GB1 DBMS=XLSX replace;
Sheet='Total1';
RANGE='A1: I16458';
GETNAMES=YES;
run;But I confuse what should I do if I expect to define the FORMAT of the variable during the proc import step. could you please give me some suggestions?
thanks in advance.
If you want to control how data is imported into SAS, you must not use the Excel file format. Export your data to a text file from Excel, and read that with a data step where you can set attributes as you please.
If you want to control how data is imported into SAS, you must not use the Excel file format. Export your data to a text file from Excel, and read that with a data step where you can set attributes as you please.
It would be helpful if you could post a workbook with sample data, explain the results that you got, and explain the results that you want.
Vince DelGobbo
SAS R&D
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.