Consulting

Results 1 to 4 of 4

Thread: issue reading from a .csv file

  1. #1
    VBAX Regular
    Joined
    Sep 2009
    Posts
    9
    Location

    issue reading from a .csv file

    I am trying to make an export from a tool and then import in a second one
    this is done via vba

    I export info in a .csv file
    and then read the .csv file with

    objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & strPathToTextfile & ";" & _
    "Extended Properties=""text;HDR=YES;FMT=Delimited"""

    the weir part now is:

    but some data can not be read...even if this data is written (existing) in the csv file....it seems like it's null...it can't be read

    can you give me any hints?

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Maybe it is not delimited by quotes?

    If you open it in Excel, is it shown?

    You can post an example csv and xlsm for us to troubleshoot if you like.

  3. #3
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,635
    Please explain the relationship between your question and Excel (since this is an Excel help subforum).

  4. #4
    VBAX Mentor Teeroy's Avatar
    Joined
    Apr 2012
    Location
    Sydney, Australia
    Posts
    414
    Location
    I know it's simplistic but have you tried:
    Workbooks.Open Filename:="Filename.csv"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •