马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 Lispboy 于 2016-7-19 00:18 编辑
- (defun XD::Table:GetMerge (tb inx / cols el i j lst merge mlst rows typ x)
- (setq typ (XD::Table:TYPE tb))
- (cond
- ((= typ "X")
- (setq el (xdrx_block_getentities tb))
- (cond
- ((= (type inx) 'INT)
- (nth inx (XD::Table:getmerge tb t))
- )
- (t
- (mapcar
- '(lambda (x)
- (if (= 1 (xdrx_object_getxrecord x "MergeCell"))
- (setq lst (cons (xdrx_object_getxrecord x "scope") lst))
- )
- )
- el
- )
- (reverse lst)
- )
- )
- )
- ((= typ "A")
- (cond
- ((= (type inx) 'INT)
- (nth inx (XD::Table:getmerge tb t))
- )
- (t
- (setq rows (xdrx_table_numrows tb)
- cols (xdrx_table_numColumns tb)
- )
- (setq i 0
- mlst nil
- )
- (repeat rows
- (setq j 0)
- (repeat cols
- (if (setq merge (xdrx_table_ismergedcell tb i j))
- (progn
- (if (not (member merge mlst))
- (setq mlst (cons merge mlst))
- )
- )
- )
- (setq j (1+ j))
- )
- (setq i (1+ i))
- )
- (reverse mlst)
- )
- )
- )
- ((= typ "E")
- (xdex_sheet_getMergeCell inx)
- )
- )
- )
|