Micro Focus QTP (UFT) Forums
Assign a variable to cell in DataTable - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Assign a variable to cell in DataTable (/Thread-Assign-a-variable-to-cell-in-DataTable)



Assign a variable to cell in DataTable - yonobev - 10-08-2009

How can I assign avariable to a cell in DataTable. I'm really a newbie in QTP. Thanks!


RE: Assign a variable to cell in DataTable - Saket - 10-08-2009

You can use DataTable("Column",dtlocalsheet) = your Variable


RE: Assign a variable to cell in DataTable - Bluefields - 10-09-2009

And how can a variable be assigned to a specific cell, let's say "K3"?

Thx for replies!


RE: Assign a variable to cell in DataTable - Saket - 10-09-2009

You can directly assign a value to a cell.
you will need to set the current row first then set the value to a particular column.

use SetCurrentRow method to set your row as 3
then use above code to set your value in column K of your sheet.