DIAdem Help

Object: CellPosition

  • Updated2024-09-12
  • 1 minute(s) read

Object: CellPosition

The CellPosition object provides the column and the row of a cell in a worksheet.

The following example reads in the values of the worksheet columnwise from the second row and saves the values in channels of the first channel group:

Dim oCurrSheet
Set oCurrSheet = Workbook.Sheets(1)
Dim oCellBlock
Set oCellBlock = oCurrSheet.GetCellBlock(2,1)

Dim i, Name, oNewChannel
For i = oCellBlock.Position.Column to oCurrSheet.MaxPosition.Column
  Name = oCurrSheet.GetCellValue(1,i)
  Set oNewChannel = oCellBlock.Channels.Add(Name) 
  Call Root.ChannelGroups(1).Channels.AddDirectAccessChannel(oNewChannel)
Next

Properties

Column | Row

Log in to get a better experience