I used to be able to run the PROC EXPORT code below without any issues but now SAS gives me an error. I suspect it is because IT just installed a maintenance release. Do you think it is the reason and is there an option to avoid this error?
proc export data=final
dbms=xlsx replace ;
I Get the error message:
Can not replace sheet because it has existing formulas that reference other pages
ERROR: Export unsuccessful. See SAS Log for details.
This error is mentioned in in "SAS/ACCESS(R) 9.4 Interface to PC Files: Reference, Third Edition" EXPORT Procedure
"If you use the EXPORT procedure with DBMS=XLSX and the page has formulas that reference other pages, an error message is written to the log. The error states that the page cannot be replaced because it has formulas that reference other pages."
I have seen this error,
"Can not replace sheet because it has existing formulas that reference other pages",
even in cases where the sheet did not contain any formulas. We are currently experiencing problems with Proc Export corrupting Excel files. My understanding was that this was supposed to have been fixed in 7.12 HF2 but we are still seeing issues. It would be really great if someone were to include a link to that support issue because I'm not finding anything about it on this site. I can only conclude that I'm not looking in the right places because our issue is replicable.
Hi, is there any progress on this? I keep getting the error even when there are clearly NO formulas in the sheet into which the data are exported (but obviously there are formulas in other sheets which link to these data, that is the whole point of using an Excel template).
EDIT: It seems the workaround for me is to export data to CSV, and then use Excel connections feature, which link certain ranges in an Excel workbook with external CSVs. The advantage of this method is that you may link ranges anywhere in the given sheet, that means that you can have charts/formulas on the same sheet as your imported data, which is not possible with the SAS xlsx proc export.
Looks like this SAS note is relevant:
You might want to check Maintenance 4 (SAS 9.4 TS1M4) when it is released in the next week or so to see if this is now fixed.
A workaround would be to replace formulas with values using Paste Special.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.