Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Storing data in excel sheet
#2
Not Solved
If you can tell us how you are connecting to excel, that will be helpful for us to help you.
Paste your lines of code.

I guess you are using ADODB to connect to excel , if so try the code below
Code:
Dim cn  
Set cn = CreateObject("ADODB.Connection")

cn.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ=D:\My QTP\ExcelADO\Test.xls; ReadOnly=False;"
Set rs = cn.Execute ("update [sheet1$] set USER_NAME = 'niss1234' where KEY = 'LOG2'")
Set rs = cn.Execute ("select * from [sheet1$] where KEY = 'LOG2'")
msgbox rs.Fields("USER_NAME").Value

Reply


Messages In This Thread
Storing data in excel sheet - by linhke - 12-10-2009, 08:08 PM
RE: Storing data in excel sheet - by Saket - 12-11-2009, 11:07 AM
RE: Storing data in excel sheet - by linhke - 12-13-2009, 08:15 PM
RE: Storing data in excel sheet - by linhke - 12-11-2009, 03:36 PM
RE: Storing data in excel sheet - by Saket - 12-14-2009, 10:00 AM
RE: Storing data in excel sheet - by linhke - 01-26-2010, 08:37 PM
RE: Storing data in excel sheet - by linhke - 01-27-2010, 01:57 PM
RE: Storing data in excel sheet - by Saket - 01-27-2010, 02:33 PM
RE: Storing data in excel sheet - by linhke - 01-28-2010, 09:53 AM
RE: Storing data in excel sheet - by Saket - 01-28-2010, 01:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP/UFT - Storing Multiple Arrays In An Array Eitel13 0 1,794 07-17-2018, 04:37 PM
Last Post: Eitel13
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,707 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  Search and import data from excel under some rules. nwpulele 2 2,908 02-19-2015, 04:10 AM
Last Post: supputuri
  Custom sort -Excel Sheet kiran 1 3,857 01-28-2014, 09:23 AM
Last Post: supputuri
  How to populate data in weblist using excel vijifun 1 3,298 12-05-2013, 12:06 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)