How do I show an embedded excel file in a WebPage?

心已入冬 提交于 2019-12-03 15:32:43

This has to do with the local person's browser set up and not really anything you can do on your end. If they click a link with the .xls(x) extension, the browser determines if it wants to open it itself or in a new window.

Here is a microsoft page on how to change these settings: http://support.microsoft.com/kb/162059

You should try using the Excel Web App Embed feature that lets you embed tables and charts from Excel directly on your Web Page. You can even let users interact with the spreadsheet so that they can sort and filter data and use your spreadsheets formulas to calculate make their own calculations all without altering the source.

The Excel Web App and storage is all free from Microsoft. Any data you embed on your Web page can be viewed by all the major destkop and mobile browsers and when you update your spreadsheet the data on your web pages is automatically updated as well.

I think your best bet is going to be extracting the data out of the Excel file and displaying it in a regular HTML table. Excel isn't exactly safe to invoke from a web page and not everyone has it anyway.

Take a look at scribd iPaper Viewer - this is a Flash based Viewer of XLS (and other) docs.

MOSS 2007 has a nifty feature called Excel Services which might fit the bill...

Excel Web App allows embedding "live" interactive spreadsheets on a web page. For an example, see http://datawiz.wordpress.com/2011/01/10/how-to-embed-excel-on-a-web-page/

in your comments you say that the Excel file is on the client's filesystem, not on the webserver. i think the security model of sane browsers forbid this; but wouldn't be surprised if setting high permissions to your pages could allow this.

<iframe src="file:\\yourpath\yourfile.xls" width="100%" height="500"></iframe>
Roger Newby

Well this is a bit crude but sort of fits the bill.

  1. Select the area of the spreadsheet you wish to display.
  2. Copy this area into MS Paint.
  3. Select the area in Paint and use the Edit/Copy to/ function to save this as a bitmap.
  4. Now load the bitmap as you would any other pic.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!