Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I hope someone can help me with this issue, please.
I need to open a large semi-colon delimited text file into a recordset using ADO. Is this possible? If so, how do I make ADO aware that the file is "semi-colon" delimited? Right now, my code does not recognize this delimeter and imports all the data into the recordset as one column (NOTE: there are too many rows to open into a spreadsheet). Your example code would be most appreciated, thanks in advance. If needed, my code so far is below: Set cnText = New ADODB.Connection cnText.CursorLocation = adUseClient cnText.ConnectionString = "PROVIDER=MSDASQL;DRIVER= {MICROSOFT TEXT DRIVER (*.TXT; *.CSV)};DBQ=" & argFilePath & ";" cnText.Open strSQL = "SELECT * FROM " & argFileName & ";" Set rsText = New ADODB.Recordset rsText.MaxRecords = 0 rsText.Open Source:=strSQL, ActiveConnection:=cnText, CursorType:=adOpenForwardOnly, LockType:=adLockReadOnly, Options:=adCmdText Your example code would be most helpful, TIA. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert column data to semicolon delimited text string | Excel Worksheet Functions | |||
Saving Excel sheet as a semicolon delimited file (.csv) | Excel Discussion (Misc queries) | |||
Converting Excel data into semicolon delimited text file | Excel Discussion (Misc queries) | |||
Export excel file to semicolon delimited text file | Excel Discussion (Misc queries) | |||
Open delimited text file to excel without changing data in that file | Excel Programming |