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

2019-03-28 06:39发布

I want to allow an Excel report to be viewed embedded in a WebPage... is there a way?

  • I don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application.

  • I don't want users to download and then open it.

Using an iframe wouldn't be a problem, but my preliminary tests weren't successful

Any ideas? Is it at all possible?

9条回答
混吃等死
2楼-- · 2019-03-28 06:55

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.

查看更多
Summer. ? 凉城
3楼-- · 2019-03-28 06:57

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.

查看更多
等我变得足够好
4楼-- · 2019-03-28 07:07

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.

查看更多
兄弟一词,经得起流年.
5楼-- · 2019-03-28 07:07
<iframe src="file:\\yourpath\yourfile.xls" width="100%" height="500"></iframe>
查看更多
迷人小祖宗
6楼-- · 2019-03-28 07:08

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/

查看更多
ら.Afraid
7楼-- · 2019-03-28 07:10

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

查看更多
登录 后发表回答