0

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 page.

I'm correct in assuming this is not possible, right? Please confirm/deny so we can hopefully move on from this because he seems to think this is possible. We are on a LAMP setup so no .NET tricks, unfortunately.

1
  • Does it have to look and behave exactly like a stand-alone spreadsheet (interactiveness and such), or do you just need to show the data? Commented May 17, 2010 at 15:00

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the plug Matt. The document could easily be read as Excel and then streamed to the browser as HTML
1

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.

2 Comments

I strongly suspect this works solely in IE on computers with the Office suite installed.
Most likely, nice that the object element allows for alternative content.
0

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).

1 Comment

I didnt think of this, I'm going to give it a shot and see if the client likes this idea. It's a few extra steps but it's the functionality he wants......

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.