html2excel conversion problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fred

    html2excel conversion problem

    Hello PHP Masters,

    Sorry to bother you but after googling into googles groups during hours
    you are my last chance to find a clue to my problem. Since english is
    not my natural language do not hesitate to let me know if my question
    is not clear.

    So Here is my problem:
    I wrote a file that converts a html table into an excel file. In this
    table there is a picture.
    The source code is just below. if you load it with IE or FF a dialog
    box appears in order to save/open the created excel file :

    <?php
    header("Content-Type: application/vnd.ms-excel; name='excel'");
    header("Content-Disposition: attachment; filename=exceld isplay.xls");
    print "
    <html>
    <head>
    </head>
    <body>
    <table>
    <tr>
    <td>
    <img
    src='http://www.phpteam.wdm edia-hebergement.net/templates/phpteam/images/phpteam_high.gi f'>

    </td>
    </tr>
    </body>
    </html>
    ";
    ?>


    My problem is that if in the futur the user want to open the saved
    excel file he won't be able to see the pictures if his computer is not
    connected to the internet network.
    In fact it seems that the generated excel file still use the http
    adress source
    ('http://www.phpteam.wdm edia-hebergement.net/templates/phpteam/images/phpteam_high.gi f')
    of the picture to display it.
    So do you know if there is any clue to create an excel file from html
    code that "keep in memory the pictures" in order to display the
    pictures in any kind of situations.

    Any help would be very very very appreciate.

    And do not hesitate to ask if you want me to clarify my question.

    Fred

  • Mike Willbanks

    #2
    Re: html2excel conversion problem

    Fred,[color=blue]
    > My problem is that if in the futur the user want to open the saved
    > excel file he won't be able to see the pictures if his computer is not
    > connected to the internet network.
    > In fact it seems that the generated excel file still use the http
    > adress source
    > ('http://www.phpteam.wdm edia-hebergement.net/templates/phpteam/images/phpteam_high.gi f')
    > of the picture to display it.
    > So do you know if there is any clue to create an excel file from html
    > code that "keep in memory the pictures" in order to display the
    > pictures in any kind of situations.[/color]

    I believe excel can store the pictures within the excel file itself. I
    am not quite sure on how it does that but you may want to pick apart the
    excel specification when you load in an image.

    And if you are using some conversion utility you may want to check
    within that to see how they are handling images.

    Mike

    Comment

    • Mike Willbanks

      #3
      Re: html2excel conversion problem

      Fred,[color=blue]
      > My problem is that if in the futur the user want to open the saved
      > excel file he won't be able to see the pictures if his computer is not
      > connected to the internet network.
      > In fact it seems that the generated excel file still use the http
      > adress source
      > ('http://www.phpteam.wdm edia-hebergement.net/templates/phpteam/images/phpteam_high.gi f')
      > of the picture to display it.
      > So do you know if there is any clue to create an excel file from html
      > code that "keep in memory the pictures" in order to display the
      > pictures in any kind of situations.[/color]

      I believe excel can store the pictures within the excel file itself. I
      am not quite sure on how it does that but you may want to pick apart the
      excel specification when you load in an image.

      And if you are using some conversion utility you may want to check
      within that to see how they are handling images.

      Mike

      Comment

      Working...