Introduction
  Welcome
  The Web Reporting Solution
  What is ExcelWriter?
  Features and Benefits
  New in This Version  V4
  Requirements
  Edition Differences
  Frequently Asked Questions
  Troubleshooting

Quick Start
  Creating Your First Spreadsheet
  Adding a Formula
  Adding Formatting
  Importing from a Database

Features In Depth
  Addressing Cells
  Setting Values
  Output Options
  Adding Charts
  Reading an Existing Spreadsheet
  Modifying an Existing Spreadsheet
  The Range Object
  Template Spreadsheets
  How to Use Templates
  ExcelApp.Open vs. ExcelTemplate
  Using ExcelTemplate with PivotTables
  Templates and Charts
  Reliable Spreadsheet Download  V4
  Page Setup
  Formatting Headers & Footers
  Protecting your Worksheet
  Multilingual Support  V4
  XML Import

HotCell Technology  V4
  What is HotCell Technology?
  Upload Example
  Advanced POST Example
  Advanced Upload Example

Programmer's Reference
  Object Model
      ExcelTemplate Object
      ExcelApplication Object
         3DProperties Object
         Area Object
         Axis Object
         Cells Object
         Cell Object
         Charts Object
         Chart Object
         ChartFrame Object
         Font Object
         Line Object
         PageSetup Object
         Pictures Object
         Picture Object
         Range Object
         SeriesCollection Object
         Series Object
         Style Object
         Worksheets Object
         Worksheet Object
  Formula Functions
  Formula Calculation Operators
  Formatting Codes
  Chart Codes

Installation
  Quick Installation
  Configuring IIS
  Security Considerations

External Links
  ExcelWriter Home Page
  Technical Support
  ExcelWriter Demos
  SoftArtisans Home Page
  E-mail General Questions
  E-mail Technical Support
  Legal Information

Addressing Cells


How to Address Cells

Cells can be addressed in two ways: by Name or by Number. Accessing by name is easier to read, more intuitive and matches the cell references seen in Microsoft Excel. Accessing by number is significantly faster, and is easier to program if it is necessary to walk a number of cells.

set xlw = Server.CreateObject("SoftArtisans.ExcelWriter")
set cells = xlw.worksheets(1).cells

'--- By name
cells("B3").value = 123

'--- Same cell by number
cells(3, 2).value = 123
Addressing Cells by Name Addressing Cells by Number
Format Cells("ColLetterRowNumber") Cells(row, column)
Example
Cells("D8")
Cells(8, 4)
Advantages Easy to read, intuitive, matches MS Excel cell references Faster, easier to use when iterating over a set of cells

Top


Example 1: Addressing Cells by Name and Number

When referencing a cell by number, the format is cells(row, column). It is easy to mix and match different means of referencing a cell within your application.

features/addressing1.asp

[View Source]

Top


Example 2: Iterating over Cells

It is much easier and faster to iterate over a set of cells by number.

features/addressing2.asp

[View Source]

Top


Section Summary

  1. Cells can be referenced by name or by number.
  2. Accessing by name is easier to read, more intuitive and matches the cell references seen in Microsoft Excel. Accessing by number is significantly faster, and is easier to program if it is necessary to walk a number of cells.

Top


Copyright © 2003, SoftArtisans, Inc.