I already have a lisp that collects X,Y,Z points and creates a .csv file. My problem is I have to cut and paste the data points and put them in this pretty .xls file which contains formulas and conditional formating.
So my question is, can I somehow bybass the cut and paste process. Can I append to the existing .xls file? How can I get it to place the data in the correct row/column? Any ideas?
Solved! Go to Solution.
Solved by hmsilva. Go to Solution.
Solved by hmsilva. Go to Solution.
Henrique, thank you so much.
I did reverse the list and entmake the text. Now I am back to where do I put the following? It doesn't seem to work anywhere.
(setq xrow (+ xrow pt#)
yrow (+ yrow pt#)
zrow (+ zrow pt#)
sdrow (+ sdrow pt#)
);; setq
Also at the end of your code what does the following do?
(78 2 40 2 nil "end of " 75 9 0 0 0 T T nil T)
That looks like it's in case of appended information in order to put the information in the correct location within Excel.
OK,
the only change is the entmake and the reverse, correct?
Do you want the option to de user enter the start row number?
Henrique
Yes, the only change was the entmake and reverse.
Row 12 is the starting row. If the user enters 1 for PT# then the data will populate row 12. If the user enters 5 for PT# then the data will populate row 16.
Again, thank you so much for your help.
My apologies as I did not clarify in my previous post that I do not want the user to specify the Excel starting row. I need to add 11 to whatever the user specifies for a point number therefore giving the Excel starting row.
If the user enters 1 for the specified point number – the Excel starting row = 12.
If the user enters 3 for the specified point number – the Excel starting row = 14.
I don’t know where to add the following for this to work.
(setq xrow 11
yrow 11
zrow 11
sdrow 11
); setq
(setq xrow (+ xrow pt#)
yrow (+ yrow pt#)
zrow (+ zrow pt#)
sdrow (+ sdrow pt#)
); setq
@smaher12 wrote:
Yes, and spent a little time to try and alter it to work as described in message #30. No luck.
The xyz2xce_V1.LSP, without being altered, should perform as you need
"If the user enters 1 for the specified point number – the Excel starting row = 12"
"If the user enters 3 for the specified point number – the Excel starting row = 14"
Try it.
Henrique
In xyz2xce_V1.LSP it has
(setq row (getint "\nEnter the Excel Start Row number: <exit>"))
I would prefer that it not ask me to enter the Excel Start Row number.
(setq PT# (1- (_def PT# 'Getint "\nSpecify point number ")))
I'd rather it take the Specified point number (PT#) and add 11 to it to get the row number.
Perfecto!!!
I tried so many different combinations and the program would crash or the data was inserted in the wrong row. I just did not understand what was going on. With the answer right in my face I still don't have 100% grasp on how all the functions work together.
Again, thank you for patience and all your help. 🙂