明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: rahim96

[讨论] 如何把CAD里面的每个数字导出到EXCEL?

  [复制链接]
发表于 2011-3-21 14:59 | 显示全部楼层
回复 仲文玉 的帖子

能不能具體的講一下,尤其是怎麼把字符寫入對應的csv欄位和列位.謝謝
发表于 2011-3-21 22:40 | 显示全部楼层

  1. (defun c:test()
  2.    (if (setq ssa (ssget "x" '((0 . "text"))))
  3.        (progn
  4.             (setq name (open "d:\\test.csv" "w")
  5.                   n    (sslength ssa)
  6.                   i    0
  7.             )
  8.             (repeat n
  9.                 (setq ent (ssname ssa i)
  10.                       zfc (cdr (assoc 1 (entget ent)))
  11.                       i   (1+ i)
  12.                 )
  13.                 (if (= (read zfc) (atof zfc))
  14.                     (princ (strcat zfc "\n") name)
  15.                 )
  16.             )
  17.             (close name)
  18.    
  19.        )
  20.    )
  21.    (princ)
  22. )
发表于 2018-3-23 16:04 | 显示全部楼层
谢谢! yshf 分享实用程序!!!!
发表于 2023-6-2 14:16 | 显示全部楼层

感谢分享程序
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-30 22:51 , Processed in 0.157465 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表