Jump to content

How to make a workflow that will search for {query} in a specific file?


Recommended Posts

Hey everyone!

 

I only recently found out about Alfred, and it was only a matter of days before I purchased the powerpack. GREAT little app that has already made my life so much easier, and I'm hoping to continue expanding upon my [pretty basic but helpful] workflows!

 

As it stands, I work online, and part of my job involves cataloguing IP addresses for record-keeping, and my process has general been:

 

  1. Visit an IP Address tracking website to get my own IP
  2. Copy the given IP address
  3. Paste the given IP address in the search bar of the specific excel sheet used for work
  4. If no results come up [meaning it's a new IP address], I register the IP address to a new account designated by a new row in the spreadsheet
  5. If a result comes up, then I continue using the IP with it's previously designated account.

Thanks to this great community, I've already found and tinkered with a workflow that grabs your external IP address from within Alfred itself through a keyword and copies it to your clipboard.

 

I'm now trying to expand upon that and have it instantly search that particular excel file [which is always open anyways] instantly from Alfred.

 

Just in case I"ve been hard to follow, I'm hoping to design a workflow that:

 

  1. Retrieves your external IP address
  2. Sends the result as a search query to a specific excel document

It seems simple enough, yet I just can't seem to do it >_< [and I'm sure it's probably something super simple that I'm just not doing right]

 

If possible, I'd love to go even further and have Alfred report the particular Row that the result was already contained in [basically returning as a notification the contents of the box containing the account name with the IP], but this is a feature I'm fine with passing up, I'm mostly just trying to get the whole "query for IP, send to search within Excel" bit down.

 

Any and all help would be HIGHLY appreciated!

Link to comment

In order to interact with Excel you'll have to play with Applescript. There seem to be a lot of resources around the web on how to use Applescript with Excel, but a nice place to start is just to open Applescript Editor, click File -> Open Dictionary, and select Microsoft Excel. There you'll see the list of Applescript commands that Excel provides.

 

You should be able to find just about all you need in there to get you running.

Link to comment

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
×
×
  • Create New...