The "Get_Excel" function (found on the forums) gives me a solid handle on the workbook. And, this code works... it's just... ugly:
Code: Select all
xl := Excel_Get()
t := xl.ActiveSheet.ListObjects(1)
t.ShowTotals := 1
colName := "A Known Column Heading Name"
xl.Range(t.Name . "[[#Totals],[" . colName . "]]").Formula := "=SUBTOTAL(109,[colName])" ; this is the line I'm trying to improve upon
I wish this would work but it doesn't:
Code: Select all
t.ListColums(colName).TotalsRowRange.Formula := "=SUBTOTAL(109,[colName])"