Working w/ CSV File

G

Guest

I am using Visual CE which Exports an ASCII File like this...

Store,@var(1),LastInsp,@var(0),Question,TheQues,Guidance,Answer,Comment,SchCorr,CorrDate,CActions,OtherReason
050234,"050234",2006-08-24 00:00:00,2006-08-24 00:00:00,"154","Is the
service center maintaining copies of all Ashland hotwork permits issued for
the site for a period of one year?","Guidance: If a hotwork permit is issued
for a facility, that facility is required to maintain both the pink and
yellow copies of the permit in their Responsible Care Compliance Manual for a
period of one (1) year.","CTOA","Other",2006-08-29 00:00:00,2006-08-30
00:00:00,"hot work permit found",""

I have to rename the File w/ a .csv extension which I'll have to do by code.
Using an Import Spec also gets messed up because soon as it sees...
"Guidance: If a hotwork permit is issued for a facility, that facility is
required to maintain both the pink and yellow copies of the permit in their
Responsible Care Compliance Manual for a period of one (1) year."...even
though Double Quotes are
around the string, the comma "separates" the string and places the next word
"that"
in the next field.

I still have another way to try to import the data without using an Import
Specifictaion.

Looking for ideas on how to best get this data in...including deleting the
first row of Field names.

TIA - Bob
 
A

Albert D. Kallal

are you sure during import you not "checked" the delimiter box???

In the wizard, you check

[x] first name contains name

and, for the text qualifier, choose the "

If you do the above, then the sample data you posted will import ok.
However, the date/time fields were failing for some reason (so, import those
as text first...and convert them later....


You can write your own code to import the data, but you should try the
wizard first...

I just cut and pasted your data into a text document, and I had not problem
importing the data....

So, make sure you check both "first name contains fields", and also make
sure set the text qualifier to "
 
G

Guest

Albert - It will work manually...Just starting to test running in w/ code.

Thank you - Bob
 
G

Guest

Getting "unable to append data" from...
R = "C:\CEFiles\" & cboFileCE
DoCmd.TransferText acImportDelim, "AFromCE", "FromCE", _
R, True


Bob Barnes said:
Albert - It will work manually...Just starting to test running in w/ code.

Thank you - Bob

Albert D. Kallal said:
are you sure during import you not "checked" the delimiter box???

In the wizard, you check

[x] first name contains name

and, for the text qualifier, choose the "

If you do the above, then the sample data you posted will import ok.
However, the date/time fields were failing for some reason (so, import those
as text first...and convert them later....


You can write your own code to import the data, but you should try the
wizard first...

I just cut and pasted your data into a text document, and I had not problem
importing the data....

So, make sure you check both "first name contains fields", and also make
sure set the text qualifier to "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top