Hi friend
I have query regarding QTP datatable.
I want to insert data in datatable during runtime.

suppose i wrote

datatble.value(1) = "Test data"

so when i run the script it says column(1) doesn't exist.

Then i write something in column A1 manualy and run the
script again.

Now it works fine.

Pls clarify how i can put value in blank cell of datatable.




Answers were Sorted based on User's Feedback



Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / arun singh

first of all u have to change the column name.
i.e., double click on A and run the program.

got it.

Is This Answer Correct ?    10 Yes 3 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / rajaputra

Hi,
USE THIS,

datatable.getsheet(1).addparameter"Test",""
datatable(1,1)="Test Data"

Run and see the runtime datatable

Is This Answer Correct ?    7 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / medena

DataTable.GetSheet(1).AddParameter "Test",""
datatable(3,1)="Data Test1"
DataTable.SetNextRow
DataTable(3,1)="Data Test2"

Is This Answer Correct ?    7 Yes 2 No




Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / medena

I use this to fill the column with some values

Is This Answer Correct ?    4 Yes 1 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / sameer

=======
DataTable(ParameterID [, SheetID]) =NewValue This is what
is specified in data table help.

That means you should use:

DataTable.SetCurrentRow(1)
DataTable(1,dtGlobalSheet) = "Test" ...If you are to insert
data in the first row and first column of global sheet.

I am using the same...n it's working..

Is This Answer Correct ?    4 Yes 1 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / prashanth

Hi Friend,

Try this...

In the Datatable, in the first row, first column u can
find "A". DoubleClick on "A" and give any name like..."Test"

Now, in the Active Screen...

DataTable.Value("Test", Global)="Test data"

'Now if you want to use the value present in the datable,
in the script...

K=DataTable.Value("Test", Global)

Now, the value "Test Data" is stored in the variable "K"


Thanks,
Prashanth
prashanth.vikey@gmail.com

Is This Answer Correct ?    4 Yes 1 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / mercy

try putting datatable.value(2.1)="Test data". I have the
same prob...trying to resolve this the same way. will let u
know once done.

Is This Answer Correct ?    3 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / rajasekaran

By using Ouput Values concept we can insert in datatable
during runtime. but we can see the value only in Test
result,select runtime table in left side of he test results

Is This Answer Correct ?    2 Yes 2 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / sekhar

Hi friends,when we need to insert the values in to datatable
we can write script like

datatable("column name",sheetid)=value

Then the given value will be stored in desired sheet and
given column,

Is This Answer Correct ?    0 Yes 0 No

Hi friend I have query regarding QTP datatable. I want to insert data in datatable during runtime..

Answer / siraj

Before inserting value in the cell, first we need to create
column by using "addparameter" then we can insert value in
that column.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer



More QTP Interview Questions

Hi,All How to change background color of a cell in excel using qtp and that too with out using Excel Object.(I am importing the excel sheet by using ImportSheet method)

1 Answers  


Do you know SQL? I know SQL but i don't have any experience...that's it..No more questions ...simply he said " you can leave for the day" ...guys prepare SQL Quires before attending interview in bank of america...

0 Answers   Bank Of America,


How did you resolve conflicts present in Object Repository?

0 Answers  


How you can delete excel file in qtp?

0 Answers  


What environment does qtp run in?

0 Answers  






What is the difference between the keyword view and expert view?

0 Answers  


In real time whenever we found bug , after that where you send to that bug. send to T.Lead or Directly Developer. Plz explain me?

2 Answers  


Can any one tell the different properties and values of differnt objects like Browser,Page,link,webedit,webcombobox,webradio botton,webcheckbox and web button.Because I am facing a lot of problems in interviews with Descriptive Programing.I never worked on web Application...Pls help any one as soon as possible....

2 Answers  


What is the use of sendkeys.In which cases we Use this sendkey.Pls explain with example.

3 Answers   Cap Gemini,


I have a string "Redfort is in Delhi" how do u write vbscript for " Delhi in is Redfort"

4 Answers  


Hi, When iam trying to import sheet to the QTP Global data table at the run time using the Importsheet method.It is able to import the sheet but no data is present after the import due to which the test is failing.Could anyone suggest what should be done. When I open the actual excel sheet data is present and is not corrupted.

2 Answers  


Hi guys, Please suggest some thing these points are correct???, Is UFT 12 and QTP outdated ??? and also VBscript is also deleted/Removed from QTP ???? Javascript is added latest and tool name is called JFT ??? From this year ??

2 Answers  






Categories