07-14-2010, 03:15 PM
Hi,
You can use the below code to work like Datatable.Import i.e which will add all the field names (available in data base) to excel i.e outsheet
Please let me know if you need any clarification
Regards,
Venkat.Batchu
You can use the below code to work like Datatable.Import i.e which will add all the field names (available in data base) to excel i.e outsheet
Code:
set outsheet=Datatable.Addsheet("output")
'This for loop is used to add the fields to excel
For each fld in adoRecordset.Fields
outsheet.AddParameter(fld.name)
Next
While adorecordset.eof( )
'This for loop is used to add the field values to respective field names.
For each fld in adorecordset.Fields
outsheet.GetParameter(fld.name).value=fld.value
Next
Loop
Please let me know if you need any clarification
Regards,
Venkat.Batchu