11-03-2010, 12:16 PM
Hi,
I have a large xml file which will result more than 65000 rows most likely 300000. And I have noticed data table in QTP have a limit of 65000 rows. Can some one tell me how to overcome this constraint and write all the xml results to an excel file.
Following is the logic i'm trying:
I have a large xml file which will result more than 65000 rows most likely 300000. And I have noticed data table in QTP have a limit of 65000 rows. Can some one tell me how to overcome this constraint and write all the xml results to an excel file.
Following is the logic i'm trying:
Code:
Const XMLDataFile = "C:\Users\damulur\Desktop\on_mov_programs-db_20101011_1.xml"
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(XMLDataFile)
datatable.AddSheet("output").AddParameter "TMSID",""
prg ="on/programs/program"
Set prg1=xmlDoc.selectNodes(prg )
For i=0 to (prg1.length-1)
TMS=prg1.item(i).getAttribute("TMSId")
DataTable.Value("TMSID","output") =TMS
DataTable.SetCurrentRow(i+1)
Next
DataTable.ExportSheet "C:\Users\damulur\Desktop\1.xls","output"