我给你的问题的程序也写好了的,怎么没有放上去?再贴一次,你好好看看,这里也有写文字的部分- (defun main( / filename sheet zin)
- (setq zin (getvar "dimzin"))
- (setvar "dimzin" 1)
- (setq filename (getfiled "打开存放数据的Excel电子表格文档" "e:\\wjh\\study\\autolisp\\nodbird\" "XLS" 8))
- (if filename
- (progn
- (setq appsession (Exl-Open filename "SHOW"))
- (setq sheet (vlax-get-property appsession 'ActiveSheet))
- (SETQ A (GetRange sheet "B5" "C20"))
- (Exl-quit appsession)
- (setq a (mapcar '(lambda(e) (if (not (vl-every 'null e)) e)) A))
- (setq a (vl-remove nil a))
- (draw a)
-
- )
- )
- (setvar "dimzin" zin)
- (princ)
- )
|