Jump to content

Recommended Posts

Posted (edited)

As the title, I need to get a QR code picture of the cells in the excel file as the picture blow ,but I can only get the value of cell at present,can someone help me?

 

草图.png

Edited by fan_zh
Posted

Are the pictures really "in" the cells or just in front of them?  YOu can access pictures via their object name.  For example,

ActiveSheet.Shapes.Range(Array("Picture 1")).Select

 

Posted (edited)
6 hours ago, lrm said:

Are the pictures really "in" the cells or just in front of them?  YOu can access pictures via their object name.  For example,


ActiveSheet.Shapes.Range(Array("Picture 1")).Select

 

 

same idea which i got from a recorded macro :)

 

 

The issue if too many images, OLE dialog keeps popping up not sure any sysvar to control? 

(defun c:test (/ *error* excel p v wbk obj lst)
  ;copy image from excel
  ;hp 14.05.2020
  (defun *error* (msg)
    (if excel
	 (vlax-release-object excel)
         )
         (terpri)
    (princ msg)
    )
  
  (and (setq p		(getvar 'viewctr)
	     v		'(0 -10 0)
	     excel	(vlax-get-or-create-object "Excel.Application")
	     )
       
       (if (setq fn (getfiled "" "" "xlsx;xls" 16))
	 (setq wbk (vlax-invoke-method (vlax-get-property excel 'WorkBooks) 'open fn)
	       lst (mapcar '(lambda (x /)
			      (setq obj	(vlax-get-property
					  (cond	(obj)
						(excel)
						)
					  x
					  )
				    )
			      )
			   '(ActiveSheet Shapes) ;;;from recorded macro - ActiveSheet.Shapes.Range(Array("Picture 1")).Select
			   )
	       )
	 (prompt "\nOops.. Failed to open file")
	 )
       
       (vlax-for x (cadr lst)
	 (if (and x (vl-position (vla-get-name x) '( "Picture 1"  "Picture 2" ))) ;;<-- Picture list here 
	   (progn (vlax-invoke-method x 'copy) (vl-cmdf "_PASTECLIP" p))
	   )
	 (setq p (mapcar '+ p v))
	 )
       (if excel
	 (mapcar 'vlax-release-object (reverse (vl-list* excel wbk lst)))
	 )
       )
  (gc)
  (princ)
  )

 

Edited by hanhphuc
*error* & picture list
Posted (edited)

QRCODE  bundle makes the QRpatterns just type words etc . I think I got it from Autodesk exchange.

 

 

Business card alanh2.png

Edited by BIGAL
Posted (edited)
2 hours ago, BIGAL said:

QRCODE  bundle makes the QRpatterns just type words etc . I think I got it from Autodesk exchange.

 

 

Business card alanh2.png

Do you mean there is a special QR conversion program provided by Autodesk?

Where can I get it ? thanks

Edited by fan_zh
Posted
7 hours ago, lrm said:

Are the pictures really "in" the cells or just in front of them?  YOu can access pictures via their object name.  For example,


ActiveSheet.Shapes.Range(Array("Picture 1")).Select

I am sure it's really in the cell, Because when I use the cursor to move to the corresponding cell, I can copy and paste the QRcode in it

 

 

Posted
14 hours ago, BIGAL said:

QRCODE  bundle makes the QR patterns just type words etc. I think I got it from Autodesk exchange.

 

 

no luck if plugin only supports 2016-2020?

IIRC, ZWCAD Qrcode app is built-in, insert as block if exploded each pixel 1 unit length x 1 unit width of LWPOLYLINE (square)

 

see also Qrcode arx

 

p/s: "How to get the picture in the cell of Excel" or "How to put Qrcode in CAD"? :sweat:

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...