Help using Base SAS procedures

SAS Proc Export Making Images Unviewable

Reply
New Contributor
Posts: 3

SAS Proc Export Making Images Unviewable

Greetings!

 

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.

 

Thanks,

Erik

Super User
Posts: 23,733

Re: SAS Proc Export Making Images Unviewable

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?

 

 

New Contributor
Posts: 3

Re: SAS Proc Export Making Images Unviewable

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

dbms=xlsx

outfile="&ReportExcel."

replace;

sheet="Data Sheet";

putnames=yes;

Run;

 

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

 

7.11 HF3 (7.100.1.2805) (32-bit)

 

Any additional feedback would be appreciated.  Thanks!

Super User
Posts: 23,733

Re: SAS Proc Export Making Images Unviewable

1. SAS version, not EG versions please

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

 

 

New Contributor
Posts: 3

Re: SAS Proc Export Making Images Unviewable

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
Posts: 13,550

Re: SAS Proc Export Making Images Unviewable

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.

Ask a Question
Discussion stats
  • 5 replies
  • 185 views
  • 2 likes
  • 3 in conversation