Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Writing to datatable- writing the rows in a single line
#1
Not Solved
Writing the output from the application . Need to write the output under 3 column names DDA , Bank ID and Available Balance in the datatable(Bal_DDA).

Code:

Code:
n=DataTable.GetSheet ("Bal_DDA").AddParameter("DDA",DDA)
o=DataTable.GetSheet ("Bal_DDA").AddParameter("BanklD",BankID)
m=DataTable.Getsheet ("Bal_DDA").AddParameter ("Avail_Bal",Avail_bal)
Actual Output :
DDA BanklD Avail_Bal DDA1 BanklD1 Avail_Bal1
44357 182 300 41210 182 0
Expected Output:
DDA BanklD Avail_Bal
44357 182 300
41210 182 0
Reply
#2
Not Solved
Hi Malathy,

Refer the below example as per your requirement.

Code:
DataTable.GetSheet ("Bal_DDA").AddParameter "DDA",""
DataTable.GetSheet ("Bal_DDA").AddParameter "BanklD",""
DataTable.Getsheet ("Bal_DDA").AddParameter  "Avail_Bal",""

Datatable("DDA","Bal_DDA")=44357
Datatable("BanklD","Bal_DDA")=182
Datatable("Avail_Bal","Bal_DDA")=300

Datatable.GetSheet("Bal_DDA").SetCurrentRow(2)

Datatable("DDA","Bal_DDA")=41210
Datatable("BanklD","Bal_DDA")=182
Datatable("Avail_Bal","Bal_DDA")=0

Tip: it is better to maintain the test data in Datatable and use/pass the data from Datatable.
If you do so then we can make use of available Datatable Methods efficiently Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 843 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  Multiple rows of test data Bhuvana 0 1,137 01-03-2020, 09:30 PM
Last Post: Bhuvana
  Grab multiple line data from log file haziqwebs 0 1,699 10-19-2016, 01:28 PM
Last Post: haziqwebs
  Writing to Run time data table Neetha 5 11,651 08-27-2015, 10:18 AM
Last Post: supputuri
  Adding data into rows that add dynamically with setcelldata azar81 4 5,640 04-13-2015, 05:24 PM
Last Post: vidya2k2

Forum Jump:


Users browsing this thread: 1 Guest(s)