Writing values to Excel in TD
I am try'n to write values to excel sheet attached to a folder in TD, I am usin the following code for that
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.Workbooks.Open( "[QC-ATTACH];;Subject\Automation\resources\data;;\generate_sam ple.xls")
Set NewSheet = ExcelObj.Sheets.Item(1)
strWebsite = DataTable("website",2)
NewSheet.Cells(i+1,1) = strWebsite
Using this I am unable to write to that file and eventually my test is also failed because of this even though all the operations are sucessful except writing this values.
Please suggest me a solution.
Re: Writing values to Excel in TD
You cannot use QCPath with excel COM APIs this way. It is QTP only function that understand such paths. You need to download the file first and then access the values.