I was wondering if there is a way to use proc export to place data in a particular row and column in Excel. I know that proc import can access a row and column, but I have not found anything for proc export.
See panel option in ODS MSOFFICE2K
Base SAS: The MSOffice2K_x Tagset Adds Options to the MSOffice2K Tagset
First recommendation, don't use proc import/export - they are guessing procedures.
Second point, what exactly is in the spreadsheet your trying to change, Excel is not a good tool for anything, but especially data. With SAS you *could* use DDE (which is very old tech and not recommended), you could libname excel to the file, and set cell values there. However if I really had to do this (and I would really not be happy with using Excel for anything other than management toy), I would export the values to be updated into a CSV file from SAS. Then in the spreadsheet I wanted to change I would write some VBA code to open the CSV, and copy the data items to specific cells. VBA is very simple and there are plenty of examples online for doing this.
Simply, I wanted to places tables next to each other. Nothing major. But, if this is complex, I have something else lined up. I just wondered if it was possible.
Thanks,
Ah, well that's different. Use tagsets.Excelxp:
ods tagsets.excelxp file="xyz.xml" options=(sheet_interval="none" sheet_name="mydata");
proc report data=xyx...;
proc report data=zyz...;
ods tagsets.excelxp close;
The tables are stacked. Below is the concept that I am looking at. I guess I will have to rely on VB. I was hoping that it would be possible in SAS.
See panel option in ODS MSOFFICE2K
Base SAS: The MSOffice2K_x Tagset Adds Options to the MSOffice2K Tagset
Thank you!!
Libname + excel and change the cell via data step, just like it is a sas dataset ?
There isn't an easy way, but there are other ways to get your data to excel and have it look presentable.
If you absolutely need to link to specific cells, VB is a good way to go.
ODS TAGSETS and EXCEL are two options.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.