I have 50 excel files which has to be imported and appended. Which i have done using a macro but the challenge is each excel sheet has a report date in the header . Which needs to be validated like for example if i am running the code for july the report date should be july 1 else those excel files should be thrown as exception which has a different report date. (ie. report date should be 1st of every month)
I have no idea how to get the header (you don't mean the first row containing variable names, don't you) can be read with sas. Or do you mean an information in the first row?
Please, don't post excel files, i won't open them.
Define "Header". You can only import data into SAS that is contained in the spreadsheet from cell A1 to [last used cell]. Everything else is out of reach of proc import.
If it is contained in a separate line (apart from the line that defines the columns), you need to do two separate steps: one that fetches the date, and one that fetches the data.
For further help, export the data to a csv file and post that into a {i} window or as an attachment (just enough lines to illustrate your issue).
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.