How to open csv in Excel with Visual LISP

Discussion in 'AutoCAD' started by weslleywang, Aug 20, 2003.

  1. weslleywang

    weslleywang Guest

    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
     
    weslleywang, Aug 20, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.