Method: Cells for Worksheet
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Cells for Worksheet
Method: Cells for Worksheet
Returns a cell of an Excel worksheet.
Set oCell = Object.Cells(Row, Column)
| Object | Worksheet Object with this method |
| Row | LongInteger Specifies the cell row. |
| Column | LongInteger Specifies the cell column. |
| oCell | Cell Returned object |
The following example creates an Excel workbook, fills the first cell with the value 3.14, and outputs this value. Refer to the help page Worksheet for detailed examples:
| VBScript | Python |
Dim oMyWorkbook, oMySheet Set oMyWorkbook = CreateExcelWorkbook() Set oMySheet = oMyWorkbook.Worksheets(1) oMySheet.Cells(1, 1).Value = 3.14 Call MsgBox(oMySheet.Cells(1, 1).Value)