View Single Post

  #6 (permalink)  
Old 11-30-2007, 07:16 AM
aj.deepika aj.deepika is offline
deeps
 
Join Date: Nov 2007
Location: Bangalore,India
Posts: 1
aj.deepika is on a distinguished road
Ans for Doubt No.1

for importing a file:

DataTable.Import "filename.txt"

(you have to write the path name also for eg:
DataTable.Import "C:\Documents and
Settings\mercury\Desktop\fly.txt")

for Exporting a file:

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.CreateTextFile("fileName.txt",True)

(Eg:Set MyFile = fso.CreateTextFile("C:\Documents and Settings\mercury\Desktop\flight.txt",True)

MyFile.WriteLine("Fly_From"&" "&"Fly_To"&" "&"Order_No"&" "&" Flight" )


C1=DataTable.Value(1,1)&" "
C2=DataTable.Value(2,1)&" "
C3=DataTable.Value(3,1)&" "
c4=DataTable.Value(4,1)
B=C1&C2&C3&c4
MyFile.WriteLine(B)

This is just an example
Note: To get the contents in diff column in Exel sheet give tab.
Reply With Quote