I'm trying to write a script to do some manipulations to an excel spreadsheet before pulling information out of it to be used in another application, but I can't get some of the COM commands to work.
Here's my code as is:
Code: Select all
#!g::
Xl.Worksheets(1).ShowAllData ;Because the Excel doc is filtered when I receive it
Xl.Intersect(Columns("G"), ActiveSheet.UsedRange).Replace "0*", "#N/A", xlPart ;
Xl.Intersect(Columns("G"), ActiveSheet.UsedRange).SpecialCells(xlConstants, xlErrors).EntireRow.Delete
Return
I would normally just use VBA in Excel, but I want this script to be attributable within my company so I was hoping to keep it all within one file. But if you have another suggestion for how I could use VBA in Excel, and call it from AHK somehow, that would work as well.
Thanks!
Paul