07-09-2012, 11:28 PM
I have a test I am running that exports data to Excel. The first time I run the test it creates the file no problem but then when it loops through for the second time it hits this code and errors out saying The DataTable.Export (file) operation failed.
Cannot open the D:\CDC-Automation\Data\Iteration1\Build5_7\Target\Target_Scan_URL.xls file because it is already open in another application.
Function file: D:\CDC-Automation\CDC_QTP_MAIN\Function Libraries\CDC_functions.qfl
Line (694): " datatable.export Target_file".
If instr(url_location,"Source") <> 0 then Source_file=file_dir & "Source_Scan_" & file_name
datatable.export Source_file
elseif instr(url_location,"Target")<> 0 then]
Target_file =file_dir & "Target_Scan_" & file_name Source_file=Replace(Target_file, "Target", "Source") datatable.export Target_file
end if
Any suggestions?
Cannot open the D:\CDC-Automation\Data\Iteration1\Build5_7\Target\Target_Scan_URL.xls file because it is already open in another application.
Function file: D:\CDC-Automation\CDC_QTP_MAIN\Function Libraries\CDC_functions.qfl
Line (694): " datatable.export Target_file".
If instr(url_location,"Source") <> 0 then Source_file=file_dir & "Source_Scan_" & file_name
datatable.export Source_file
elseif instr(url_location,"Target")<> 0 then]
Target_file =file_dir & "Target_Scan_" & file_name Source_file=Replace(Target_file, "Target", "Source") datatable.export Target_file
end if
Any suggestions?