When i use proc import to import the excel file in unix SAS, some columns with numeric values are imported as dollar format. However, when i use proc import to import the same excel file in PC SAS, the column values comes in as standard numeric type with no format. Is there any option i can use in proc import in Unix SAS so that the numeric values are not imported as dollar format.
Thank you
Not really.
Check the format/informat. It's relatively easy to strip the format off if you don't like it.
What file format are you using for the transfer (XLSX, CSV)?
XLSX
Are you sure your trying to import an Excel file (i.e. an XLS or XLSX file) on Unix, I thought as Excel was Windows only, the engine to import directly was not available on Unix? Anyways, I would strongly recommend to save the file as CSV, and write a datastep import program - Excel is notoriously unstructured, and combine that with the guessing of proc import is more headaches than just typing a program in.
Yes, proc import with the dbms=xlsx works in Unix.
I was not using it before. I was using standard proc import with dbms=xlsx. The import would be done however some of the numeric columns would come in dollar format. Now i tried with the PC SAS file server and it worked for me. The numeric columns are in standard numeric type that i was looking for and not in dollar format. Thanks
So it definately is an Excel file then. Ok, well to be honest, my advice does not really change much anyhows. Save the file into a text based delimited file format - i.e. a proper data transfer file format - then write a datastep import program. Excel is not structured and proc import is a guessing procedure, these will cause you headaches. Importing a simple text file is very simple and you have full control over what columns are imported, what type they are etc.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.