Hi,
I am updating an excel sheet using SAS DDE. The data is in following format,
date | a.xls | b.xls | c.xls |
1 | 456546 | 456546 | 456546 |
2 | 5643 | 5643 | 5643 |
3 | 44 | 44 | 44 |
4 | 3 | 3 | 3 |
5 | 4656 | . | 123 |
6 | 454542332 | 454542332 | 567 |
Here, I am importing data daily from few XL sheets like a, b, c. So, each row represents data collected each day & cell, a particular value from the source XL sheet.
The requirement is that if y'day's data is not updated (i.e. cell is having '.'), I need to update it along with today's value. I am storing today's and y'day's data in a macro variable at start.Then I update today's row, then I will go through y'day's row and if any of the cell (R5:b.xls) is with missing value, will update it from macro variable.
I am seeing the value for y'day's missing value cell, being updated in some other cell.
Any suggestions?
You would have to show your code and attach a zipped example spreadsheet in order to know what you are doing.
Sure sounds like it would be easier to simply import the spreadsheet then, in a datastep, use update.
I have attached the part of the code, and have put the comments also. Code is running perfect for updating the Xl for today's date...only problem with if any missing data for Y'day date.
Thanks.
Sudtej
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.