| || |
How to Add the data to the empty Excel sheet-i.e creating my user defined template?
i am facing a problem.i had my output excel sheet for viewing my result,which i created through QTP.Now i am asked to create user defined excel template also through my codings.And since i am importing a plain excel to my global sheet i am unable to create my desired template.my templete should get created as per my inputs(i have a seperate excel to give the inputs to my queries).Please help me..
my codings for creating a excel is :
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("C:\Documents and Settings\278155.CHENNAIODC\Desktop\book2.xls", True)
DataTable.ImportSheet "C:\Documents and Settings\278155.CHENNAIODC\Desktop\book2.xls" ,1 ,"Global"
DataTable.Value (1,1)="New York"
How can i put in my data in column 2,row 3,4,5,6.....
please help me regarding this..........
Re: How to Add the data to the empty Excel sheet-i.e creating my user defined template?
i would suggest you to use Excel COM API's to create your sheet. The forum has many code snippets for the same and you can search for that and modify as per your needs...