Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

txt file import problem. Multiplt delims and cr/lf, page breaks 1

Status
Not open for further replies.

joel009

Programmer
Jul 7, 2000
272
US
XP Pro SP3, Access 2010 running in 2007 mode.

Most persistent little bugger, definitly my biggest challenge yet for importing a file. When I open it in notepad it looks good but open it in excel and ????
I figured out it has both ; and tabs next to each other for the delim. I know I can open it in notepad, excel whatever and remove the tabs by ascii code but the one symbol that translates finally if I open it in word 2010 appears to be a page break or something similar.

I can't find the ascii char for this, does anyone know how to loop threw the lines and create an ascii char number for whatever I am fighting here? It appears when I do an import as with a question mark in it. It looks like the "space" symbol but with the "?" inside it (hey, I've got questions in my own sandbox darnit). I have tried using various specifications, importing the file raw opening it with notepad, excel, etc.

Thanks,
Joel

Joel
 
This will "print" codes 1-255 in the immediate window.
Code:
Sub tp()
Dim x As String

Dim i As Integer
   On Error GoTo tp_Error

For i = 1 To 255
x = x & i & " " & Chr(i) & ","
Next i
Debug.Print x
On Error GoTo 0
   Exit Sub

tp_Error:

    MsgBox "Error " & Err.number & " (" & Err.Description & ") in procedure tp "
End Sub


However, you might be better to try and copy the "funny character" and the try

? ASC("the char") and see if you get a number.
The question mark in a box may just be a concocted symbol to identify an unprintable...
Just a thought
 
Thank you jedraw. This is going in my permenant file!!! Which, like a newbee (12 years), I lost at my WFR from my previous job. Thank you,
Joel

Joel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top