如何在html页面中显示excel表 [英] how to display excel sheet in html page

查看:911
本文介绍了如何在html页面中显示excel表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用纯HTML显示嵌入IE的EXCEL表格。我已经经历了stackoverflow的其他问题,但找不到任何有用的。



这是我的html文件

 < HTML> 
< body>
< object width = 900 height = 500 id =exceldata =Issues Identified.xlsxclassid =clsid:0002E55a-0000-0000-C000-000000000046VIEWASTEXT>
< param name =DisplayTitleBarvalue = true />
< param name =DataTypevalue =CSVURL/>
< param name =AutoFitvalue =0/>
< param name =DisplayColHeadersvalue =1/>
< param name =DisplayGridlinesvalue =1/>
< param name =DisplayHorizo​​ntalScrollBarvalue =1/>
< param name =DisplayRowHeadersvalue =1/>
< param name =DisplayTitleBarvalue =1/>
< param name =DisplayToolbarvalue =1/>
< param name =DisplayVerticalScrollBarvalue =1/>
< param name =EnableAutoCalculatevalue =0/>
< param name =EnableEventsvalue =0/>
< param name =MoveAfterReturnvalue =1/>
< param name =MoveAfterReturnDirectionvalue =0/>
< param name =RightToLeftvalue =0/>
< / object>
< / body>
< / html>

不幸的是,我没有对生成的excel文件进​​行控制。如果我能控制excel文件,我可以将它们保存为网页并包含在浏览器中。现在我怀疑如果通过上面的代码,我可以直接在Web浏览器中嵌入excel表。网络上有许多链接,但发现没有找到一个直接将excel表加载到浏览器中的链接。那里的是使用javascript生成图形和全部,而不是显示已经存在的excel表。



当我尝试通过上面的代码加载excel表。我得到以下屏幕





当我使用IFRAME时,Excel表单不会显示为嵌入文件,但提示下载或打开。我想要它打开嵌入在互联网浏览器。



任何帮助非常感谢。



谢谢

解决方案

根据您是否要自动更新,您可以将Excel电子表格保存为PDF,然后将PDF作为对象 -





您似乎没有此浏览器的PDF插件,但您可以
点击此处
下载PDF文件。 / a>





这是我上传的最佳方式。 >

I want to display EXCEL sheet embedded in IE with plain HTML. I have gone through other questions on stackoverflow but could not find any useful one.

Here is my html file

<html>
<body>
<object  width = 900 height = 500 id = "excel"  data="Issues Identified.xlsx" classid = "clsid:0002E55a-0000-0000-C000-000000000046" VIEWASTEXT  >
<param name="DisplayTitleBar" value=true />
<param name="DataType" value="CSVURL"/>
<param name="AutoFit" value="0"/>
<param name="DisplayColHeaders" value="1"/>
<param name="DisplayGridlines" value="1"/>
<param name="DisplayHorizontalScrollBar" value="1"/>
<param name="DisplayRowHeaders" value="1"/>
<param name="DisplayTitleBar" value="1"/>
<param name="DisplayToolbar" value="1"/>
<param name="DisplayVerticalScrollBar" value="1"/>
<param name="EnableAutoCalculate" value="0"/>
<param name="EnableEvents" value="0"/>
<param name="MoveAfterReturn" value="1"/>
<param name="MoveAfterReturnDirection" value="0"/>
<param name="RightToLeft" value="0"/>
</object>
</body>
</html>

Unfortunately I do not have control on the excel files that are generated. If I would have control on the excel files I could have have saved them as web pages and included in the browser. Now I doubt if by any way through above code I can embed excel sheet directly in the web browser. There are many links on web but found not find one which directly loads a excel sheet in to the browser. The ones that are there are using javascript to generate graphs and all instead of displaying an excel sheet which is already present.

When I try to load the excel sheet through above code. I get the following screen

When I use IFRAME the excel sheet is not shown as embedded file but prompting to download or open. I want it to open embedded in the internet explorer.

Any help much appreciated.

Thanks

解决方案

Depending on if you want it to automatically update or not, you can just save the excel spreadsheet as a PDF then embed the PDF as an object -

It appears you don't have a PDF plugin for this browser, but you can click here to download the PDF file.

It's the best way I have found for uploading.

这篇关于如何在html页面中显示excel表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆