Help using Base SAS procedures

PROC Export: Replacing sheet error

Reply
Contributor
Posts: 24

PROC Export: Replacing sheet error

Hi,

 

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
outfile="\\fileshare\users\rm\example5.xlsx"
dbms=xlsx replace ;
sheet="Data_import";
run;

 

 

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.

Super Contributor
Posts: 490

Re: PROC Export: Replacing sheet error

[ Edited ]

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."

Occasional Learner
Posts: 1

Re: PROC Export: Replacing sheet error

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.

Super User
Posts: 3,102

Re: PROC Export: Replacing sheet error

[ Edited ]

Looks like this SAS note is relevant:

 

http://support.sas.com/kb/58/890.html

 

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.

Ask a Question
Discussion stats
  • 3 replies
  • 912 views
  • 0 likes
  • 4 in conversation