This sample shows how you can initialize constants used by the calculator. You will need some basic programmers skills to do this and a suitable web server technology, for example Classic ASP or PHP.
How to initialize values on the server
We have create a simple calculator, and the rate changes all the time. We want to update it without having to regenerate the webpage using SpreadsheetConverter/ExcelEverywhere. This sample can be enhanced so that the constants are read from a database or similar.
- Create a spreadsheet and generate the HTM-page using ExcelEverywhere
- Move the file to a directory accessable from your web server IIS.
- Rename the file from .htm to .asp


- Make sure that the webpage still works:

- Open the file in notepad, in my case ’notepad c:\inetpub\wwwroot\asp\asp-rate\asp-rate.asp’
- Insert the following first in the file:
<%
dim rate
rate = 0.07
%>
- Make sure that the page still works by opening http://localhost/asp/asp-rate/asp-rate.asp in a new browser window
- Search for ’;var cA2B=(0.05);’ and replace it by ;var cA2B=(<%= rate %>);
- Test the new version by opening http://localhost/asp/asp-rate/asp-rate.asp and enter 100 in the first cell. You will get 7.0000 as result.
- Notice that the form still says 5%. You will find the text 5% further down in the file. In order to get rid of this presentation of 5%, either hide row 2 or replace ’5’ by <%= rate*100 %> (Keep the %)

