| || |
Save output data in existing excel sheet.
My question is i have stored some output data in excel sheet and after that i have saved that sheet. Now i again want to save data in same excel sheet but i want the previous data to remain in that means i want to append that file. First i saved data in column "A" now i want to add data in "B"
How is it possible?
Re: Save output data in existing excel sheet.
Import the excel sheet into qtp datatable. now add a new column to the datatable using AddParameter method. update the data and export the datatable to excel. you can also replace the existing excel sheet or you can also create a new one..
Create an object model of excel application somthing like this..
Set ExApp = CreateObject("Excel.Application")
Set ExWkBk = ExApp.Open("C:\FileName.xls")
ColCount = ExWkBk.Sheets(1).UsedRange.Columns.Count
ColCount+1 will be your new column where you can append new values.