how to get MS EXCEL formulas in Java Script

Y

Yousaf

How can i get MS Excel like formulas in Java Script , so that my
webpage controls get updated when their value changes based on the
formula specified.
 
B

Bart Van der Donck

Yousaf said:
How can i get MS Excel like formulas in Java Script
so that my webpage controls get updated when their
value changes based on the formula specified.

You could use Excel's formula notation in the base code and the
calculations auto-update:

<object classid="CLSID:0002E510-0000-0000-C000-000000000046"
id="obj">
<param name="HTMLData" value="&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;=(A1+B1)/C1&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;">
</object>

To update a formula, here e.g. from '(A1+B1)/C1' to 'A1-B1':

<script type="text/javascript">
obj.HTMLData =
'<table><tr><td>26</td><td>4</td><td>6</td><td>=A1-B1</td></tr></
table>'
</script>

Hope this helps,
 

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

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top