GoldSA Posted June 3 Author Posted June 3 Thank you so so much, @Saxlle. It's impossible for me to make it. It's perfect. ★★★★★ I was touched to see your comment and the result. God bless all of you. So funnuy~~ Quote
BIGAL Posted June 3 Posted June 3 You can use this to write to Excel Note not supported in LT24+. Dont have Excel open, just write to the cell using row and column rather than write to a csv. ;; Thanks to fixo ;; ;; = Set Excel cell text = ;; ;; ;; (defun xlsetcelltext ( row column text) (setq cells (vlax-get-property (vlax-get-property myxl "ActiveSheet") "Cells")) (vl-catch-all-apply 'vlax-put-property (list cells 'Item row column (vlax-make-variant (vl-princ-to-string text) vlax-vbstring))) ) ;; Try to get or create Excel instance (setq myxl (vl-catch-all-apply 'vlax-get-or-create-object '("Excel.Application"))) (if (vl-catch-all-error-p myxl) (progn (prompt "\nError: Could not start Excel.") (exit) ) ) (if (= (vlax-get-property (vlax-get-property myXL 'WorkBooks) 'count) 0) (vlax-invoke-method (vlax-get-property myXL 'WorkBooks) 'Add) ) (vla-put-visible myXL :vlax-true) (vlax-put-property myxl 'ScreenUpdating :vlax-true) (vlax-put-property myXL 'DisplayAlerts :vlax-true) 2 Quote
Saxlle Posted June 4 Posted June 4 Thank you @BIGAL for code snippet! I would use that in future . 1 Quote
Recommended Posts
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.