René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback
 

Altering properties an embedded excel in Internet Explorer

<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">
<link rel=File-List href="./Moin1-Dateien/filelist.xml">
</head>
<body onLoad='__on_load__()'>

<script>

  function change_bool(p, v) {
    excel[p]=v;
  }

  function change_ascii(a, v) {
    excel[a]=v;
  }


  var boolean_properties = [
    //'AllowDeletingColumns',
    'DisplayTitleBar'
  ];

  var ascii_properties = {
    ViewableRange: {start: 'A1:F10'}
  };

  /*
     DataType

  */


  function __on_load__() {

    alert (excel.ActiveSheet.AllowDeletingColumns);
    for (var p in boolean_properties) {
      excel[boolean_properties[p]]=false;
    }
    for (var a in ascii_properties) {
      excel[a]=ascii_properties[a].start;
    }
  }


</script>


<object 
  id      = 'excel'
  classid = 'CLSID:0002E510-0000-0000-C000-000000000046'>

</object>


<form><table>

<script>

  

  for (p in boolean_properties) {
    document.writeln("<tr><td>");
    document.writeln(boolean_properties[p]);
    document.writeln("</td><td>");
    document.writeln("<input type='checkbox' onClick='change_bool(\"" + boolean_properties[p] + "\", this.checked)'  >");
    document.writeln("</td></tr>");
  }
  for (var a in ascii_properties) {
    document.writeln("<tr><td>");
    document.writeln(a);
    document.writeln("</td><td>");
    document.writeln("<input type='text' value='" + ascii_properties[a].start + "' onChange='change_ascii(\"" + a + "\", this.value)'>");
    document.writeln("</td></tr>");
  }


</script>

</table></form>


</body>
</html>