Code: Select all
Z::
File = Book1.xlsx
path = %A_WorkingDir%\%File% ; path to workbook
xl := ComObjGet(path) ; access Workbook object
(Sheet := xl.ActiveSheet).Range("A1:A50")
hello := Sheet.Range("A1", Sheet.Cells(xl.Application.Rows.Count,5).End(-4162)).SpecialCells(12).Count
MsgBox, % hello