Jump to content

How well does AutoIt work with Excel?


 Share

Recommended Posts

I have an Excel spreadsheet with user's First and Last names. I need to write a script that will look in the spreadsheet and take the first 5 letters of the first name and the first 3 letters of the last name and store it in a variable.

For example Jonathon Smith needs to be JonatSmi and stored in a variable "username". Let's say the First name is stored in column B, row 4 and the last name is in column C, row 4. If the name is shorter then the script needs to use as much as possible. For example: John Smith would need to be JohnSmi and stored in a variable.

Additional Information:

Every few months I receive a spreadsheet with employee information for the company I work for. I have to take that information and create usernames and passwords for several different systems unique to our company. My plan is to use a script to find the names in the spreadsheet, shorten the name to fit the format of our naming system (first 5 and first 3), and store it in a variable. Then I will have the script open Internet Explorer, go to the designated address, click on two links, and use that variable to enter the username in the correct field, and click save.

I just need to get an idea of where to start on saving the username in a variable based on information in my spreadsheet. I don't want an entire script from someone because then I wouldn't learn anything.

I know how to write simple programs in C but I have never used BASIC (which I understand is what AutoIt is based off of). So I know the basics of programming (loops and variables, and functions) but I don't know enough about this language to do what I need.

Link to comment
Share on other sites

For example Jonathon Smith needs to be JonatSmi and stored in a variable "username". Let's say the First name is stored in column B, row 4 and the last name is in column C, row 4. If the name is shorter then the script needs to use as much as possible. For example: John Smith would need to be JohnSmi and stored in a variable.

My plan is to use a script to find the names in the spreadsheet, shorten the name to fit the format of our naming system (first 5 and first 3), and store it in a variable.

You'll also need: "StringLeft"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...