export and import data from excel using pc file server to a network mount on the pc. (I am looking for the correct syntax with the sas pc file server listed and the right PROC)
Please see attachment
What is it that thought you posted in the PDF? The forum viewer is not seeing anything in there.
Post text in text boxes (like CODE examples).
You can paste in images in your question (or using the camera icon), but I am not sure what images you would need to describe and issue with CODE.
It is often much more useful to show the LOG from when you run code. Copy text from the log for the entire data step or procedure that you are attempting, on the forum open a text box using the </> icon that appears above the message box and paste the text. The text box helps by preserving text diagnostics that SAS often provides that get reformatted when pasting into the main message windows.
IF pcfile server is configured correctly you would not "import" or "export" data. The spreadsheet file would be a Library and you read sheets (maybe, bad sheet names can be problematic) as data sets, or write to the library with any procedure or data set to create a new sheet.
Since you only provided picture and not actual text in that PDF (talk about wasted time doing that: copy and paste from editor should be much quicker)
Libname mylib pcfiles "\\server\path\filename.xlsx";
if the path is correct and pcfiles configured correctly would create a library named MYLIB.
If the xlsx file has sheets named Data1, Data2 and similar then those sets would appear in the LIBRARY folder.
Note: set options validvarname BEFORE a procedure that may need it. With the typical junk I find in spreadsheet tab names you likely also need Validmemname=extend. Be prepared to deal with Name literals for variables and data sets.
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.