How to Address CellsCells 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
Example 1: Addressing Cells by Name and NumberWhen 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. Example 2: Iterating over CellsIt is much easier and faster to iterate over a set of cells by number. Section Summary
Copyright © 2003, SoftArtisans, Inc. |