Desktop productivity for business analysts and programmers

Is it possible to embed preimage in Excel ODS output?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Is it possible to embed preimage in Excel ODS output?

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


Accepted Solutions
Solution
‎02-07-2013 01:25 AM
SAS Super FREQ
Posts: 8,819

Re: Is it possible to embed preimage in Excel ODS output?

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


All Replies
Solution
‎02-07-2013 01:25 AM
SAS Super FREQ
Posts: 8,819

Re: Is it possible to embed preimage in Excel ODS output?

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

New Contributor
Posts: 2

Re: Is it possible to embed preimage in Excel ODS output?

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

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 513 views
  • 0 likes
  • 2 in conversation