Interacting with .csv files in excel vba

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bbrooks
    New Member
    • Nov 2009
    • 1

    Interacting with .csv files in excel vba

    I am writing a code that will use data that is saved in a .csv file. How do I call the file in VBA without opening it? I want to reference specific data within these csv files, for example, I have a matrix that is 30 columns by 30 rows, how can I run an operation on a specific cell in the matrix (i.e. Column A, Row 7) with VBA without opening the csv file?
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    You can't!* The file is going to have to be opened one way or another whether you open it yourself, or by creating an instance of excel to manipulate it. It will be opened.

    *To qualify this statement of "You can't!" Let me say that you could but not with VBA. There are a set of API's that will allow a programmer to read and write directly to secters on the disk but even doing this with VB 6.0/.NET/C/C+/C++/Java/Delphi or any other programming language you can think of, is not easy to do.



    Good Luck

    Comment

    Working...