Embedding Excel in IE and Firefox

E

Erich Neuwirth

The following html page works in Internet Explorer,
but not fully in Firefox.

To be able to use ActiveX in Firefox at all
one has to install the ActiveX plugin for Mozilla from
http://www.iol.ie/~locka/mozilla/mozilla.htm
The version for Firefox 1.04 also works with Firefox 1.06
Additionally, one has to add the 2 entries
pref("capability.policy.default.ClassID.CID0002E559-0000-0000-C000-000000000046",
"AllAccess");
pref("capability.policy.default.ClassID.CID0002E55D-0000-0000-C000-000000000046",
"AllAccess");

to the file
C:\Program Files\Mozilla Firefox\defaults\pref\activex.js

In IE, everything works fine.
In Firefox, the Excel sheet will work,
but the chart will not display any data.

Any ideas what needs to be changes in my file?


-=-=-=-=-==-=-=-=-=-=

<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content= FrontPage.Editor.Document >
<meta name=Generator content="Microsoft Excel 9" >

</head>

<script type='text/javascript'>

function l() {

excel.DisplayToolbar = false;

excel.range('a1' ).formula = 1;
excel.range('a2' ).formula = 2;
excel.range('a3' ).formula = 3;
excel.range('b1' ).formula = 10;
excel.range('b2' ).formula = 15
excel.range('b3' ).formula = 18
}


function create_chart() {

var xlLineMarkers = 65;
var xlColumns = 2;

var chDimSeriesNames = 0;
var chDimCategories = 1;
var chDimValues = 2;
var chDimXValues = 4;

chart.Charts.Add();

chart.ChartType = xlLineMarkers;
chart.DataSource = excel//;.Range("A1:B3");
var s = chart.Charts(0).SeriesCollection;

var data_series = s.Add();

data_series.SetData(chDimCategories, 0, "A1:A3");
data_series.SetData(chDimValues, 0, "B1:B3");

return false;
}



</script>

<body onLoad='l();'>


<object
width = 300
height = 400
id = 'excel'
classid = 'CLSID:0002E559-0000-0000-C000-000000000046'>

<param name=DisplayTitleBar value=false >
<param name=ViewableRange value='a1:b12'>
<param name=AutoFit value=true >
</object>

<p>
and now the chart
</p>

<form>
<input type=submit onclick='return create_chart()' value='Create Chart'>
</form>


<object
width = 300
height = 400
id = 'chart'
classid = 'CLSID:0002E55D-0000-0000-C000-000000000046'>
</object>

</body>
</html>
--
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Didactic Center for Computer Science
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39464 Fax: +43-1-4277-39459
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top