08-17-2017 10:58 AM
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.
08-17-2017 11:11 AM
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?
08-17-2017 11:30 AM
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
4. I'm running the code out of SAS Enterprise Guide, and it shows the following version information:
7.11 HF3 (18.104.22.16805) (32-bit)
Any additional feedback would be appreciated. Thanks!
08-17-2017 11:13 AM
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.