Skip to main content
December 28, 2010
Question

Adding Image to Export Excel?

  • December 28, 2010
  • 1 reply
  • 2270 views

hi there guys

i have a problem currently..

is it possible to add image to a generated excel?

if yes, how can i do it?

i tried using <img src='companylogo.jpg'> but it isn't working

kindly help

regards,

hejime

    This topic has been closed for replies.

    1 reply

    Fernis
    Inspiring
    December 28, 2010

    Using SpreadsheetAddImage this should be quite possible.

    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-688c.html

    -Fernis

    December 28, 2010

    the project isn't using coldfusion 9.. i think should be coldfusion 8

    any other alternative to doing this?

    my codes are like this at the moment

    <cffile action="append" file="#downloadPath##filename#" output="   
    <table width='95%' align='center' cellspacing='1'>" addnewline="No">   
        <cfset linecount = lineCount + 1 >
        <cffile action="append" file="#downloadPath##filename#" output="
        <tr>
            <td><img src="#images#company_logo.jpg"></td>
        </tr>" addnewline="No">
        <cfset linecount = lineCount + 1 ><cffile action="append" file="#downloadPath##filename#" output="
    </table>
    " addnewline="No">

    <cfheader value = "attachment; filename=#filename#" name="content-disposition">
    <cfcontent type="application/vnd.ms-excel" file="#download_blabla_excel##filename#" deletefile="No">

    Inspiring
    January 2, 2011

    you need to use a direct url.. eg: http://www.abc.com/images/banner.jpg