BookmarkSubscribeRSS Feed
Adam5
Calcite | Level 5

Hi

 

I have been running a process for a few years now where I carry  out a load of data extraction and manipulation in SAS 9.4, which at the end of the process gets exported into an Excel file using PROC export. The excel file then manipulates and presents the data for the end user.

 

The (intermitant) problem that I have, is that sometimes once the SAS code has finished (seemingly without any problems) when I go into the Excel workbook many of the formulae have been corrupted. What seems to be happening is that the SAS export somehow changes some of the range names within formulas that I have on sheets where SAS shouldn't be touching anything.

 

PROC EXPORT DATA= dmi.Nb_summary

OUTFILE= " &path.&File_Name."

 

DBMS=EXCEL LABEL REPLACE;

SHEET="NewBusData";

 

RUN;

 

 

For example - on one sheet before the SAS export runs - the formula in a cell may refer to a particular range name .e.g. =Topexp!A5

 

Then I run the SAS routine - reopen the excel and the same cell now says =Botexp!A5. It's driving me crazy. I can go around and fix it all, then it runs fine for a few days and then it goes wrong again.

 

Any ideas?

 

Thanks in advance

 

Adam

2 REPLIES 2
andreas_lds
Jade | Level 19

Have you checked if any hotfix related to proc export and excel is available for your installation?

 

Reeza
Super User
Try using XLSX DBMS instead?

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1065 views
  • 0 likes
  • 3 in conversation