Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting from excel

Status
Not open for further replies.
May 10, 2002
77
US
I have a rather large excel spreadsheet that contains local username and passwords. I have a script that allows me to manually type in the username and password and then run it and it creates everything I need on the server. Is there a way to script from excel pulling out this data and looping it through my script so that I do not manually have to add in each row?

TIA!!!!!
 
kinda depends what youe 'script' is written in really.....

You can certainly use VBA to iterate through records, pulling out details one at a time.......whether you can pass that data to your script or call your script from VBA kinda depends on my 1st statement.

More info = better answer
 



and...

VBA Visual Basic for Applications (Microsoft) Forum707

Skip,

[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue]
 
Here is the script that we are using to import the users from the excel sheet my hand.

strComputer = "computername"

Set colAccounts = GetObject("WinNT://" & strComputer & "")

Set objUser = colAccounts.Create("user", "3s14t")

objUser.SetPassword "59gsly14"

objUser.SetInfo


 
...so not VBA then - sorry but you are not even close to being in the right forum. This is for MSOffice applications. VBA questions should be asked in forum707 (as Skip has already pointed out). VB questions should be asked in one of the (several) VB fora
 
But it's not a vb question. It's an excel question. I need to know how to export data from an excel spreadsheet and be able to put it into a text file even, just certain fields and loop through them (it just so happens to be a script that I need to loop the information) and if I even need this script. The information I need is located in excel. I am not familiar in everything that excel is capable of doing. If there is no way of doing this with excel, please let me know. I have to restart a way of doing this. Thanks guys for answering me.
 


VBA Forum707.

If the solution can be accomplished within spreadsheet functionality, then its the MS Office Forum68.

However, if it's Word, Excel, Powerpoint, etc. programatic solutions, its VBA Forum707.

Skip,

[glasses] [red]Be Advised![/red] Dyslexic poets...
write inverse! [tongue]
 
....aaaaaaaahhhhh....finally.......the actual question.

Why was
I need to know how to export data from an excel spreadsheet and be able to put it into a text file
so hard to ask the 1st time ???

To get data from excel into a text file, the easiest way is to simply save the excel file AS a text file. This is one of the standard options when saving. If that is not an option, it is simple enough to loop through rows and export data to a text file. If you need to do this, please post in forum707 with a question along the lines of:

How do I loop through rows in excel and export the data to a text file?

 
Thank you. I'm sorry. Did not realize this was the wrong forum for what I was asking :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top