Tips for Writing Reports in Excel

Cascade Connect: Version 4.0
Prev | Chapter 7. Connecting to Excel | Next

# 7.5. Tips for Writing Reports in Excel

## 7.5.1. Referencing Data Points

Maintain a single spreadsheet that contains all of the data points you are reading from the data server. Then use the references to those data points in the spreadsheets that will make up your reports.

Figure 7-6. Referencing data from a datasheet contained in the same .XLS file

This will allow Excel to update all the points on one spreadsheet and should improve update speed and reduce screen flicker, as the datasheet file need not be displayed to the user.

Figure 7-7. Referencing data from a datasheet contained in the separate .XLS file

In this figure the data and the report are held in separate spreadsheets. This will also allow you to maintain a single data spreadsheet and many report spreadsheets that refer to the data server data by means of the `=`datasheet.xls!`variable`` syntax.

## 7.5.2. Passing strings from Cascade Connect to Excel

Cascade Connect can also be used to pass strings to Excel. This may include sending label names and formulae. Consider the following example:

Figure 7-8. Passing labels and formulae to Excel

Cell B8 is named `total_label` and C8 is named `total_formula` . The data passed to these cells from the data server is in the form of a string variable. Here are some examples of set of values for `total_label` and `total_formula` that could be passed to Excel from the data server:

total_label | total_formula
--- | ---
Average | `=AVERAGE(C2:C7)`
Total | `=SUM(C2:C7)`
Standard Dev | `=STDEV(C2:C7)`
Maximum | `=MAX(C2:C7)`
# greater than 55 | `=COUNTIF(C2:C7,">55")`

The ability to pass string information into Excel means that you can develop sophisticated spreadsheets that are reconfigured from the data server, without the intervention of a Windows operator.

Prev | Home | Next
Multiple Cell References | Up | Creating write-backs from Excel to the data server

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.