DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Object: Workbook

Object: Workbook

The Workbook object provides a workbook and the associated properties.

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

Call Root.Properties.Add("Title", Workbook.WorkbookInfo.Title)
Call Root.Properties.Add("Author",Workbook.WorkbookInfo.Author)

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

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