Jump to content

Search the Community

Showing results for tags 'CSV ADODB'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi All, I have been trying to use ADODB to open a CSV file (only coma separation, no double quotes around each field). I use the following connection string $connStr = 'Provider=Microsoft.Jet.OLEDB.4.0; Data Source=' & $csvPath & _ ';Extended Properties="Text;HDR=No;FMT=Delimited(,);IMEX=1";' $objConn.Open($connStr) $objRS.Open("Select * From " & $csvFile, $objConn, $AD_OPEN_STATIC, $AD_LOCK_OPTIMISTIC, $AD_CMD_TEXT) $hearderRow = $objRS.GetRows(1) However the header row does not contain all the columns and using _ArrayDisplay. Columns 0, 3, 4, 5, 6, 7, 8, 9 and 12 are always empty. However, If I get 2 rows, all the data are present but the header is still missing some columns. Also, if I say to skip the header row, then there is no data loss. The following is a sample of the file that produces the error: TermNumber,DNSName,DNSDomain,DNSClientIP,SrvClientIP,SrvClientMask,SrvIP,SrvMask,SiteID,SiteNumber,SiteEC,DNSCltName,ClientIP,SitePassword 1,myServer,site1.xxx.yyy.zz,10.10.10.10,10.10.10.11,255.255.255.255,10.10.11.11,255.255.255.255,1,2,883242,myClient,10.10.10.12,MyPassword I thought there must be something wrong with CSV file. I then loaded it into Excel 2003 and saved as .XLS. Using the appropriate connection strings etc, all the header columns are present. I then created a dummy CSV file as follows: AAA,BBB,CCC,DD,EEEE,FF,54y,6y75,et3,f34 123,345,dfgsd,56g,dfgh,53gs,t34g,rf23,sd5t,f34 fgd,45,fgd,6y,r3g,34,f23,as4,t34,f4 And when running with the above code, The BBB header is always empty. I then created another dummy CSV file as follows: AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,III,JJJ,KKK,LLL,MMM 111,222,333,444,555,666,777,888,999,000,111,222,333 222,333,444,555,666,777,888,999,000,111,222,333,444 Now, all the header columns are empty. Anyone know what is going on? BTW, this was tested on a computer without Office installed and a computer with Office 2010 installed with the same effect. Cheers, Vlad
×
×
  • Create New...