Click2XLS AND Text2XLS

Click2XLS AND Text2XLS

adaptacad
Advocate Advocate
9,779 Views
26 Replies
Message 1 of 27

Click2XLS AND Text2XLS

adaptacad
Advocate
Advocate

Hello guys.
Does anyone have a .LSP with or without the .VLX codes?
or something like that ?

 

https://www.youtube.com/watch?v=FwW1HIVSOVk

0 Likes
9,780 Views
26 Replies
Replies (26)
Message 2 of 27

cadffm
Consultant
Consultant
Sure, someone have a function like this, incl. me.
But why do you asking us and why you dont use this tool what you found (cadstudio)?

Sebastian

Message 3 of 27

Anonymous
Not applicable

I use something like that, as a bridge between AutoCAD and Excel I have no idea.

 

(defun LM:writecsv ( lst csv / des sep )
  (if (setq des (open csv "w"))
    (progn
      (setq sep (cond ((vl-registry-read "HKEY_CURRENT_USER\\Control Panel\\International" "sList")) (",")))
      (foreach row lst (write-line (LM:lst->csv row sep) des))
      (close des)
      t
      )
    )
  )
(defun LM:lst->csv ( lst sep )
  (if (cdr lst)
    (strcat (LM:csv-addquotes (car lst) sep) sep (LM:lst->csv (cdr lst) sep))
    (LM:csv-addquotes (car lst) sep)
    )
  )
(defun LM:csv-addquotes ( str sep / pos )
  (cond
    ( (wcmatch str (strcat "*[`" sep "\"]*"))
     (setq pos 0)
     (while (setq pos (vl-string-position 34 str pos))
       (setq str (vl-string-subst "\"\"" "\"" str pos)
	     pos (+ pos 2)
	     )
       )
     (strcat "\"" str "\"")
     )
    ( str )
    )
  )
(defun C:TxtXLS(/ lst ss i el x fn)
  (setq lst (list) ss (ssget (list (cons 0 "TEXT"))))
  (repeat (setq i (sslength ss))
    (setq x (ssname ss (setq i (1- i))))
    (setq el (entget x))
    (if (= (cdr (assoc 0 el)) "TEXT")
      (setq lst (append lst (list (list (cdr (assoc 1 el))))))
      )
    )
  (setq fn (vl-filename-mktemp nil nil ".csv"))
  (if (and lst (LM:WriteCSV (reverse lst) fn))
    (startapp "explorer" fn)
    )
  )

 

Júnior Nogueira.

Por favor,  Aceitar como Solução se meu post te ajudar.

Please Accept as Solution if my post helps you.

0 Likes
Message 4 of 27

adaptacad
Advocate
Advocate

@cadffm

@
These functions work very well, but are many decimal places, I would like to leave two.
besides understanding how the VLX works.
I would be very grateful if you could help me.

0 Likes
Message 5 of 27

devitg
Advisor
Advisor

Please upload your´s dwg , as dwg , not IMG or else 

0 Likes
Message 6 of 27

cadffm
Consultant
Consultant
If the function works very well, you can change the excel cell format as simple way which you can go yourself.

How it works?
What question you have in detail?
Read Text content or pickpoints,
write them in the first empty row.
In detail there are many functions and many ways to do it.
If you have a concrete Lisp code question, ask them in Visual LISP, AutoLISP and General Customization Forum.

Sebastian

0 Likes
Message 7 of 27

vladimir_michl
Advisor
Advisor
0 Likes
Message 8 of 27

adaptacad
Advocate
Advocate

Thank you guys already get it!!!
but @vladimir_michl  how did you do that incredible lisp? or state secret?

0 Likes
Message 9 of 27

vladimir_michl
Advisor
Advisor

The source code of these apps is not public (unlike some of our other tools) but you can code a similar tool - Visual Lisp allows to control other objects, including Excel App objects, with all their properties and methods. See any ActiveX reference.

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

0 Likes
Message 10 of 27

j.belmonte
Explorer
Explorer

Dear all,

hi , version 1.9 has a problem when i select "rows" it doesn't begin in the appropriate cell in excel.

I use Autocad 2022.

 

Do you have any idea ?

0 Likes
Message 11 of 27

vladimir_michl
Advisor
Advisor

Thanks for your input, we will look at it.

 

Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz

 

0 Likes
Message 12 of 27

j.belmonte
Explorer
Explorer

Thank you for your quick reply. Keep me in touch please (also i run Office 365 juste in case if this bug is related to the office suite)

0 Likes
Message 13 of 27

vladimir_michl
Advisor
Advisor

I am testing it in AutoCAD 2022, Excel 365, Click2XLS V1.9. When I select a row (by clicking on the row number in Excel), start the Click2XLS or Text2XLS command in AutoCAD and perform a mouse click, the respective data is written into the column "A" of that specific (selected) row. Do you use the same workflow?

 

Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz

 

0 Likes
Message 14 of 27

j.belmonte
Explorer
Explorer

It's always the same behaviour.

If i stay in columns, the lisp works great.

 

But in rows , if i start from cell A5, the texts start to be paste on cell B4.

If i start on AA5, it pastes on AB4 really weird.

 

Worse , if i start on A1, the program want to paste on B0 (line zero does not exists in excel) , or probably related to language, i have Office in French.

 

See extract when it wants to put the data in cell B0 witch no exists in excel :

Pick next text (column-mode) [insert Blank/Rows/eXit]: L-0507->[B0]
Error: Erreur Automation. Aucune description n'a été entrée.

 

0 Likes
Message 15 of 27

vladimir_michl
Advisor
Advisor

What confuses me is the "switch to Row mode" as Row mode is the default. So you switch to Column mode and then back to Row mode? And then it fails? I will check this.

UPDATE: I think you call the Column mode "rows", starts to make sense for me. Switching to Column mode just jumps 3 cells to the right -- if it is not the first point (as now added in V1.10).

 

PS: the thread probably gets too "individual", please e-mail me directly - vladimir.michl [at] arkance-systems.com

 

Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz

 

0 Likes
Message 16 of 27

j.belmonte
Explorer
Explorer

By default the texts are pasted vertically (column mode), but i need to have them pasted in row (horizontally, so i choose at each start to switch.

0 Likes
Message 17 of 27

murugan.231123
Participant
Participant

Hi,

When i apload the click2xls lisp it not working and reply that excel application is not installed.

Can anyone resolve my issue.

the same application is working other computer.

the excel is already installed.

murugan231123_0-1677659899696.png

 

0 Likes
Message 18 of 27

vladimir_michl
Advisor
Advisor

First try the current version of Click2XLS from https://www.cadforum.cz/download - you have a very old one. If it still won't find your Excel, let's perform some diagnostics.

 

Vladimir Michl, www.arkance-systems.cz  -  www.cadforum.cz

 

0 Likes
Message 19 of 27

murugan.231123
Participant
Participant

Thank you for the reply.

 

I find the lisp from the website ...the new version...thank you so much.

But the issue is not solved.

murugan231123_0-1677735492786.png

Can you help the diagnostics part where i can get this in below.

murugan231123_1-1677735616492.png

 

0 Likes
Message 20 of 27

vladimir_michl
Advisor
Advisor

You can find it in the freeware section or using a search:

https://www.cadforum.cz/en/download.asp?file=XLS

 

Vladimir Michl, www.arkance-systems.cz  -  www.cadforum.cz

 

0 Likes