How to display an Excel spreadsheet in a browser?

I have an excel sheet containing an excel diagram. I can display an excel sheet in a browser using an iframe. However, I only want to display the graph present inside the excel sheet in the browser.

How do I achieve this? I see that this requires the Javascript + ActiveX API. I tried, but could not get it to work.

See the code below. This does not work, since I cannot set the data attribute of the "object" tag dynamically. This does not allow.

<object id="objFrame" data="" type="application/vnd.ms-excel"></object>

<script>
var Excel = new ActiveXObject("Excel.Application"); 
Excel.Visible = false;
document.getElementById("objFrame").data  = Excel.Workbooks.Open("Test.xls").Sheets("Chart1");
Excel.Quit();
</script>

Is there any other way to achieve this? Please send a sample code. Thanks.

+3
source share
3 answers

, , , , /, Office COM, , , .

+1

SpreadsheetGear for.NET Excel, , ( , ) , . ASP.NET(# VB) .

: SpreadsheetGear LLC

+1

, Funfun Excel. , Funfun JavaScript Excel, .

enter image description here

, HighChart.js . Excel. , . .

enter image description here

, , . .

- Excel . , Excel.

enter image description here

,, Funfun -, JavaScript .

enter image description here

.

https://www.funfun.io/1/edit/5a439b96b848f771fbcdedf0

Disclosure: I'm a Funfun Developer

+1
source

Source: https://habr.com/ru/post/1709361/


All Articles