Although this thread (https://communities.sas.com/t5/SAS-Programming/Copy-Excel-file-from-one-folder-to-another/m-p/418901...) was helpful about how to copy an Excel file from one folder to another with SAS, is there a way to copy a specific sheet in an Excel file with multiple sheets to another folder with SAS? I'm using SAS 9.4.
You could read the sheet into a SAS data set and then use SAS to write a brand new spreadsheet in another folder. CAUTION: not all features in Excel can be copied this way.
@PaigeMiller but any idea how to preserve original formats?
Any idea how to keep this appearance into the target copy?
Don't want the copy to look like this:
And any idea if there's a way in SAS to extract a specific sheet in a multi-sheet Excel file and copy each into separate Excel files?
If you really have to preserve the formats, then look at Visual Basic. I don't think that SAS is the right tool for this.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.