Obtain First row, Last row, # Used rows from Excel via AutoHotkey and COM

rows from Excel via AutoHotkeyBeing able to use AutoHotkey to automate Excel via COM is awesome!   In this video we walk through using these functions to obtain First row, Last row and # of used rows from Excel via AutoHotkey.

The below video demonstrates how easy it is to, programatically, obtain row information from the active worksheet.

Video walking through functions to obtain rows from Excel via AutoHotkey

Using AutoHotkey to get Row information from Excel via AutoHotkey & COM

Shading cells in Excel with AutoHotkey via COM

Shading cells in Excel with AutoHotkeyShading cells in Excel with AutoHotkey

Connecting to Excel with AutoHotkey is a breeze with COM.  Once you have a connection to the correct Excel object (in this case the worksheet) setting the cell shading is super easy!

In the below video I use the following function Shading cells in Excel with AutoHotkey

Fifty-six frequently used colors

Shading cells in Excel with AutoHotkey

Video demonstrating Shading cells in Excel with AutoHotkey

Using AutoHotkey to color Ranges in Excel

AutoHotkey and Excel Object model: Application, Workbook, Worksheet

AutoHotkey and Excel Object modelWhile using AutoHotkey to connect to Excel is “easy”, it is also easy to be trying to use call a function to the wrong Excel object.  In this video we discuss the below diagram and explain how to use AutoHotkey and Excel Object model.

autohotkey-and-excel-object-model

Here is the function for specifying which Excel object you want to connect to

Video walking through AutoHotkey and Excel Object model

AutoHotkey and Excel Objects-Application, Workbook, Worksheet

Create / Connect to Excel with AutoHotkey via COM

excel-with-autohotkey

Automating Excel with AutoHotkey is pretty easy however first connecting with the Excel object can be a bit confusing.

This video walks through both connecting with a running Excel application and creating a new one.  It also walks you through how to set the object visible (and use the Task Manager to see if it exists)

Here is the code reviewed in the video:

Creating & Connecting to Excel with AutoHotkey via COM

Creating & Connecting to Excel with AutoHotkey