How do I import a particular column in Excel which utilize Formula to generate values using PROC IMPORT?
I am using following code and per my understanding SAS should automatically generate values in the field solving formula.
Ex. Excel File: COL_C is based on the formula (100-COLA).
proc import datafile= "..\Temp\test.xlsx" dbms=xlsx out= test replace;
sheet="temp";
getnames=YES;
run; quit;
While importing, COLA and COLB gets correct value while COLC is generating all missing values.
Impossible (for me at least) to tell without seeing the file.
Art, CEO, AnalystFinder.com
Do you get any messages in the log? Post the code and messages from the log.
Is he formula actually: = 100 - A2
or does is have one of $ modifiers like = 100 - A$2 or 100 - $A2 ?
Does the cell address reference the result of another cell containing a formula?
Also depending on spreadsheet the variable may be getting assigned a numeric variable type in SAS but for some reason the result of the forumla is behaving like character and hence gets a missing value in SAS.
Easiest may be to SAVE As CSV and import the resulting CSV file.
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.