Excel embedded in a php page

后端 未结 3 1653
隐瞒了意图╮
隐瞒了意图╮ 2021-01-26 10:28

I have a client who wants to be able to embed an Excel document (one that is currently sitting on the same server as the HTML document) like how you would embed a Flash app on a

相关标签:
3条回答
  • 2021-01-26 10:50

    If this excel file doesn't contain any sensitive data, the best solution would be to use online service like Google Docs to upload document and get embed code (which is iframe with html table inside so most browsers should be able to display it correctly).

    0 讨论(0)
  • 2021-01-26 11:00

    You are correct - at least, it can't be done cross-browser. You should just link to the Excel spreadsheet file.

    Alternatively, if you only need to display the data, I'm sure you can find a PHP library that will read Excel files and display their contents in a HTML table.

    0 讨论(0)
  • 2021-01-26 11:14

    In theory:

    <object data="foo.xls" type="application/vnd.ms-excel" height="500" width="500">
        <p>View <a href="foo.xls">data about foo bar baz</a> as an Excel spreadsheet</p>
    </object>
    

    I can't speak for browser support for this, but Microsoft do provide browser plug-ins for Office applications — you just usually only see them running full-browser-window.

    Note that since this is "like Flash", the server side environment is irrelevant.

    0 讨论(0)
提交回复
热议问题