Thread Rating:
  • 4 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whether xlsx extension works while importing data sheet?
#14
Solved: 10 Years, 9 Months ago
Hi all,



Code:
Set oexcel = CreateObject("Excel.Application")
Set obook = oexcel.Workbooks.Open("C:\QTP_Assignment.xlsx","Append")
Set objDriverSheet =  obook.Worksheets("Mukesh")


' Writing values into excel sheet

objDriverSheet.Cells(2,5) = "111111111"
objDriverSheet.Cells(3,5) = "22222222"
obook.Save
obook.Close


///////////////////////////////////////////////
when i run this script i get an run error like this

////////////////////////////////////////////////////////
The test run cannot continue due to an unrecoverable error.

Microsoft Office Excel cannot access the file 'C:\76149810'. There are several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.

////////////////////////////////////////////////////////////////
The data 111111111 and 22222222 was written into the excel sheet.
I think i have to open the file in the append mode as it tries to write a new file with the same name.Can anyone help me how to open the xlsx
file in the append mode


Thanks
Reply


Messages In This Thread
RE: Importing data sheet format? - by Akhila - 09-30-2008, 06:26 AM
RE: Whether xlsx extension works while importing data sheet? - by mukesh_shenoy18 - 04-12-2011, 11:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading data from excel sheet serenediva 1 8,916 03-03-2017, 10:07 AM
Last Post: vinod123
  Chrome Extension UFT Agent for Chrome Browser testing with UFT santhosh kumar 2 12,112 04-20-2016, 01:20 AM
Last Post: santhosh kumar
Question QTP not performing iterations based on local data sheet Breaker 18 55,329 01-25-2016, 04:32 PM
Last Post: arunshuklainbox
  How QTP record/play works on google chrome shobi 6 7,153 01-11-2016, 09:53 AM
Last Post: vinod123
  Importing data sheet Santu 2 3,209 08-20-2015, 11:37 PM
Last Post: ADITI1992

Forum Jump:


Users browsing this thread: 1 Guest(s)