Aspen Touch Solutions ATM-123R Series Specifikace Strana 67

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 374
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 66
Automation 2-53
2-53
SpreadsheetOp &
SpreadsheetCell(s)
The SpreadsheetCells object is a collection of SpreadsheetCell
objects. The cell properties allow access to information related
to the HYSYS variable being imported or exported, the formulas
associated with the cell, and the value within the cell.
By utilizing the spreadsheet operation, it is possible to access
nearly every property or value in HYSYS even if the object
associated with that property is not exposed as an Automation
interface.
Syntax: SpreadsheetOp and SpreadsheetCell(s)
Set hySS = hyCase.Flowsheet.Operations.Item(“spreadsheetname”)
Set hyCell = hySS.Cell(columnindex, rowindex)
Example: Accessing Spreadsheet Cells
Dim hySS As SpreadsheetOp
Dim hyCell As SpreadsheetCell
Set hySS = hyCase.Flowsheet.Operations(“spreadsheetop”).Item(0)
Dim x As Variant, y As Variant
For i = 0 To 5
x = 1 ' col #
y = i ' row #
Set hycell = hySS.Cell(x,y)
Debug.Print “CELL VALUE = “ & hyCell.CellValue
Debug.Print “CELL FORMULA = “ & hyCell.CellText
Debug.Print “CELL PROPERTY = “ & hyCell.VariableName & “ (“ &
hyCell.Units & “)”
Next i
Zobrazit stránku 66
1 2 ... 62 63 64 65 66 67 68 69 70 71 72 ... 373 374

Komentáře k této Příručce

Žádné komentáře