Wednesday, December 3, 2008

To get the only numbers from the flat file and store in a datatable

'bombay 100 hyderabad jkjk '
'djkhkk ksljk 88 asdk '
'dkjsajl kskj kjhsjk 88 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''To get the only numbers from the flat file and store in a datatable''''''''''''''''''''''''''''''''''''
set fso=createobject("scripting.filesystemobject")
set oText=fso.opentextfile("c:/demo.txt",1)
datatable.getsheet(1).addparameter"Numbers",""
row=1
While not oText.atendofline
text=oText.readline
n=split(text," ")
for i=lbound(n) to ubound(n)
If isnumeric(n(i)) then
datatable.setcurrentrow(row)
datatable(1,1)=n(i) '''''''''''''''datatable(ColumnNo,SheetNo)
row=row+1
end if
Next
wend

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.