Jump to content

Recommended Posts

Posted

Hi friends

i made a table by lisp and need the last column to be equation in the lisp himself

what i need to do 

somthing like "=b3*c3"

 

 

count bars .lsp

Posted

While I can't say for your specific table, I'd approach this in the following way:

 

1. Loop through the table, using the rowcount (vla-get-rows table) as an index

2. Access data in hardcoded columns (vla-gettext table row column) with the index representing the row.

3. Iterate the index every iteration. 

 

So you would end up with something like:

(setq size (vla-get-rows table)
	  j 0
)

(repeat size
	(vla-settext table j 2 (* (read(vla-gettext table j 0)) (read(vla-gettext table j 1))))
	(setq j (+ j 1))
)

 

This will likely not work with your table but the process should be about the same.  

Posted

thx

i try the process but the resault is fixed and not linked to the cell

Posted (edited)

hi friends

i find a way

the sulotion is 

Quote

(vla-settext myTable row 5 "=B3*C3*PI*D3*D3*0.25*E3*7.86*0.001*0.01")

 

Edited by mousho
Posted

Have a look inside getexcel.lsp it has a row column (2 3) =  "B3" defun, by Gile. So could create your string. 

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...