This tutorial shows how you can initialize cell values in a spreadsheet stored on a server. You will need some basic programmer's skills to do this and a suitable web server technology, for example Classic ASP or PHP.
How to initialize cell values on the server
We have created a simple calculator, where an interest rate varies for every day. If we store the current interest rate in the spreadsheet, we have to regenerate the webpage every day.
The code in this tutorial can easily be enhanced so that the interest is taken from a database or any other live data source.
- Create a spreadsheet and generate the HTM-page using SpreadsheetConverter
- Move the file to a directory accessable from your web server, in this tutorial 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 %)



