BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mfontenot
Calcite | Level 5

Hi All,

Fairly new to SAS and this is my first my post/question. Apologies if I'm not following protocol.

BACKGROUND:

I am part of a team developing reports for a client using stored processes authored in Enterprise Guide. We have the reports setup for the 4 main output destinations HTML, PDF, RTF, and Excel. Each has the client's banner across the top. All are working exactly as expected except for Excel.

ISSUE:

The banner in Excel appears as the first title line. However, because the image is a reference instead of embedded like PDF or MS Word (RTF), the image covers the next few title lines. These are the title of the report, date run, by whom, etc..

QUESTION:

Is there a way to force the preimage to embedded within the Excel document like in Word or PDF?

I have tried putting the title texts down to a higher title number (ie. title6), but the position in the Excel spreadsheet doesn't change. I have also tried using the "~{newline X}" like we used in our footers to get more than 10 lines of footer text.

Any advice is greatly appreciated. If I haven't provided enough information, please let me know.

Thanks,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

How are you creating output for Excel? ODS CSV? ODS HTML? ODS MSOFFICE2K? ODS TAGSETS.EXCELXP? You do not say, and it makes a difference.

  As you noted, RTF and PDF outputs have the image embedded into the document. This is by design. The nature of RTF and PDF require that all images get translated into internal RTF and internal PDF form and embedded in the documen.

  On the other hand, you cannot embed an image in a CSV file. With ODS HTML, the specification for HTML dictates that images are pointed to (not embedded) with <IMG> tags.

  When Excel opens an HTML file (whether you create it with ODS HTML, ODS MSOFFICE2K, or another HTML-based destination), you cannot do away with the way the <IMG> tag works. And Excel has its own way of reading, using and rendering the <IMG> tag when it opens the HTML file. An HTML file does not embed an image; so when Excel opens the HTML file, you are left with what Excel does with the IMAGE.

  If you use TAGSETS.EXCELXP, then by Microsoft design, the Office 2003 form of Spreadsheet Markup Language XML does not allow images.

  If you use TAGSETS.TABLEEDITOR destination, then you are creating HTML with embedded JavaScript to create an Excel file after the HTML file is opened in a browser. I am not sure how this works with images. That would be a question for Tech Support.  If you use ODS  MSOFFICE2K_X, then you are creating HTML with some XML mixed in that conforms to the Microsoft specification. So, again, the HTML file will use an <IMG> tag.

  My guess is that you are not going to be able to make Excel do what you want. But to be absolutely certain, you might want to double check with Tech Support.

cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

How are you creating output for Excel? ODS CSV? ODS HTML? ODS MSOFFICE2K? ODS TAGSETS.EXCELXP? You do not say, and it makes a difference.

  As you noted, RTF and PDF outputs have the image embedded into the document. This is by design. The nature of RTF and PDF require that all images get translated into internal RTF and internal PDF form and embedded in the documen.

  On the other hand, you cannot embed an image in a CSV file. With ODS HTML, the specification for HTML dictates that images are pointed to (not embedded) with <IMG> tags.

  When Excel opens an HTML file (whether you create it with ODS HTML, ODS MSOFFICE2K, or another HTML-based destination), you cannot do away with the way the <IMG> tag works. And Excel has its own way of reading, using and rendering the <IMG> tag when it opens the HTML file. An HTML file does not embed an image; so when Excel opens the HTML file, you are left with what Excel does with the IMAGE.

  If you use TAGSETS.EXCELXP, then by Microsoft design, the Office 2003 form of Spreadsheet Markup Language XML does not allow images.

  If you use TAGSETS.TABLEEDITOR destination, then you are creating HTML with embedded JavaScript to create an Excel file after the HTML file is opened in a browser. I am not sure how this works with images. That would be a question for Tech Support.  If you use ODS  MSOFFICE2K_X, then you are creating HTML with some XML mixed in that conforms to the Microsoft specification. So, again, the HTML file will use an <IMG> tag.

  My guess is that you are not going to be able to make Excel do what you want. But to be absolutely certain, you might want to double check with Tech Support.

cynthia

mfontenot
Calcite | Level 5

Hi Cynthia,

Thank you very much for your in-depth, informative answer. You provided more information in that reply than I was able to find in my googling. I tagged my post with TAGSETS.MSOFFICE2K, but forgot to mention in the post. Sorry about that.

Event though, it's not what I wanted to hear, it is still the correct answer, and I will mark it as such. Also, I will follow up with tech support to double-check.

Thanks again. You are a tremendous help.

Michael

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 1358 views
  • 0 likes
  • 2 in conversation