Spreadsheets converted to web pages can run on servers with ASP/ASP.NET. In this case, default values can be taken from a database or provided by any other live data source.

This tutorial is not actively updated for new versions of ASP.Net, Visual Studio or SpreadsheetConverter. It is still correct when it comes to the basic integration principles. 

When you use a version of SpreadsheetConverter that does its calculations in the browser, you must provide all default values in the spreadsheet that is downloaded to the browser. There is no communication between the client and server after that.

The ASP/ASP.NET version of SpreadsheetConverter runs in the webserver, and does all calculations there. That means that it can get data from practically anywhere in the server environment for use in the calculator.

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 some experience of web server programming.

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.

  1. Create a spreadsheet and convert it to HTML using SpreadsheetConverter
  2. Move the file to a directory accessable from your web server, in this tutorial IIS.
  3. Rename the file from .htm to .asp




  1. Make sure that the webpage still works:


  1. Open the .asp file in notepad.
  2. Insert the following first in the file:
    dim rate
    rate = 0.07
  3. Make sure that the page still works by opening http://localhost/asp/asp-rate/asp-rate.asp in a new browser window
  4. In the converted web page, search for ’;var cA2B=(0.05);’ and replace it with ;var cA2B=(<%= rate %>);
  5. 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.
  6. 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 %)initialize-values-on-server_html_m7737c53a (1)


Advanced database connections

This simple example showed you how simple it is to provide dynamic data from the ASP/ASP.NET environment and feed into the calculator. The code used in this tutorial can easily be enhanced so that the interest is taken from a database or provided by any other live data source.

The files for this tutorial

  1. The Excel file: asp-rate.xls
  2. The HTML-file: asp-rate.htm
  3. The ASP-file: asp-rate.asp
  4. The ASP-file as a text file so that you can view it: asp-rate.txt