05-22-2014 12:38 PM
I have some trouble importing a table that looks that way :
I need to create a table SAS with data from line 4 AND get variables names on line 3. But I can't make it.
I tried :
proc import out=xll.input
But it gets me "The SAS SYSTEM" "B" "C" etc as variables. Plus, the ID became of kind "4.3080236E12".
Then I tried to add GETNAMES=YES but it produced the very same result...
Could you please help me ? Thanks a lot
05-22-2014 01:37 PM
The lay-out look to be a SAS report of a dataset displayed with AMO in Excel. Why would you try to convert a SAS dataset to a SAS dataset when the viewer/browser is just Excel.
05-23-2014 03:22 AM
Good morning Jaap,
in fact the reason is simple : I receive that excel as an input from another department in my company, and I can only receive it that way.
So, I absolutely need to import that excel file in SAS
05-23-2014 03:42 AM
Understandable than that guy of the other department did used the AMO and has all that in a SAS-dataset.
He could have send you the SAS dataset. Now you are busy to recreate that one. In the same company corporate cooperation....
The most easy approach would be try to export the selected area you need as a CSV and use that. Not that much work and a datastep is coded fast.
The ID field is obviously having numbers but you could need to do that as chars. The numeric precision is not reliable above some 12 digits.
ID is for identification I assume something like custom number. Calculations as mean skewness not likely to be expected.
05-23-2014 03:53 AM
Yes that is incredible..And they do nothing to make the task easier.
Above all, I need to automatize a whole process (beginning with the import of that xlsx).
Well converting it to CSV make it not completely automatized but at least I can run the rest of my program...
I did convert it to CSV but for ID I have the same trouble, it becomes digits with E+12 types.
05-23-2014 04:12 AM
Well you are still using it as number not char and there 13 digits. reading defining it as char (length eg $16) or using a format with 15 digits would help.
But you are at the end of the numeric precision with numbers, They could go off on the last low values. (sas note 123)