I want my webpage to display specific Microsoft excel data inside a div on my website on load.
(我希望我的网页在加载时在我的网站上的div内显示特定的Microsoft Excel数据。)
So when the paged loads it displays the text of A1 inside DIV1.(因此,在分页加载时,它会在DIV1中显示A1的文本。)
The way i have it now is as followed:
(我现在拥有的方式如下:)
<script type="text/javascript">
function ReadData(cell, row) {
var excel = new ActiveXObject("Excel.Application");
var excel_file = excel.Workbooks.Open("C:\webdata\test.xls");
var excel_sheet = excel.Worksheets("Sheet1");
var data = excel_sheet.Cells("A,1").Value;
document.getElementById('DIV1').innerHTML = data;
}
</script>
and it should display the data in the following div
(它应该在以下div中显示数据)
<div id="DIV1">
</div>
Hope someone can help me out and i can learn a thing or two :)
(希望有人可以帮助我,我可以学习一两件事:))
ask by Jpvdo translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…