Focal Point
[SHARING] Images in Excel

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2047053196

June 07, 2019, 11:16 AM
DWaybright
[SHARING] Images in Excel
I found it interesting -- all the posts on this and we still don't seem to have an easy way to do this.

I have a report the users can choose to run to Excel, PDF or HTML. My testing shows that PDF and HTML will work with png files, but Excel wants gif. So I have to put variables in my code to check and set the file name accordingly. Also, I can't set the position of the image in Excel, it always shows to the left, so I have to make sure the heading isn't too far to the left or it will be over-written by the image.

Here is a snip of code:

-SET &IMAGEFILE= IF &OUTPUT_TO EQ 'XLSX' OR 'EXL2K' THEN 'BMI-Horizontal-Black.gif, SIZE=(2 0.75)' ELSE 'bmi-horizontal-color.png, SIZE=(3 1.5)';
-SET &JUSTIFY= IF &OUTPUT_TO EQ 'XLSX' OR 'EXL2K' THEN 'CENTER' ELSE 'LEFT';
.
.
.
TYPE=TABHEADING,
JUSTIFY=&JUSTIFY.EVAL,
$
TYPE=REPORT,
IMAGE=&IMAGEFILE.EVAL,
POSITION=(+3.5 0.0),
$



Just thought I'd add to the posts in case this helps anyone.

--Deb


WebFOCUS 8.2.03
AppStudio, InfoAssist
Windows, All Outputs
June 07, 2019, 11:45 AM
MartinY
quote:

-SET &IMAGEFILE= IF &OUTPUT_TO EQ 'XLSX' OR 'EXL2K' THEN 'BMI-Horizontal-Black.gif, SIZE=(2 0.75)' ELSE 'bmi-horizontal-color.png, SIZE=(3 1.5)';
-SET &JUSTIFY= IF &OUTPUT_TO EQ 'XLSX' OR 'EXL2K' THEN 'CENTER' ELSE 'LEFT';

Just a question : you are giving both Excel format choices option to your users : XLSX or EXL2K ? Or you put both because you have both format used historically in different fex ?


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 07, 2019, 01:38 PM
DWaybright
Martin,
Most of our reports use EXL2K right now, but I'm wondering if we should switch to XLSX. Which do you use?


WebFOCUS 8.2.03
AppStudio, InfoAssist
Windows, All Outputs
June 07, 2019, 01:42 PM
MartinY
I would say that if you are using WF82 and according to your MS-Office version I would go with XLSX which is more up to date than EXL2K
It's like if you are still using Excel-97 format, still working, but not the latest and best one.
Your (and organization) choice

Personally, I would not put both, one or the other and have every report with the same format. Not a big deal to change.
I have changed all EXL2K by XLSX, less security and compatibility issue than using EXL2K with new MS-Office version


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 10, 2019, 02:46 PM
DWaybright
Martin,
Thanks for the opine. I'm leaning toward changing everything over to XLSX. I may push it when we do our next upgrade.


WebFOCUS 8.2.03
AppStudio, InfoAssist
Windows, All Outputs