一个循环的问题
我想在有一个excel 表,想读取其中B5、C5.......的值,当其中一个值为空的时候,返回这个单元格的行数(比如15),请问如何实现????(defun c:tt()
(setq n 5)
(setq b5 (strcat "B"(itoa n) ))
(setq B5value nil)
(while (= b5value "")
(setq B5Value(vlax-variant-value(vlax-get-property
(setq A1Range(vlax-get-property
(setq Workheet(vlax-get-property
(setq Worksheets(vlax-get-property
(setq cFile(vlax-invoke-method
(setq Workbooks(vlax-get-property
(setq Excel(vlax-get-or-create-object "Excel.Application"))
'Workbooks)) 'Open eFile)) 'Worksheets)) 'Item 1)) 'Range B5))'Formula)))
(setq n (+ n 1))
)
)
如何修改????????
页:
[1]