You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on a project using WINCC and I am utilizing the VBSReoGrid control to load and manipulate an Excel file. I have successfully loaded an Excel file into the ReoGrid control, but I am having trouble reading and writing cell values using VBS (VBScript).
On Error Resume Next
' Write text to specific cells, e.g., E6 to E9
Dim row
For row = 5 To 8 ' Row index 5 to 8 (E6 to E9)
Grid.SetCellText row, 4, "Test Value " & (row + 1)
Next
' Read values from E6 to E9
Dim cellValue
For row = 5 To 8 ' Row index 5 to 8 (E6 to E9)
cellValue = Grid.GetCellText(row, 4) ' Assuming GetCellText method is available
' Check and display the cell value
If IsEmpty(cellValue) Or IsNull(cellValue) Then
MsgBox "The value in cell E" & (row + 1) & " is empty."
Else
MsgBox "The value in cell E" & (row + 1) & " is: " & cellValue
End If
Next
The text was updated successfully, but these errors were encountered:
I am currently working on a project using WINCC and I am utilizing the VBSReoGrid control to load and manipulate an Excel file. I have successfully loaded an Excel file into the ReoGrid control, but I am having trouble reading and writing cell values using VBS (VBScript).
On Error Resume Next
Dim Grid
Set Grid = ScreenItems("Grid")
' Load Excel file
Grid.Load("C:\Recipes\POE配方报表模板.xlsx")
' Write text to specific cells, e.g., E6 to E9
Dim row
For row = 5 To 8 ' Row index 5 to 8 (E6 to E9)
Grid.SetCellText row, 4, "Test Value " & (row + 1)
Next
' Read values from E6 to E9
Dim cellValue
For row = 5 To 8 ' Row index 5 to 8 (E6 to E9)
cellValue = Grid.GetCellText(row, 4) ' Assuming GetCellText method is available
Next
The text was updated successfully, but these errors were encountered: