Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Read excel values into script without opening excel

This is a discussion on Read excel values into script without opening excel within the QTP forums, part of the Software Testing category; hi, I would like to get values from excel sheet without having to open the excel application. The code right now i have with me always opens the excel sheet ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 02-11-2008
Junior Member
 
Join Date: Feb 2007
Location: Hyderabad
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
nemishdmehta is on a distinguished road
Read excel values into script without opening excel

hi,

I would like to get values from excel sheet without having to open the excel application. The code right now i have with me always opens the excel sheet and then reads from it, instead is there a way to read the values without opening the excel workwook.

The code is

dim sExcelObj
dim sWorkBook
dim sWorkSheets
dim sValue


set sExcelObj = CreateObject("Excel.Application")
sExcelObj.Visible = true
set sWorkBook = sExcelObj.Workbooks.open("c:\book1.xls")
set sWorkSheets = sWorkBook.worksheets ("Sheet1")
sValue = sWorkSheets.cells(3,1).value

Thanks in advance

Regards
Nemish
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-11-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 354
Thanks: 4
Thanked 58 Times in 47 Posts
bizzzzzare will become famous soon enough
Re: Read excel values into script without opening excel

Try commenting the line of code -

sExcelObj.Visible = true

I suppose that should do the trick !!

Cheers....
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
DML for excel csv source anil.kv Data Warehousing 2 09-25-2009 05:08 AM
Export to excel paritosh.garg JavaScript 2 02-12-2009 08:44 AM
Excel srinii_vasu Testing Issues 2 02-23-2008 12:12 AM
microsoft excel raj.aura Database General 1 04-26-2007 06:18 AM


All times are GMT -4. The time now is 04:54 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved