Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to display excel sheet in html page

Tags:

html

excel

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

enter image description here

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

like image 902
coolcake Avatar asked Mar 13 '12 03:03

coolcake


3 Answers

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.

like image 118
iotapaw Avatar answered Nov 20 '22 03:11

iotapaw


You can upload it into Google Docs, and embed the Google Spreadsheet as detailed here: http://support.google.com/docs/bin/answer.py?hl=en&answer=55244

like image 3
kingjeffrey Avatar answered Nov 20 '22 03:11

kingjeffrey


Upload your file to Skydrive and then right click and select "Embed". They will provide iframe snippet which you can paste in your html. This works flawlessly.

Source: Office.com

like image 3
Irfanullah Jan Avatar answered Nov 20 '22 01:11

Irfanullah Jan