Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


read content from an excel

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> read content from an excel
  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 >>
 read content from an excel - 5/5/2008 1:39:41 AM   
  net_Savy

 

Posts: 2
Score: 0
Joined: 5/5/2008
Status: offline
Hi,

I want to know how to read content from an excel.

basically want to configure network printer, so i have created a excel sheet with the printer share name.

i want to create a script which can read from the excel and configure the printer.

Script i am using :

'// Name: setprint.vbs
Set WshNetwork = CreateObject("WScript.Network")
'// Adds the printer. Substitute your server name and printer share.
WshNetwork.AddwindowsPrinterConnection "\\Servername\printer sharename"

_____________________________

:)
Netsavy
 
 
Post #: 1
 
 RE: read content from an excel - 5/5/2008 1:46:19 AM   
  dm_4ever


Posts: 2172
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
Read:  http://www.microsoft.com/technet/scriptcenter/scripts/office/excel/default.mspx

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to net_Savy)
 
 
Post #: 2
 
 RE: read content from an excel - 5/5/2008 2:45:37 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi net_Savy,

after following dm_4ever's advice and having seen how to use "Excel.Application" from VBScript,
you may consider whether using ADO and treating the worksheet as a (simple) database table
isn't easier/less errorprone.

Regards

ehvbs

(in reply to net_Savy)
 
 
Post #: 3
 
 
 
  

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 >> read content from an excel 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