Replacing space-delimitor to a tab-delimitor in CSV files?
I have a question about CSV files. I have CSV files that are separated by spacing. Not tab, not comma but spacing.
I've only come across importing tab-delimited or comma-delimited CSV files to Access but I never heard of importing space-delimited CSV files to Access.
My CSV files are separated by spaces. I have already done the codes for importing of CSV file to Access but I don't know how to replace the space-delimitor to tab-delimitor.
Can anyone of you show me where to place the codes & how to do it? Graciass..
Hope you people could help me out here. I am really confused now. I had initially thought & assumed that the spaces are the same like tab spacing. But now, I am wrong. I don't know where to continue after this.
<%@ Language="VBScript" %>
set objconn = Server.CreateObject("ADODB.Connection")
set fso = createobject("scripting.filesystemobject")
set act = fso.opentextfile(server.mappath(csv_to_read),1,False)
Do Until act.AtEndOfStream
strsql="INSERT INTO CSV (ID, MyName, MyAddress)"
strsql=strsql & "VALUES('"&sSeg(0)&"', '"&sSeg(1)&"','"&sSeg(2)"')"
I have a question about CSV files. I have CSV files that are separated by spacing. Not tab, not comma but spacing
My CSV files are separated by spaces. I have already done the codes for importing of CSV file to Access but I don't know how to replace the space-delimitor to tab-delimitor
You are showing code for separating a comma delimited file. So are you asking how to change this to make it separate a space delimited file? I am am confused by the statements.
Really???? Oohh dear...I guess I did it wrongly then. *grins* Is there different codes to import space-delimited files to Access?? If so, can you help me by posting the sample here so that maybe I can understand??
Space delimited files are a little more involved since you cannot simply split them. I am assuming your fields are enclosed in quotation marks as well. Are the columns lined up or are they ragged.
The top one is easier than the bottom one. Let know exactly what I will have to deal with and I can help you. Just out of curiosity where are you getting these from and can you have them changed to normal CSV's (comma delimited)
Do they look like this:
" 1" "George Bernard Shaw" "1 Whiskey River, Blah NM 99999"
" 111" "Millicent Harper" "2 Holloway Lane, Blaine MO 77777"
or do they look like this:
"1" "George Bernard Shaw" "1 Whiskey River, Blah NM 99999"
"111" "Millicent Harper" "2 Holloway Lane, Blaine MO 77777"
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)