Anyone have a lisp routine that can write to an already existing XLS file? What i need is an Excel file that will be updated with a users 'hostname' when they start AutoCAD. I can get the hostname information with the below code, but I'm not sure how to get this value into an Excel file.
(getenv "computername")
Thanks for any help.
Out of curiosity, if all you're writting to the file is the hostname, why .XLS(x), and not either .TXT, or .CSV, etc.?
There are a few ways of going about writing to .XLS(x), but you've not provided enough information... What format is your external workbook, what other information are you writing to this file, what version of Office are you using, etc.?
"How we think determines what we do, and what we do determines what we get."
I can already post to a TXT file. (see below code)
Just wanted to see if there was an easy way to post to an XLS file.
(setq LOGN (STRCAT (getvar "loginname") ", "(getenv "computername")))
(setq l_file (open fname "A"))(write-line LOGN l_file)(close l_file)