(vlax-put-property range 'value (vlax-make-variant "字符串2"))为什么错
(defun c:test (/ Excel wbooks wbook sheet cells range);(setq Excel (vlax-create-object "excel.application"))
(setq Excel (vlax-get-or-create-object "excel.application"))
(vla-put-Visible Excel :vlax-true)
(setq wbooks (vlax-get-property Excel 'workbooks))
(setq wbook (vlax-invoke-method wbooks 'add))
(setq sheets (vlax-get-property wbook 'sheets))
(setq sheet (vlax-get-property sheets 'item 1))
(setq cells (vlax-get-property sheet 'cells))
(setq range (vlax-get-property cells 'range "A1"))
(vlax-put range 'value "字符串1");此处为什么不能用(vlax-put-property range 'value (vlax-make-variant "字符串2"))代替
(alert (vlax-get range 'value));(alert (vlax-variant-value (vlax-get-property range 'value)))
(princ)
)
(vlax-put-property range 'value (vlax-make-variant "字符串2"))为什么错,而(vlax-put range 'value "字符串1")则正确。
高手们关注一下!! 会不会后者是早期的,前者是后期的,AutoCAD开倒车?
页:
[1]