12-11-2015 07:49 PM
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.
12-12-2015 09:41 AM - edited 12-12-2015 09:42 AM
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."
11-16-2016 06:25 PM
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.
11-16-2016 07:01 PM - edited 11-16-2016 07:04 PM
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.