How to open csv in Excel with Visual LISP

weslleywang

Usenet Archive
Joined
Aug 20, 2003
Messages
15
Reaction score
0
Hi:
  This is my code:
  (setq excelapp (vlax-get-object "Excel.Application"))   (vlax-put-property excelapp "Visible" 1)   (setq owbks (vlax-get-property excelapp "Workbooks"))   (vlax-invoke-method owbks "Open" "f:\\filefolder\filename.csv")

Error message:
  Error: Automation Error. 'filename.csv' cold not be found. Check the spelling of the file name. and verify that file location is correct. if you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved or deleted.

I am sure filename.csv is there and with full path in my code. any idea what's going on here? thanks a lot

Wes
 
Back
Top