Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Get excel cell value from external excel spreadshe

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,118
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Get excel cell value from external excel spreadshe
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Get excel cell value from external excel spreadshe - 6/6/2001 4:38:10 AM   
  ekiko

 

Posts: 14
Score: 0
Joined: 5/23/2001
From: New Zealand
Status: offline
I'm using a terminal emulator that has vbscript capability. I need to
fill the fields on the screen with data from an external microsoft
excel spreadsheet. I know how to position the cursor on the
screen.

I need to know how to get the specific cell contents from an
external microsoft excel spreadsheet and "paste" them on the
screen.
 
 
Post #: 1
 
 Re: Get excel cell value from external excel spreadshe - 6/6/2001 4:39:54 AM   
  pagooda

 

Posts: 54
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
I don't know what kind of environment you are running on, but if
you have access to the Excel-component, sometinhg like this might
work:


Dim CellContent, ExcelSheet
Set ExcelSheet =
CreateObject("Excel.Sheet")

ExcelSheet.Application.Visible = True

CellContent =
ExcelSheet.ActiveSheet.Cells(1,1).Value

'Print CellContent to your fields.

ExcelSheet.Application.Quit
Set ExcelSheet = Nothing

(in reply to ekiko)
 
 
Post #: 2
 
 Re: Get excel cell value from external excel spreadshe - 6/6/2001 4:41:34 AM   
  daydreamer

 

Posts: 19
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
I have been rying to use this code and when I try to run it I get an
error msg object required. what could be the cause.

(in reply to ekiko)
 
 
Post #: 3
 
 Re: Get excel cell value from external excel spreadshe - 6/6/2001 4:42:52 AM   
  pagooda

 

Posts: 54
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
There are several possibilities for this error to occur.

The CreateObject method belongs to the Server object
(Server.CreateObject), so it is quite possible that the terminal
emulator don't support use of the Server object.

The object you are trying to create an instance of, in this case
Excel, is not available on the server. Is Excel installed?

It might also be that your security options for Microsoft Internet
Explorer must be set to enable ActiveX controls and plug-ins.
Check your browser's security page. In Microsoft Internet
Explorer, open the View menu, choose Options, click the Security
tab, and make sure the Enable ActiveX Controls And Plug-Ins
check box is checked.

(in reply to ekiko)
 
 
Post #: 4
 
 Re: Get excel cell value from external excel spreadshe - 6/6/2001 4:44:03 AM   
  winkumpel

 

Posts: 11
Score: 0
Joined: 5/23/2001
From: Netherlands
Status: offline
Well I am using Astra Mercury interactive tool to devlope a testing
tool that that can be used by the tester here.
Now astra is designed in VB script. I have used the Create object
method to create record sets and connections they have not given
me any problem. But when I used your method it didnt work any
way the same method is also given in the Astra Help but that
doesnt even work.
But when I used Server.CreateObject to get connected to the
Database and and create a record set it asked for the object
server.
Seeing the method that you are using I got an Idea to use it as The
task I have been Assigned I cant do the way I have been thinking
of doing it any way. The conclussion is that I am totally lost now.
Thanx

(in reply to ekiko)
 
 
Post #: 5
 
 Re: Get excel cell value from external excel spreadshe - 6/6/2001 4:45:24 AM   
  pagooda

 

Posts: 54
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
As I've mentioned twice already, when you use
CreateObject("Excel.Sheet"), you must have the
Excel component installed. Do you?

(in reply to ekiko)
 
 
Post #: 6
 
 Re: Get excel cell value from external excel spreadshe - 3/11/2003 7:53:04 AM   
  joolzhaines

 

Posts: 2
Score: 0
Joined: 3/11/2003
From:
Status: offline
Can you read the cell formating in the same way you read the cell text. eg border(Left/Right/Top or Bottom or all)

Thanks

Joolz

(in reply to ekiko)
 
 
Post #: 7
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Get excel cell value from external excel spreadshe Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts