@DGCSCAD You don't load the library, it isn't formatted properly. I'd copy paste what you want from it. He has two types of getcell functions. Either should work but note he doesn't define the variable in the function.
I personally never get a singular cell but rather a whole row or column of information. Here is an example of getting an entire row of info.
;Range -- Defined range in Excel. Typically use 'UsedRange of a sheet or active sheet.
;rowNum -- Can be either a number or letter representing the desired excel row. 1 for the first column.
(defun excelGetRowData2 (range rowNum / vD)
(if
(setq vD
(vlax-variant-value
(vlax-get-property
(vlax-variant-value
(vlax-get-property
(vlax-get-property range "Rows")"Item" rowNum)
)
'value
)
)
)
(progn
(setq vD (vlax-safearray->list VD));Safe Array of the variant data of an entire column
(mapcar '(lambda (x) (vlax-variant-value (vlax-variant-change-type x 8))) (car vD)) ;Returns a list of the variant data in string format.
;Data could be transformed into other formats via different variant change types
)
)
)
You could then call it like such (assuming you have an excel file open).
(defun c:excelGetRow ( / rowNum range)
(setq rowNum 1)
(setq range (vlax-get-property (vlax-get-property (vlax-get-or-create-object "Excel.Application") 'ActiveSheet) 'UsedRange))
(setq lst (excelGetRowData2 range rowNum))
(print lst)
(princ)
)
If you just wanted a singular cell though, copy one of his functions and setq the variable he is not declaring to the same stuff as my range (IIRC).