I have this code that will allow me to write to a specific cell in excel
however im fumbling about trying to figure out how to open an excel file to the specific sheet to write to
can anyone post a sample syntax on how to open an excel file to a specific sheet?
here is the code that i have
thanks
(vl-load-com)
;to make a link between acad and Excel (ok with Excel 97)
(setq ObjExcel (vlax-get-or-create-object "Excel.Application"))
(setq ObjWorkbooks (vlax-get-property ObjExcel "workbooks"))
(setq ObjCurrWorkbooks (vla-add ObjWorkbooks))
(setq ObjSheet (vlax-get-property ObjExcel "activesheet"))
(setq ObjCells (vlax-get-property ObjSheet "cells"))
;to put a value in a cell
(setq lineXls 4)
(setq rowXls 6)
(setq valueXls "test")
(vlax-put-property ObjCells 'item lineXls rowXls valueXls)