BookmarkSubscribeRSS Feed
Fluorite | Level 6



I've put together a pretty basic two-step process to use an Excel Template and SAS Proc Export to create a report.


My report template contains a JPG on one tab, and just a JPG.  All the other tabs contain report layouts and cell references to the tabs I'm exporting my SAS data to in the Proc Export step.


My first step is to copy my template over with a new name, and then modify that copied file using the Proc Export to create my final report.


The Unix command to copy works just fine:  My template copies over without issue, including the JPG.


When I run my two Proc Export steps to update my copied template, however, all the report tabs and cell references resolve just fine...but that first tab with the graphic gives me an "Image Cannot Be Displayed" message.


Is this a known SAS issue regarding Proc Export, or am I doing something wrong?  If it's the former, can anybody suggest any easy work-arounds?


Any information would be appreciated.




Super User

Make sure the image is embedded in the Excel file and not linked in. It would help if you could answer the following:


1. Once the file is on Unix, does the Excel Image remain. I'm assuming you develop it on WIndows and move it over.

2. Once the script copies the file, does the image remain?

3. Which Export are you using? Libname, PROC EXPORT with what DBMS? 

4. What SAS version are you using, exactly?



Fluorite | Level 6

Ooh, thanks...I hadn't considered exactly *how* the image was imported into the Excel file.  I'll have to look into that.  As for your other questions:


1. Yes.  I'm updating my template in Windows, then using WS-FTP to transfer the file over to Unix.  When I open the template from Unix, the image remains.

2. Yes.  When I run my first step -- to copy the template as my final XLS report -- the final XLS report (which has not yet been touched by the PROC EXPORT) displays the image just fine.

3. I'm using a Proc Export step with the following syntax:


Proc Export Data=MYLIB.Metrics




sheet="Data Sheet";




4. I'm running the code out of SAS Enterprise Guide, and it shows the following version information:


7.11 HF3 ( (32-bit)


Any additional feedback would be appreciated.  Thanks!

Super User

1. SAS version, not EG versions please

2. If the file is XLS use DBMS=Excel instead of XLSX. 



Fluorite | Level 6

1.  My apologies.  It appears my version is

  • Version=9.4_M3
  • Implementation-Version=904300.2.0.20150429190000_v940m3

2.  I'll give it a shot.  Thanks.

Super User

Proc Export is intended for data exchange, rows and columns of consistant data. It has no intent or ability to export or manage images.


Withou seeing code of what you are currently doing it is hard to address other aspects of your process. If the "images" are Excel produced charts from the exported data it may be that your exported data is not going into the specific cells that Excel charts would expect to find the elements to create Excel charts.


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3 in conversation